Skip to content

pythcoiner/bwk

Repository files navigation

Bitcoin Wallet Kit

Experimental — do not use in production or with real coins. API will break.

Modular Rust workspace for building Bitcoin wallets. Provides account management, UTXO tracking, transaction building, and signing — with backends for both standard descriptor wallets (via Electrum) and Silent Payments (BIP352 via Blindbit).

Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│                              Application                                    │
└─────────────────────────────────────────────────────────────────────────────┘
        │                                    │
        ▼                                    ▼
┌───────────────────┐              ┌───────────────────┐
│       bwk         │              │      bwk-sp       │
│ (descriptor-based │              │ (silent payments) │
│     account)      │              │     account)      │
└───────────────────┘              └───────────────────┘
        │                                    │
        ├────────────┬───────────────────────┤
        ▼            ▼                       ▼
┌─────────────┐ ┌─────────────┐      ┌─────────────┐
│ bwk-electrum│ │  bwk-sign   │      │   spdk +    │
│  (chain)    │ │  (signing)  │      │  blindbit   │
└─────────────┘ └─────────────┘      └─────────────┘
        │            │                       │
        └────────────┴───────────────────────┘
                     │
        ┌────────────┼────────────┐
        ▼            ▼            ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│bwk-descriptor│ │  bwk-keys   │ │   bwk-tx    │
│ (derivation)│ │ (key mgmt)  │ │  (building) │
└─────────────┘ └─────────────┘ └─────────────┘

Crates

+----------------+-------------------------------------------------------+
| Crate          | Purpose                                               |
+----------------+-------------------------------------------------------+
| bwk            | Account for descriptor wallets (Electrum backend)     |
| bwk-sp         | Silent Payments account (BIP352, Blindbit backend)    |
| bwk-tx         | Transaction building, coin selection, PSBT            |
| bwk-electrum   | Electrum protocol client                              |
| bwk-sign       | Hot signer, SigningManager                            |
| bwk-descriptor | Descriptor construction, SpkDerivator                 |
| bwk-keys       | Key derivation (OXpriv, OXpub)                        |
| bwk-p2p        | Bitcoin P2P client                                    |
| bwk-backoff    | Exponential backoff                                   |
| bwk-utils      | Test helpers                                          |
+----------------+-------------------------------------------------------+

See crate READMEs: bwk, bwk-sp, bwk-tx, bwk-electrum, bwk-sign, bwk-descriptor, bwk-keys, bwk-p2p, bwk-backoff, bwk-utils

Build

cargo build --release
cargo test --features test
cargo clippy --all-targets -- -D warnings

MSRV: 1.78

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages