StaticconvertConvert a given Bitcoin address into its corresponding script public key. Reference: https://github.com/buidl-bitcoin/buidl-python/blob/d79e9808e8ca60975d315be41293cb40d968626d/buidl/script.py#L607
Bitcoin address
Script public key of the given Bitcoin address
StaticconvertConvert a given public key into a corresponding Bitcoin address.
Public key for deriving the address, or internal public key for deriving taproot address
Bitcoin address type to be derived, must be either 'p2pkh', 'p2sh-p2wpkh', 'p2wpkh', or 'p2tr'
Bitcoin address that correspond to the given public key in both mainnet and testnet
StaticgetDetermine network type by checking addresses prefixes Reference: https://en.bitcoin.it/wiki/List_of_address_prefixes
Adopted from https://github.com/ACken2/bip322-js/pull/6 by Czino
Bitcoin address
Network type
StaticisCheck if a given Bitcoin address is a pay-to-public-key-hash (p2pkh) address.
Bitcoin address to be checked
True if the provided address correspond to a valid P2PKH address, false if otherwise
StaticisCheck if a given Bitcoin address is a pay-to-script-hash (P2SH) address.
Bitcoin address to be checked
True if the provided address correspond to a valid P2SH address, false if otherwise
StaticisCheck if a given Bitcoin address is a taproot address.
Bitcoin address to be checked
True if the provided address is a taproot address, false if otherwise
StaticisCheck if a given Bitcoin address is a pay-to-witness-public-key-hash (P2WPKH) address.
Bitcoin address to be checked
True if the provided address correspond to a valid P2WPKH address, false if otherwise
StaticisCheck if a given witness stack corresponds to a P2WPKH address.
Witness data associated with the toSign BIP-322 transaction
True if the provided witness stack correspond to a valid P2WPKH address, false if otherwise
StaticisCheck if a given witness stack corresponds to a single-key-spend P2TR address.
Witness data associated with the toSign BIP-322 transaction
True if the provided address and witness stack correspond to a valid single-key-spend P2TR address, false if otherwise
StaticisValidates a given Bitcoin address. This method checks if the provided Bitcoin address is valid by attempting to decode it for different Bitcoin networks: mainnet, testnet, and regtest. The method uses the bitcoinjs-lib's address module for decoding.
The process is as follows:
The Bitcoin address to validate.
boolean Returns true if the address is valid for any of the Bitcoin networks, otherwise returns false.
Class that implement address-related utility functions.