@arkade-os/sdk Documentation - v0.4.0-next.8
    Preparing search index...

    Function verify

    • Verify a BIP-322 signature for a P2TR, P2WPKH, or legacy P2PKH address.

      For segwit addresses (P2TR, P2WPKH), reconstructs the BIP-322 toSpend/toSign transactions and verifies the witness signature.

      For P2PKH addresses, verifies using the Bitcoin Core legacy signmessage format (compact recoverable ECDSA signature).

      Parameters

      • message: string

        The original message that was signed

      • signature: string

        Base64-encoded signature (BIP-322 witness or legacy compact)

      • address: string

        P2TR, P2WPKH, or P2PKH address of the signer

      • Optionalnetwork: BTC_NETWORK

        Optional Bitcoin network for address decoding

      Returns boolean

      true if the signature is valid