MCPcopy Create free account
hub / github.com/dfinity/examples / create_taproot_spend_info

Function create_taproot_spend_info

rust/basic_bitcoin/src/p2tr.rs:27–47  ·  view source on GitHub ↗

Constructs the full Taproot spend info for a script-path-enabled Taproot output. This function: - Converts the given internal and script leaf public keys into x-only format (as required by BIP-341) - Constructs a script leaf of the form ` OP_CHECKSIG` - Commits the script into a Taproot Merkle tree (with a single leaf) - Applies the BIP-341 tweak to the internal key to compute th

(
    internal_key_bytes: &[u8],
    script_key_bytes: &[u8],
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls 1

create_spend_scriptFunction · 0.85

Tested by

no test coverage detected