Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

create_p2tr_script_pubkey

Creates a P2TR script_pubkey from an output key.

Generates the standard P2TR script: OP_1 <output_key>

Arguments

  • output_key - The 32-byte Taproot output key

Returns

  • ByteArray - The script_pubkey as a ByteArray

Fully qualified path: alexandria_btc::address::create_p2tr_script_pubkey

pub fn create_p2tr_script_pubkey(output_key: Array<u8>) -> ByteArray