Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Free functions

private_key_to_addressGenerates a Bitcoin address from a private key for the specified address type. This function derives the public key from the private key and generates…
public_key_to_addressGenerates a Bitcoin address from a public key for the specified address type and network. This is the primary address generation function that handles all Bitcoin address types…
pubkey_hash_to_addressGenerates a Bitcoin address from a public key hash for the specified address type and network. This function generates addresses for address types that can be derived directly from…
create_p2pkh_script_pubkeyCreates a P2PKH script_pubkey from a public key hash. Generates the standard P2PKH script: OP_DUP OP_HASH160 < pubkey_hash> OP_EQUALVERIFY OP_CHECKSIG…
create_p2sh_script_pubkeyCreates a P2SH script_pubkey from a script hash. Generates the standard P2SH script: OP_HASH160 < script_hash> OP_EQUAL…
create_p2wpkh_script_pubkeyCreates a P2WPKH script_pubkey from a public key hash. Generates the standard P2WPKH script: OP_0 < pubkey_hash>…
create_p2wsh_script_pubkeyCreates a P2WSH script_pubkey from a script hash. Generates the standard P2WSH script: OP_0 < script_hash>…
create_p2tr_script_pubkeyCreates a P2TR script_pubkey from an output key. Generates the standard P2TR script: OP_1 < output_key>…
validate_addressValidates a Bitcoin address format for the specified network. Performs basic format validation for both legacy (Base58Check) and SegWit (Bech32/Bech32m) address formats. Checks length, prefixes, and…
decode_addressDecodes a Bitcoin address from ByteArray to a BitcoinAddress type. This function decodes a Bitcoin address based on the specified address type,…