Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

create_p2pkh_script_pubkey

Creates a P2PKH script_pubkey from a public key hash.

Generates the standard P2PKH script: OP_DUP OP_HASH160 <pubkey_hash> OP_EQUALVERIFY OP_CHECKSIG

Arguments

  • pubkey_hash - The 20-byte public key hash

Returns

  • ByteArray - The script_pubkey as a ByteArray

Fully qualified path: alexandria_btc::address::create_p2pkh_script_pubkey

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