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

Function GenerateAssetEntropy

src/issuance.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void GenerateAssetEntropy(uint256& entropy, const COutPoint& prevout, const uint256& contracthash)
24{
25 // E : entropy
26 // I : prevout
27 // C : contract
28 // E = H( H(I) || H(C) )
29 std::vector<uint256> leaves;
30 leaves.reserve(2);
31 leaves.push_back(SerializeHash(prevout, SER_GETHASH, 0));
32 leaves.push_back(contracthash);
33 entropy = ComputeFastMerkleRoot(leaves);
34}
35
36void CalculateAsset(CAsset& asset, const uint256& entropy)
37{

Callers 15

TxToUnivFunction · 0.85
VerifyAmountsFunction · 0.85
BlindPSBTFunction · 0.85
UpdateFromArgsMethod · 0.85
CLiquidV1ParamsMethod · 0.85
UpdateFromArgsMethod · 0.85
AppendInitialIssuanceFunction · 0.85
BlindTransactionFunction · 0.85
GetIssuanceAssetsMethod · 0.85
walletcreatefundedpsbtFunction · 0.85
FillBlindsFunction · 0.85

Calls 4

SerializeHashFunction · 0.85
ComputeFastMerkleRootFunction · 0.85
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected