MCPcopy Create free account
hub / github.com/ElementsProject/elements / CalculateReissuanceToken

Function CalculateReissuanceToken

src/issuance.cpp:49–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void CalculateReissuanceToken(CAsset& reissuanceToken, const uint256& entropy, bool fConfidential)
50{
51 static const uint256 kOne = uint256S("0x0000000000000000000000000000000000000000000000000000000000000001");
52 static const uint256 kTwo = uint256S("0x0000000000000000000000000000000000000000000000000000000000000002");
53 // H_a : asset reissuance tag
54 // E : entropy
55 // if not fConfidential:
56 // H_a = H( E || 1 )
57 // else
58 // H_a = H( E || 2 )
59 std::vector<uint256> leaves;
60 leaves.reserve(2);
61 leaves.push_back(entropy);
62 leaves.push_back(fConfidential ? kTwo : kOne);
63 reissuanceToken = CAsset(ComputeFastMerkleRoot(leaves));
64}
65
66/** Add an issuance transaction to the genesis block. Typically used to pre-issue
67 * the policyAsset of a blockchain. The genesis block is not actually validated,

Callers 13

TxToUnivFunction · 0.85
VerifyAmountsFunction · 0.85
BlindPSBTFunction · 0.85
AppendInitialIssuanceFunction · 0.85
BlindTransactionFunction · 0.85
GetIssuanceAssetsMethod · 0.85
walletcreatefundedpsbtFunction · 0.85
issueassetFunction · 0.85
listissuancesFunction · 0.85
createpsbtFunction · 0.85
issueasset_baseFunction · 0.85

Calls 5

uint256SFunction · 0.85
CAssetClass · 0.85
ComputeFastMerkleRootFunction · 0.85
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected