Skip to content

Commit 3e61d2a

Browse files
committed
Merge #2: chore: split bdk_wallet into it's own repository
175f5d4 chore: flatten crates directory, rename example-crates to examples (Steve Myers) 2a79bab chore: split bdk_wallet into it's own repository (Steve Myers) Pull request description: ### Description Remove everything from the original `bdk` repo not related to `bdk_wallet`. Other crates remain in the original `bdk` repository. Update README and Cargo files. ### Notes to the reviewers After this is merged I'll move all `bdk_wallet` related issues from the `bdk` repo to this repository. Any PRs in the `bdk` repo will need to be manually moved by their owners. ### Changelog notice - Remove everything from the `bdk` repo not related to `bdk_wallet`. Other crates remain in the original bdk repository. ### 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: luisschwab: ACK 175f5d4 ValuedMammal: ACK 175f5d4 Tree-SHA512: 95557157a3951b84724569ca634d7e3a045ebbcec5ec2d3594d5d1d92402f0247f216a521e0b2fc56495023ec6169bf41bb4ce0f1fa6abfb54161396944ddf9d
2 parents 5817ed0 + 175f5d4 commit 3e61d2a

File tree

129 files changed

+39
-21606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+39
-21606
lines changed

.github/workflows/code_coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Make coverage directory
3535
run: mkdir coverage
3636
- name: Run grcov
37-
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only '**/crates/**' --ignore '**/tests/**' --ignore '**/examples/**' -o ./coverage/lcov.info
37+
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only '**/wallet/**' --ignore '**/tests/**' --ignore '**/examples/**' -o ./coverage/lcov.info
3838
- name: Generate HTML coverage report
3939
run: genhtml -o coverage-report.html --ignore-errors unmapped ./coverage/lcov.info
4040
- name: Coveralls upload

.github/workflows/cont_integration.yml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
- version: ${{ needs.prepare.outputs.rust_version }}
2828
clippy: true
2929
- version: 1.63.0 # Overall MSRV
30-
- version: 1.75.0 # Specific MSRV for `bdk_electrum`
3130
features:
3231
- --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
3332
- --all-features
@@ -44,28 +43,15 @@ jobs:
4443
profile: minimal
4544
- name: Rust Cache
4645
uses: Swatinem/[email protected]
47-
- name: Pin dependencies for 1.75
48-
if: matrix.rust.version == '1.75.0'
49-
run: |
50-
cargo update -p home --precise "0.5.9"
51-
cargo update -p native-tls --precise "0.2.13"
52-
cargo update -p idna_adapter --precise "1.1.0"
53-
cargo update -p base64ct --precise "1.6.0"
54-
cargo update -p minreq --precise "2.13.2"
5546
- name: Pin dependencies for MSRV
5647
if: matrix.rust.version == '1.63.0'
5748
run: ./ci/pin-msrv.sh
5849
- name: Build + Test
5950
env:
6051
MATRIX_RUST_VERSION: ${{ matrix.rust.version }}
6152
run: |
62-
if [ $MATRIX_RUST_VERSION = '1.63.0' ]; then
63-
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
64-
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
65-
else
66-
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
67-
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
68-
fi
53+
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
54+
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
6955
7056
check-no-std:
7157
needs: prepare
@@ -85,18 +71,10 @@ jobs:
8571
# target: "thumbv6m-none-eabi"
8672
- name: Rust Cache
8773
uses: Swatinem/[email protected]
88-
- name: Check bdk_chain
89-
working-directory: ./crates/chain
90-
# TODO "--target thumbv6m-none-eabi" should work but currently does not
91-
run: cargo check --no-default-features --features miniscript/no-std,hashbrown
9274
- name: Check bdk wallet
93-
working-directory: ./crates/wallet
75+
working-directory: ./wallet
9476
# TODO "--target thumbv6m-none-eabi" should work but currently does not
9577
run: cargo check --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
96-
- name: Check esplora
97-
working-directory: ./crates/esplora
98-
# TODO "--target thumbv6m-none-eabi" should work but currently does not
99-
run: cargo check --no-default-features --features bdk_chain/hashbrown
10078

