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

Function BIP341_sha_amounts

test/functional/test_framework/script.py:919–920  ·  view source on GitHub ↗
(spent_utxos)

Source from the content-addressed store, hash-verified

917 return sha256(b"".join(i.prevout.serialize() for i in txTo.vin))
918
919def BIP341_sha_amounts(spent_utxos):
920 return sha256(b"".join(u.nAsset.serialize() + u.nValue.serialize() for u in spent_utxos))
921
922def BIP341_sha_scriptpubkeys(spent_utxos):
923 return sha256(b"".join(ser_string(u.scriptPubKey) for u in spent_utxos))

Callers 2

gen_test_vectorsMethod · 0.90
TaprootSignatureMsgFunction · 0.85

Calls 3

sha256Function · 0.70
joinMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected