Skip to main content

Crate signer_spark

Crate signer_spark 

Source
Expand description

Spark (Bitcoin L2) transaction signer built on secp256k1 ECDSA.

Shares Bitcoin’s cryptographic primitives (double-SHA256 sighash and BIP-137 message signing) but derives its own spark1… bech32m address via the hash160 of the compressed public key.

§Address derivation

Signer::address emits the canonical spark1… bech32m address: bech32m(hrp="spark", RIPEMD160(SHA256(compressed_pubkey))). This matches the address format expected by Spark L2 nodes and produced by kobe-spark.

§Message signing

SignMessage::sign_message signs with the BIP-137 header byte for a compressed P2PKH address (v = 31 | 32), matching the on-wire format of Bitcoin Core’s signmessage so the resulting signature round-trips through any BIP-137 verifier.

Re-exports§

pub use signer_primitives;

Structs§

Signer
Spark transaction signer.

Enums§

SignError
Errors from signing operations.
SignOutput
Signature output across every scheme the workspace supports.

Traits§

Sign
Primitive-level signing surface implemented by every chain-specific Signer.
SignMessage
Opt-in capability: sign an off-chain message with the chain’s own message-signing convention.