Static
convertConvert 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
Error when the provided address is not a valid Bitcoin address
Static
convertConvert 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
Static
getDetermine 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
If the address type is not recognized
Static
isStatic
isStatic
isStatic
isStatic
isStatic
isCheck 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
Static
isValidates 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.