Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

create_p2wpkh_script_pubkey

Creates a P2WPKH script_pubkey from a public key hash.

Generates the standard P2WPKH script: OP_0 <pubkey_hash>

Arguments

  • pubkey_hash - The 20-byte public key hash

Returns

  • ByteArray - The script_pubkey as a ByteArray

Fully qualified path: alexandria_btc::address::create_p2wpkh_script_pubkey

pub fn create_p2wpkh_script_pubkey(pubkey_hash: Array<u8>) -> ByteArray