Expand description
BSV Wallet Toolbox - Production-ready BSV wallet implementation in Rust.
This crate provides a complete, production-ready BSV wallet with persistent storage, automatic transaction broadcasting, proof collection, and chain monitoring. It translates the TypeScript wallet-toolbox into idiomatic Rust.
§Modules
error- Unified error types with WERR codesstatus- Status enums for transactions, proofs, and synctypes- Shared types (Chain,StorageProvidedBy)tables- Database table structs for all 16 entity typesstorage- Storage traits, manager, and SQLx implementationservices- Network service providers (ARC, WhatsOnChain, etc.)signer- Transaction signing with BRC-29 key derivationwallet- High-level Wallet struct implementing WalletInterfacemonitor- Background task runner for proofs, sync, and chain monitoringutility- Cryptographic helpers and BRC-29 script templateslogging- Structured logging initialization via tracing
Re-exports§
pub use error::WalletError;pub use error::WalletResult;pub use status::ProvenTxReqStatus;pub use status::SyncStatus;pub use status::TransactionStatus;pub use wallet::setup::SetupWallet;pub use wallet::setup::WalletBuilder;
Modules§
- auth_
manager - Authentication manager for WAB-based wallet authentication flows. Authentication manager for WAB-based wallet authentication.
- error
- Error types for wallet operations. Error types for the BSV Wallet Toolbox.
- logging
- Structured logging initialization. Structured logging initialization for the BSV Wallet Toolbox.
- migrations
- Database migration helpers (feature-gated by database backend). Feature-gated database migration helpers.
- monitor
- Background monitoring tasks for proofs and chain state. Monitor module – background task scheduler for transaction lifecycle management.
- permissions
- Permission management for wallet operations. Permission management for wallet operations.
- serde_
datetime - Lenient NaiveDateTime serde helpers (handles trailing “Z” from TS). Lenient NaiveDateTime serde helpers.
- serde_
helpers - Lenient serde helpers for TS interop (integer-as-bool, etc.). Lenient serde helpers for TS server interop.
- services
- Network service providers and traits. Services layer for BSV wallet network communication.
- signer
- Transaction signing and key derivation. Signer pipeline module.
- status
- Status enums for wallet entities. Status enums for wallet entities.
- storage
- Storage layer: traits, manager, and implementations. Storage module for the BSV wallet.
- tables
- Database table structs mapping to SQL schema. Database table structs for the BSV wallet.
- types
- Shared types used across subsystems. Shared types used across wallet toolbox subsystems.
- utility
- Cryptographic utilities and BRC-29 script templates. Utility functions for the BSV wallet toolbox.
- wab_
client - Wallet Authentication Backend (WAB) client for identity verification. Wallet Authentication Backend (WAB) client for identity verification.
- wallet
- High-level wallet implementation. Wallet module: core wallet struct and supporting types.
Structs§
- KeyDeriver
- Key derivation for BRC-42/BRC-43 protocols. KeyDeriver derives various types of keys using a root private key.
- Proto
Wallet - Protocol wallet providing default WalletInterface implementations. ProtoWallet is a crypto-only wallet wrapping KeyDeriver.
- Transaction
- BSV transaction type from the SDK. A Bitcoin transaction with inputs, outputs, and optional merkle proof.
Traits§
- Wallet
Interface - The WalletInterface trait defining all 29 wallet operations. The core wallet interface with all 28 async methods.