Signer
Modular, no_std-compatible Rust toolkit for multi-chain transaction signing — 12 chains, zero hand-written cryptography.
Signer provides thin, secure wrappers around battle-tested cryptographic libraries (k256 for secp256k1 ECDSA and BIP-340 Schnorr, ed25519-dalek for Ed25519), exposing a unified Sign trait across Bitcoin, Ethereum, Solana, Cosmos, Tron, Sui, TON, Filecoin, Spark, XRP Ledger, Aptos, and Nostr. All library crates compile under no_std + alloc and zeroize sensitive material on drop.
Quick Start
Install the CLI
Shell (macOS / Linux):
|
PowerShell (Windows):
irm https://sh.qntx.fun/signer/ps | iex
Or via Cargo:
CLI Usage
# Ethereum — EIP-191 personal_sign
# Bitcoin — message signing
# Solana — Ed25519
# Sui — BLAKE2b intent signing
# Nostr — BIP-340 Schnorr, accepts hex or NIP-19 nsec
# Show address / public key
# JSON output (for scripts / agents)
Library Usage
Every chain exposes the same inherent surface (sign_hash / sign_message /
sign_transaction / verify / public_key_hex / address). The unified
[SignOutput] enum carries chain-native wire formats with pattern-match
accessors — no use signer_primitives::Sign required for everyday work.
use Signer;
let signer = from_hex?;
let out = signer.sign_message?; // SignOutput::Ecdsa { .., v: 27 | 28 }
println!;
println!; // 65-byte r || s || v, hex-encoded
if let Some = out.v
use Signer;
let signer = random;
let out = signer.sign_message?; // SignOutput::Ed25519([u8; 64])
signer.verify?; // inherent verify, &[u8] everywhere
println!;
Kobe HD Wallet Integration
Enable the kobe feature to construct signers from kobe 1.0 derived keys:
use Wallet;
use Deriver;
use Signer;
let wallet = from_mnemonic?;
let account = new.derive?;
let signer = from_derived?;
println!;
For chains with newtype-wrapped accounts (Bitcoin / Solana), pass the chain-specific account directly:
// Bitcoin: kobe_btc::BtcAccount wraps DerivedAccount + WIF / address type
let account = new?.derive?;
let signer = from_derived?;
Design
- 12 chains — Ethereum, Bitcoin, Solana, Cosmos, Tron, Sui, TON, Filecoin, Spark, XRP Ledger, Aptos, Nostr
- Zero hand-rolled crypto — secp256k1 ECDSA & BIP-340 Schnorr via k256, Ed25519 via ed25519-dalek
- Type-safe digests —
sign_hashtakes&[u8; 32]; ragged byte slices are rejected at compile time - Discriminated
SignOutput— enum variants (Ecdsa,EcdsaDer,Ed25519,Ed25519WithPubkey,Schnorr) carry chain-native wire formats; noOptionjuggling - Inherent API parity — every chain
Signerexposes canonicalsign_hash/sign_message/sign_transaction/verify/public_key_hexdirectly, with theSigntrait delegating on top no_std+alloc— All library crates compile withoutstd; embedded / WASM ready- Security hardened —
ZeroizeOnDrop,Debugredacted ([REDACTED]),Cloneremoved,Send + Sync - Kobe integration — Optional HD wallet bridging via
kobefeature flag - CSPRNG — Random generation via OS-provided entropy (
getrandom) - KAT-verified — Deterministic test vectors (RFC 8032, known secp256k1 keys) for all chains
- Strict linting — Clippy
pedantic+nursery+correctness(deny), zero warnings
Crates
See crates/README.md for the full crate table, dependency graph, and feature flag reference.
Security
This library has not been independently audited. Use at your own risk.
- Private keys wrapped in
ZeroizeOnDrop— zeroed from memory on drop Debugimpl outputs[REDACTED]— no key material leaked to logsCloneintentionally removed — prevents uncontrolled key copies- Random generation uses OS-provided CSPRNG via
getrandom Signtrait requiresSend + Sync— safe for concurrent use- No key material is logged or persisted
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project shall be dual-licensed as above, without any additional terms or conditions.
A QNTX open-source project.
Code is law. We write both.