Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

legacy_signature

Fully qualified path: alexandria_btc::legacy_signature

Constants

SIGHASH_ALLSIGHASH types for Bitcoin transaction signing
SIGHASH_NONE
SIGHASH_SINGLE
SIGHASH_ANYONECANPAY

Free functions

create_signatureCreate a signature with known y_parity…
verify_ecdsa_signature_coordsVerify a Bitcoin ECDSA signature using Cairo’s built-in verification (legacy coords format) This function uses Cairo’s optimized ECDSA verification through public key recovery….
verify_ecdsa_signatureVerify a Bitcoin ECDSA signature This function works with the new ByteArray-based BitcoinPublicKey structure that properly represents Bitcoin’s 33-byte compressed or 65-byte uncompressed format….
verify_ecdsa_signature_auto_recoveryVerify a Bitcoin ECDSA signature with automatic y_parity detection This function tries both y_parity values (false and true) to find a match…
verify_der_signatureVerify a DER-encoded Bitcoin signature This function parses a DER-encoded signature and verifies it against the provided message hash and public key. Since DER signatures don’t…
parse_der_signatureParse DER-encoded signature using ByteArray utilities…
mod_inverseCalculate modular inverse using Fermat’s little theorem for prime modulus For secp256k1 curve order n (which is prime), we use Fermat’s little theorem:…
create_signature_hashCreate a signature hash for transaction signing using ByteArray…
verify_transaction_signatureVerify a signature against transaction data…