Skip to main content

Module identity

Module identity 

Source
Expand description

Identity computation per spec §8.

Structs§

Md1EncodingId
128-bit canonical identifier for an md1 encoding (spec §8).
WalletDescriptorTemplateId
128-bit BIP 388 wallet-descriptor-template identifier (spec §8.1, γ-flavor).
WalletPolicyId
128-bit canonical wallet-policy identifier (spec v0.13 §5.3).

Functions§

compute_md1_encoding_id
Compute the Md1EncodingId for a descriptor by hashing its canonical bit-packed payload encoding (spec §8).
compute_wallet_descriptor_template_id
Compute the WalletDescriptorTemplateId for a descriptor by hashing only the BIP 388 template content per spec §8.1.
compute_wallet_policy_id
Compute the WalletPolicyId for a descriptor by hashing its canonical-expanded wallet-policy preimage per spec v0.13 §5.3.
validate_presence_byte
Validate a presence_byte from a WalletPolicyId canonical-record preimage (spec v0.13 §5.3). Bit 0 = fp_present, bit 1 = xpub_present, bits 2..7 reserved (must be 0). Returns Error::InvalidPresenceByte with the offending reserved-bit field if any of bits 2..7 is set.