|
1 | 1 | # The Bitcoin Dev Kit
|
2 | 2 |
|
3 | 3 | <div align="center">
|
4 |
| - <h1>BDK</h1> |
5 | 4 |
|
6 | 5 | <img src="./static/bdk.png" width="220" />
|
7 | 6 |
|
8 | 7 | <p>
|
9 |
| - <strong>A modern, lightweight, descriptor-based wallet library written in Rust!</strong> |
| 8 | + <strong>A suite of libraries for building modern, lightweight, descriptor-based wallets written in Rust!</strong> |
10 | 9 | </p>
|
11 | 10 |
|
12 | 11 | <p>
|
13 |
| - <a href="https://crates.io/crates/bdk_wallet"><img alt="Crate Info" src="https://img.shields.io/crates/v/bdk_wallet.svg"/></a> |
14 | 12 | <a href="https://github.com/bitcoindevkit/bdk/blob/master/LICENSE"><img alt="MIT or Apache-2.0 Licensed" src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg"/></a>
|
15 | 13 | <a href="https://github.com/bitcoindevkit/bdk/actions?query=workflow%3ACI"><img alt="CI Status" src="https://github.com/bitcoindevkit/bdk/workflows/CI/badge.svg"></a>
|
16 | 14 | <a href="https://coveralls.io/github/bitcoindevkit/bdk?branch=master"><img src="https://coveralls.io/repos/github/bitcoindevkit/bdk/badge.svg?branch=master"/></a>
|
17 |
| - <a href="https://docs.rs/bdk_wallet"><img alt="Wallet API Docs" src="https://img.shields.io/badge/docs.rs-bdk_wallet-green"/></a> |
18 | 15 | <a href="https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html"><img alt="Rustc Version 1.63.0+" src="https://img.shields.io/badge/rustc-1.63.0%2B-lightgrey.svg"/></a>
|
19 | 16 | <a href="https://discord.gg/d7NkDKm"><img alt="Chat on Discord" src="https://img.shields.io/discord/753336465005608961?logo=discord"></a>
|
20 | 17 | </p>
|
21 | 18 |
|
22 | 19 | <h4>
|
23 | 20 | <a href="https://bitcoindevkit.org">Project Homepage</a>
|
24 |
| - <span> | </span> |
25 |
| - <a href="https://docs.rs/bdk_wallet">Documentation</a> |
26 | 21 | </h4>
|
27 | 22 | </div>
|
28 | 23 |
|
29 | 24 | ## About
|
30 | 25 |
|
31 |
| -The `bdk` libraries aims to provide well engineered and reviewed components for Bitcoin based applications. |
32 |
| -It is built upon the excellent [`rust-bitcoin`] and [`rust-miniscript`] crates. |
| 26 | +The `bdk` libraries aim to provide well engineered and reviewed components for Bitcoin wallets and other applications. |
| 27 | +They are built upon the excellent [`rust-bitcoin`] and [`rust-miniscript`] crates. |
33 | 28 |
|
34 | 29 | ## Architecture
|
35 | 30 |
|
36 |
| -The project is split up into several crates in the `/crates` directory: |
| 31 | +The workspace in this repository contains several crates in the `/crates` directory: |
37 | 32 |
|
38 |
| -- [`wallet`](./crates/wallet): Contains the central high level `Wallet` type that is built from the low-level mechanisms provided by the other components |
39 |
| -- [`chain`](./crates/chain): Tools for storing and indexing chain data |
40 |
| -- [`file_store`](./crates/file_store): Persistence backend for storing chain data in a single file. Intended for testing and development purposes, not for production. |
41 |
| -- [`esplora`](./crates/esplora): Extends the [`esplora-client`] crate with methods to fetch chain data from an esplora HTTP server in the form that [`bdk_chain`] and `Wallet` can consume. |
42 |
| -- [`electrum`](./crates/electrum): Extends the [`electrum-client`] crate with methods to fetch chain data from an electrum server in the form that [`bdk_chain`] and `Wallet` can consume. |
| 33 | +| Sub-Directory | Description | Badges | |
| 34 | +|---------------|-------------|--------| |
| 35 | +| [`chain`](./crates/chain) | Tools for storing and indexing chain data. |   | |
| 36 | +| [`core`](./crates/core) | A collection of core structures used by the [`bdk_chain`], [`bdk_wallet`], and BDK's chain data source crates. |   | |
| 37 | +| [`esplora`](./crates/esplora) | Extends the [`esplora-client`] crate with methods to fetch chain data from an esplora HTTP server in the form that [`bdk_chain`] and `Wallet` can consume. |   | |
| 38 | +| [`electrum`](./crates/electrum) | Extends the [`electrum-client`] crate with methods to fetch chain data from an electrum server in the form that [`bdk_chain`] and `Wallet` can consume. |   | |
| 39 | +| [`bitcoind_rpc`](./crates/bitcoind_rpc) | Extends [`bitcoincore-rpc`] for emitting blockchain data from the `bitcoind` RPC interface in the form that [`bdk_chain`] and `Wallet` can consume. |   | |
| 40 | +| [`file_store`](./crates/file_store) | Persistence backend for storing chain data in a single file. Intended for testing and development purposes, not for production. |   | |
43 | 41 |
|
44 |
| -Fully working examples of how to use these components are in `/example-crates`: |
45 |
| -- [`example_cli`](./example-crates/example_cli): Library used by the `example_*` crates. Provides utilities for syncing, showing the balance, generating addresses and creating transactions without using the bdk_wallet `Wallet`. |
46 |
| -- [`example_electrum`](./example-crates/example_electrum): A command line Bitcoin wallet application built on top of `example_cli` and the `electrum` crate. It shows the power of the bdk tools (`chain` + `file_store` + `electrum`), without depending on the main `bdk_wallet` library. |
47 |
| -- [`example_esplora`](./example-crates/example_esplora): A command line Bitcoin wallet application built on top of `example_cli` and the `esplora` crate. It shows the power of the bdk tools (`chain` + `file_store` + `esplora`), without depending on the main `bdk_wallet` library. |
48 |
| -- [`example_bitcoind_rpc_polling`](./example-crates/example_bitcoind_rpc_polling): A command line Bitcoin wallet application built on top of `example_cli` and the `bitcoind_rpc` crate. It shows the power of the bdk tools (`chain` + `file_store` + `bitcoind_rpc`), without depending on the main `bdk_wallet` library. |
49 |
| -- [`example_wallet_esplora_blocking`](./example-crates/example_wallet_esplora_blocking): Uses the `Wallet` to sync and spend using the Esplora blocking interface. |
50 |
| -- [`example_wallet_esplora_async`](./example-crates/example_wallet_esplora_async): Uses the `Wallet` to sync and spend using the Esplora asynchronous interface. |
51 |
| -- [`example_wallet_electrum`](./example-crates/example_wallet_electrum): Uses the `Wallet` to sync and spend using Electrum. |
| 42 | +The [`bdk_wallet`] repository and crate contains a higher level `Wallet` type that depends on the above lower-level mechanism crates. |
| 43 | + |
| 44 | +Fully working examples of how to use these components are in `/examples`: |
| 45 | + |
| 46 | +- [`example_cli`](examples/example_cli): Library used by the `example_*` crates. Provides utilities for syncing, showing the balance, generating addresses and creating transactions without using the bdk_wallet `Wallet`. |
| 47 | +- [`example_electrum`](examples/example_electrum): A command line Bitcoin wallet application built on top of `example_cli` and the `electrum` crate. It shows the power of the bdk tools (`chain` + `file_store` + `electrum`), without depending on the main `bdk_wallet` library. |
| 48 | +- [`example_esplora`](examples/example_esplora): A command line Bitcoin wallet application built on top of `example_cli` and the `esplora` crate. It shows the power of the bdk tools (`chain` + `file_store` + `esplora`), without depending on the main `bdk_wallet` library. |
| 49 | +- [`example_bitcoind_rpc_polling`](examples/example_bitcoind_rpc_polling): A command line Bitcoin wallet application built on top of `example_cli` and the `bitcoind_rpc` crate. It shows the power of the bdk tools (`chain` + `file_store` + `bitcoind_rpc`), without depending on the main `bdk_wallet` library. |
52 | 50 |
|
53 | 51 | [`rust-miniscript`]: https://github.com/rust-bitcoin/rust-miniscript
|
54 | 52 | [`rust-bitcoin`]: https://github.com/rust-bitcoin/rust-bitcoin
|
55 | 53 | [`esplora-client`]: https://docs.rs/esplora-client/
|
56 | 54 | [`electrum-client`]: https://docs.rs/electrum-client/
|
| 55 | +[`bitcoincore-rpc`]: https://docs.rs/bitcoincore-rpc/ |
57 | 56 | [`bdk_chain`]: https://docs.rs/bdk-chain/
|
| 57 | +[`bdk_wallet`]: https://github.com/bitcoindevkit/bdk_wallet |
58 | 58 |
|
59 | 59 | ## Minimum Supported Rust Version (MSRV)
|
60 |
| -The BDK library maintains a MSRV of 1.63.0. This includes the following crates: |
| 60 | + |
| 61 | +The following BDK crates maintains a MSRV of 1.63.0. To build these crates with the MSRV of 1.63.0 you will need to pin dependencies by running the [`pin-msrv.sh`](./ci/pin-msrv.sh) script. |
61 | 62 |
|
62 | 63 | - `bdk_core`
|
63 | 64 | - `bdk_chain`
|
64 |
| -- `bdk_bitcoind_rpc`. |
65 |
| -- `bdk_esplora`. |
66 |
| -- `bdk_wallet`. |
67 |
| - |
68 |
| -The MSRV of `bdk_electrum` is 1.75.0. |
| 65 | +- `bdk_bitcoind_rpc` |
| 66 | +- `bdk_esplora` |
| 67 | +- `bdk_file_store` |
69 | 68 |
|
70 |
| -To build with the MSRV of 1.63.0 you will need to pin dependencies by running the [`pin-msrv.sh`](./ci/pin-msrv.sh) script. |
| 69 | +The MSRV of the `bdk_electrum` crate is 1.75.0. |
71 | 70 |
|
72 | 71 | ## License
|
73 | 72 |
|
|
0 commit comments