10179
check-wasm:
10280
needs: prepare
@@ -124,11 +102,8 @@ jobs:
124102
- name: Rust Cache
125103
uses: Swatinem/[email protected]
126104
- name: Check bdk wallet
127-
working-directory: ./crates/wallet
105+
working-directory: ./wallet
128106
run: cargo check --target wasm32-unknown-unknown --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
129-
- name: Check esplora
130-
working-directory: ./crates/esplora
131-
run: cargo check --target wasm32-unknown-unknown --no-default-features --features bdk_core/hashbrown,async
132107

133108
fmt:
134109
needs: prepare
@@ -179,10 +154,6 @@ jobs:
179154
strategy:
180155
matrix:
181156
example-dir:
182-
- example_cli
183-
- example_bitcoind_rpc_polling
184-
- example_electrum
185-
- example_esplora
186157
- example_wallet_electrum
187158
- example_wallet_esplora_async
188159
- example_wallet_esplora_blocking
@@ -201,5 +172,5 @@ jobs:
201172
- name: Rust Cache
202173
uses: Swatinem/[email protected]
203174
- name: Build
204-
working-directory: example-crates/${{ matrix.example-dir }}
175+
working-directory: examples/${{ matrix.example-dir }}
205176
run: cargo build

Cargo.toml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
[workspace]
22
resolver = "2"
33
members = [
4-
"crates/wallet",
5-
"crates/chain",
6-
"crates/core",
7-
"crates/file_store",
8-
"crates/electrum",
9-
"crates/esplora",
10-
"crates/bitcoind_rpc",
11-
"crates/testenv",
12-
"example-crates/example_cli",
13-
"example-crates/example_electrum",
14-
"example-crates/example_esplora",
15-
"example-crates/example_bitcoind_rpc_polling",
16-
"example-crates/example_wallet_electrum",
17-
"example-crates/example_wallet_esplora_blocking",
18-
"example-crates/example_wallet_esplora_async",
19-
"example-crates/example_wallet_rpc",
4+
"wallet",
5+
"examples/example_wallet_electrum",
6+
"examples/example_wallet_esplora_blocking",
7+
"examples/example_wallet_esplora_async",
8+
"examples/example_wallet_rpc",
209
]
2110

2211
[workspace.package]

README.md

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# The Bitcoin Dev Kit
1+
# The Bitcoin Dev Kit Wallet
22

33
<div align="center">
4-
<h1>BDK</h1>
4+
<h1>BDK Wallet</h1>
55

66
<img src="./static/bdk.png" width="220" />
77

@@ -11,9 +11,9 @@
1111

1212
<p>
1313
<a href="https://crates.io/crates/bdk_wallet"><img alt="Crate Info" src="https://img.shields.io/crates/v/bdk_wallet.svg"/></a>
14-
<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-
<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-
<a href="https://coveralls.io/github/bitcoindevkit/bdk?branch=master"><img src="https://coveralls.io/repos/github/bitcoindevkit/bdk/badge.svg?branch=master"/></a>
14+
<a href="https://github.com/bitcoindevkit/bdk_wallet/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+
<a href="https://github.com/bitcoindevkit/bdk_wallet/actions?query=workflow%3ACI"><img alt="CI Status" src="https://github.com/bitcoindevkit/bdk_wallet/workflows/CI/badge.svg"></a>
16+
<a href="https://coveralls.io/github/bitcoindevkit/bdk_wallet?branch=master"><img src="https://coveralls.io/repos/github/bitcoindevkit/bdk_wallet/badge.svg?branch=master"/></a>
1717
<a href="https://docs.rs/bdk_wallet"><img alt="Wallet API Docs" src="https://img.shields.io/badge/docs.rs-bdk_wallet-green"/></a>
1818
<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>
1919
<a href="https://discord.gg/d7NkDKm"><img alt="Chat on Discord" src="https://img.shields.io/discord/753336465005608961?logo=discord"></a>
@@ -28,44 +28,30 @@
2828

