Skip to main content

Crate signer_btc

Crate signer_btc 

Source
Expand description

Bitcoin transaction signer built on the bitcoin crate.

Signer wraps a PrivateKey and uses the global secp256k1 context for all cryptographic operations — ECDSA, Schnorr, PSBT, and BIP-137 message signing.

Zero hand-rolled cryptography.

§Signing methods

MethodDescription
Signer::sign_ecdsasecp256k1 ECDSA signature
Signer::sign_schnorrBIP-340 Schnorr signature (Taproot)
Signer::sign_messageBIP-137 Bitcoin Signed Message
Signer::verify_messageVerify a BIP-137 message
Signer::sign_psbtSign all applicable PSBT inputs

§Deref

Signer implements Deref<Target = PrivateKey>, giving direct access to all PrivateKey methods (e.g. to_wif(), public_key()).

Re-exports§

pub use bitcoin;
pub use bitcoin::secp256k1;

Structs§

Address
A Bitcoin address.
CompressedPublicKey
An always-compressed Bitcoin ECDSA public key
PrivateKey
A Bitcoin ECDSA private key
Psbt
A Partially Signed Transaction.
PublicKey
A Bitcoin ECDSA public key
Signer
Bitcoin transaction signer.
Transaction
Bitcoin transaction.

Enums§

AddressType
BIP-137 address type for message signing.
Error
Errors that can occur during Bitcoin signing operations.
Network
The cryptocurrency network to act on.
NetworkKind
What kind of network we are on.