Function simfony_as_rust::jet::signature_hash_modes::tapleaf_hash

source ·
pub fn tapleaf_hash() -> u256
Expand description

Return a SHA256 hash of the following:

  • The hash of the ASCII string TapLeaf/elements (32 bytes).
  • The hash of the ASCII string TapLeaf/elements again (32 bytes).
  • The result of tapleaf_version (1 byte).
  • The byte 0x20 (1 byte).
  • The result of script_cmr (32 bytes).

Note: this matches Element’s modified BIP-0341 definition of tapleaf hash.