2929
## About
3030

31-
The `bdk` libraries aims to provide well engineered and reviewed components for Bitcoin based applications.
31+
The `bdk_wallet` project provides a high level descriptor based wallet API for building Bitcoin applications.
3232
It is built upon the excellent [`rust-bitcoin`] and [`rust-miniscript`] crates.
3333

3434
## Architecture
3535

36-
The project is split up into several crates in the `/crates` directory:
36+
There is currently only one published crate in this repository:
3737

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.
38+
- [`wallet`](./wallet): Contains the central high level `Wallet` type that is built from the low-level mechanisms provided by the other components.
39+
40+
Crates that `bdk_wallet` depends on are found in the [`bdk`] repository.
4341

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+
Fully working examples of how to use these components are in `/examples`:
5243

44+
- [`example_wallet_esplora_blocking`](examples/example_wallet_esplora_blocking): Uses the `Wallet` to sync and spend using the Esplora blocking interface.
45+
- [`example_wallet_esplora_async`](examples/example_wallet_esplora_async): Uses the `Wallet` to sync and spend using the Esplora asynchronous interface.
46+
- [`example_wallet_electrum`](examples/example_wallet_electrum): Uses the `Wallet` to sync and spend using Electrum.
47+
48+
[`bdk`]: https://github.com/bitcoindevkit/bdk
5349
[`rust-miniscript`]: https://github.com/rust-bitcoin/rust-miniscript
5450
[`rust-bitcoin`]: https://github.com/rust-bitcoin/rust-bitcoin
55-
[`esplora-client`]: https://docs.rs/esplora-client/
56-
[`electrum-client`]: https://docs.rs/electrum-client/
57-
[`bdk_chain`]: https://docs.rs/bdk-chain/
5851

5952
## Minimum Supported Rust Version (MSRV)
60-
The BDK library maintains a MSRV of 1.63.0. This includes the following crates:
61-
62-
- `bdk_core`
63-
- `bdk_chain`
64-
- `bdk_bitcoind_rpc`.
65-
- `bdk_esplora`.
66-
- `bdk_wallet`.
6753

68-
The MSRV of `bdk_electrum` is 1.75.0.
54+
The libraries in this repository maintain a MSRV of 1.63.0.
6955

7056
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.
7157

ci/pin-msrv.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,13 @@ set -euo pipefail
1010
# cargo clean
1111
# rustup override set 1.63.0
1212

13-
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
14-
cargo update -p time --precise "0.3.20"
1513
cargo update -p home --precise "0.5.5"
16-
cargo update -p proptest --precise "1.2.0"
1714
cargo update -p url --precise "2.5.0"
1815
cargo update -p tokio --precise "1.38.1"
1916
cargo update -p tokio-util --precise "0.7.11"
2017
cargo update -p indexmap --precise "2.5.0"
2118
cargo update -p security-framework-sys --precise "2.11.1"
22-
cargo update -p csv --precise "1.3.0"
23-
cargo update -p unicode-width --precise "0.1.13"
24-
cargo update -p native-tls --precise "0.2.13"
25-
cargo update -p flate2 --precise "1.0.35"
26-
cargo update -p bzip2-sys --precise "0.1.12"
2719
cargo update -p ring --precise "0.17.12"
2820
cargo update -p once_cell --precise "1.20.3"
29-
cargo update -p base64ct --precise "1.6.0"
3021
cargo update -p minreq --precise "2.13.2"
22+
cargo update -p native-tls --precise "0.2.13"

crates/bitcoind_rpc/CHANGELOG.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

crates/bitcoind_rpc/Cargo.toml

Lines changed: 0 additions & 35 deletions
This file was deleted.

crates/bitcoind_rpc/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

crates/bitcoind_rpc/examples/README.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)