Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

verify_transaction_signature

Verify a signature against transaction data

Arguments

  • transaction_data - The transaction data that was signed
  • signature - The ECDSA signature
  • public_key - The public key to verify against
  • sighash_type - The signature hash type used

Returns

  • bool - True if signature is valid for the transaction

Fully qualified path: alexandria_btc::legacy_signature::verify_transaction_signature

pub fn verify_transaction_signature(
    transaction_data: Span<u8>,
    signature: Signature,
    public_key: BitcoinPublicKey,
    sighash_type: u8,
) -> bool