Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

create_p2sh_script_pubkey

Creates a P2SH script_pubkey from a script hash.

Generates the standard P2SH script: OP_HASH160 <script_hash> OP_EQUAL

Arguments

  • script_hash - The 20-byte script hash

Returns

  • ByteArray - The script_pubkey as a ByteArray

Fully qualified path: alexandria_btc::address::create_p2sh_script_pubkey

pub fn create_p2sh_script_pubkey(script_hash: Array<u8>) -> ByteArray