1ff806c67f4da9ba58b7c7689fde0fe41a34a6f5 fix(chain)!: rm weird `From` impl (志宇) d43ae0231fa4670b98780cad84466c14ae087292 refactor: improve docs, cleanup unnecessary types and improve code (Vladimir Fomene) 41042069809e3eeb4a8cc8a5a8db1af2c57c4a11 feat: impl Append for lots of tuples (LLFourn) c56728ff1315e0deaf256af07fd1ff5e18fced8a refactor: Remove `scan` and `scan_txout` from SpkTxoutIndex and KeychainTxoutIndex (Vladimir Fomene) 32c40ac939bc514ac7f1d3f1d7cd1080011e20ba feat(electrum)!: change signature of `ElectrumExt` (志宇) a28748c33976312b9e6671636ab7e305323efb03 refactor: Implement Default for WalletUpdate (Vladimir Fomene) f42f8b8ff19c2e67888b476487e4e5c9edb0d0ff refactor: Allow for no chain update (Vladimir Fomene) 68572bfd2e32efdeefaa46618e8e248d3a87f143 refactor: move WalletChangeset to wallet module (Vladimir Fomene) 2392e50fd9793902d480556caa4ec225085c82d6 refactor: Move WalletUpdate to wallet module (Vladimir Fomene) 7c12dc994242bf2d7e35c2723f6e7000de97a388 refactor: Remove ForEachTxout trait (Vladimir Fomene) 6bcbb93233824ec391689191b8ca1f5459cec930 refactor: Edit ElectrumExt not to use WalletUpdate (Vladimir Fomene) Pull request description: ### Description Fixes #1061 ### Changelog notice - Move WalletUpdate to the wallet module - Remove ForEachTxout trait completely - Refactor ElectrumExt to not use WalletUpdate. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: evanlinjin: ACK 1ff806c67f4da9ba58b7c7689fde0fe41a34a6f5 Tree-SHA512: 05349713af9d2efa14a522ceaabb7513bb437d786adf2f93055765589a67e4eb68bda36ff415aeba07816c4d30988d4d55bac018e7697019270a219105ed65a2
The Bitcoin Dev Kit
BDK

A modern, lightweight, descriptor-based wallet library written in Rust!
Project Homepage | Documentation
About
The bdk
libraries aims to provide well engineered and reviewed components for Bitcoin based applications.
It is built upon the excellent rust-bitcoin
and rust-miniscript
crates.
⚠ The Bitcoin Dev Kit developers are in the process of releasing a
v1.0
which is a fundamental re-write of how the library works. See for some background on this project: https://bitcoindevkit.org/blog/road-to-bdk-1/ (ignore the timeline 😁) For a release timeline see theBDK 1.0 project page
.
Architecture
The project is split up into several crates in the /crates
directory:
bdk
: Contains the central high levelWallet
type that is built from the low-level mechanisms provided by the other componentschain
: Tools for storing and indexing chain datafile_store
: A (experimental) persistence backend for storing chain data in a single file.esplora
: Extends theesplora-client
crate with methods to fetch chain data from an esplora HTTP server in the form thatbdk_chain
andWallet
can consume.electrum
: Extends theelectrum-client
crate with methods to fetch chain data from an electrum server in the form thatbdk_chain
andWallet
can consume.
Fully working examples of how to use these components are in /example-crates
:
example_cli
: Library used by theexample_*
crates. Provides utilities for syncing, showing the balance, generating addresses and creating transactions without using the bdkWallet
.example_electrum
: A command line Bitcoin wallet application built on top ofexample_cli
and theelectrum
crate. It shows the power of the bdk tools (chain
+file_store
+electrum
), without depending on the mainbdk
library.wallet_esplora_blocking
: Uses theWallet
to sync and spend using the Esplora blocking interface.wallet_esplora_async
: Uses theWallet
to sync and spend using the Esplora asynchronous interface.wallet_electrum
: Uses theWallet
to sync and spend using Electrum.
Minimum Supported Rust Version (MSRV)
This library should compile with any combination of features with Rust 1.57.0.
To build with the MSRV you will need to pin dependencies as follows:
# log 0.4.19 has MSRV 1.60.0+
cargo update -p log --precise "0.4.18"
# tempfile 3.7.0 has MSRV 1.63.0+
cargo update -p tempfile --precise "3.6.0"
# rustls 0.21.2 has MSRV 1.60.0+
cargo update -p rustls:0.21.7 --precise "0.21.1"
# rustls 0.20.9 has MSRV 1.60.0+
cargo update -p rustls:0.20.9 --precise "0.20.8"
# tokio 1.30 has MSRV 1.63.0+
cargo update -p tokio:1.32.0 --precise "1.29.1"
# flate2 1.0.27 has MSRV 1.63.0+
cargo update -p flate2:1.0.27 --precise "1.0.26"
# reqwest 0.11.19 has MSRV 1.63.0+
cargo update -p reqwest --precise "0.11.18"
# h2 0.3.21 has MSRV 1.63.0+
cargo update -p h2 --precise "0.3.20"
# rustls-webpki has MSRV 1.60.0+
cargo update -p rustls-webpki --precise "0.100.1"
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.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.