Skip to content

Commit f678165

Browse files
committed
chore: rename bdk crate to bdk_wallet
1 parent 7876c8f commit f678165

File tree

42 files changed

+273
-264
lines changed

Some content is hidden

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

42 files changed

+273
-264
lines changed

.github/workflows/cont_integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
working-directory: ./crates/chain
5959
# TODO "--target thumbv6m-none-eabi" should work but currently does not
6060
run: cargo check --no-default-features --features bitcoin/no-std,miniscript/no-std,hashbrown
61-
- name: Check bdk
62-
working-directory: ./crates/bdk
61+
- name: Check bdk wallet
62+
working-directory: ./crates/wallet
6363
# TODO "--target thumbv6m-none-eabi" should work but currently does not
6464
run: cargo check --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrown
6565
- name: Check esplora
@@ -89,8 +89,8 @@ jobs:
8989
target: "wasm32-unknown-unknown"
9090
- name: Rust Cache
9191
uses: Swatinem/[email protected]
92-
- name: Check bdk
93-
working-directory: ./crates/bdk
92+
- name: Check bdk wallet
93+
working-directory: ./crates/wallet
9494
run: cargo check --target wasm32-unknown-unknown --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrown,dev-getrandom-wasm
9595
- name: Check esplora
9696
working-directory: ./crates/esplora

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[workspace]
22
resolver = "2"
33
members = [
4-
"crates/bdk",
4+
"crates/wallet",
55
"crates/chain",
66
"crates/file_store",
77
"crates/electrum",

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
</p>
1111

1212
<p>
13-
<a href="https://crates.io/crates/bdk"><img alt="Crate Info" src="https://img.shields.io/crates/v/bdk.svg"/></a>
13+
<a href="https://crates.io/crates/bdk_wallet"><img alt="Crate Info" src="https://img.shields.io/crates/v/bdk_wallet.svg"/></a>
1414
<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>
1515
<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>
1616
<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"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bdk-green"/></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>
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>
2020
</p>
2121

2222
<h4>
2323
<a href="https://bitcoindevkit.org">Project Homepage</a>
2424
<span> | </span>
25-
<a href="https://docs.rs/bdk">Documentation</a>
25+
<a href="https://docs.rs/bdk_wallet">Documentation</a>
2626
</h4>
2727
</div>
2828

@@ -39,18 +39,18 @@ It is built upon the excellent [`rust-bitcoin`] and [`rust-miniscript`] crates.
3939

4040
The project is split up into several crates in the `/crates` directory:
4141

42-
- [`bdk`](./crates/bdk): Contains the central high level `Wallet` type that is built from the low-level mechanisms provided by the other components
42+
- [`wallet`](./crates/wallet): Contains the central high level `Wallet` type that is built from the low-level mechanisms provided by the other components
4343
- [`chain`](./crates/chain): Tools for storing and indexing chain data
4444
- [`persist`](./crates/persist): Types that define data persistence of a BDK wallet
4545
- [`file_store`](./crates/file_store): A (experimental) persistence backend for storing chain data in a single file.
4646
- [`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.
4747
- [`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.
4848

4949
Fully working examples of how to use these components are in `/example-crates`:
50-
- [`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`.
51-
- [`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` library.
52-
- [`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` library.
53-
- [`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` library.
50+
- [`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`.
51+
- [`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.
52+
- [`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.
53+
- [`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.
5454
- [`wallet_esplora_blocking`](./example-crates/wallet_esplora_blocking): Uses the `Wallet` to sync and spend using the Esplora blocking interface.
5555
- [`wallet_esplora_async`](./example-crates/wallet_esplora_async): Uses the `Wallet` to sync and spend using the Esplora asynchronous interface.
5656
- [`wallet_electrum`](./example-crates/wallet_electrum): Uses the `Wallet` to sync and spend using Electrum.

crates/hwi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ license = "MIT OR Apache-2.0"
99
readme = "README.md"
1010

1111
[dependencies]
12-
bdk = { path = "../bdk" }
12+
bdk_wallet = { path = "../wallet" }
1313
hwi = { version = "0.8.0", features = [ "miniscript"] }

crates/hwi/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
//! This crate contains HWISigner, an implementation of a [`TransactionSigner`] to be
44
//! used with hardware wallets.
55
//! ```no_run
6-
//! # use bdk::bitcoin::Network;
7-
//! # use bdk::signer::SignerOrdering;
6+
//! # use bdk_wallet::bitcoin::Network;
7+
//! # use bdk_wallet::signer::SignerOrdering;
88
//! # use bdk_hwi::HWISigner;
9-
//! # use bdk::{KeychainKind, SignOptions, Wallet};
9+
//! # use bdk_wallet::{KeychainKind, SignOptions, Wallet};
1010
//! # use hwi::HWIClient;
1111
//! # use std::sync::Arc;
1212
//! #
@@ -35,7 +35,7 @@
3535
//! # }
3636
//! ```
3737
//!
38-
//! [`TransactionSigner`]: bdk::wallet::signer::TransactionSigner
38+
//! [`TransactionSigner`]: bdk_wallet::wallet::signer::TransactionSigner
3939
4040
mod signer;
4141
pub use signer::*;

crates/hwi/src/signer.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use bdk::bitcoin::bip32::Fingerprint;
2-
use bdk::bitcoin::secp256k1::{All, Secp256k1};
3-
use bdk::bitcoin::Psbt;
1+
use bdk_wallet::bitcoin::bip32::Fingerprint;
2+
use bdk_wallet::bitcoin::secp256k1::{All, Secp256k1};
3+
use bdk_wallet::bitcoin::Psbt;
44

55
use hwi::error::Error;
66
use hwi::types::{HWIChain, HWIDevice};
77
use hwi::HWIClient;
88

9-
use bdk::signer::{SignerCommon, SignerError, SignerId, TransactionSigner};
9+
use bdk_wallet::signer::{SignerCommon, SignerError, SignerId, TransactionSigner};
1010

1111
#[derive(Debug)]
1212
/// Custom signer for Hardware Wallets
@@ -38,7 +38,7 @@ impl TransactionSigner for HWISigner {
3838
fn sign_transaction(
3939
&self,
4040
psbt: &mut Psbt,
41-
_sign_options: &bdk::SignOptions,
41+
_sign_options: &bdk_wallet::SignOptions,
4242
_secp: &Secp256k1<All>,
4343
) -> Result<(), SignerError> {
4444
psbt.combine(
@@ -61,9 +61,9 @@ impl TransactionSigner for HWISigner {
6161
// fn test_hardware_signer() {
6262
// use std::sync::Arc;
6363
//
64-
// use bdk::tests::get_funded_wallet;
65-
// use bdk::signer::SignerOrdering;
66-
// use bdk::bitcoin::Network;
64+
// use bdk_wallet::tests::get_funded_wallet;
65+
// use bdk_wallet::signer::SignerOrdering;
66+
// use bdk_wallet::bitcoin::Network;
6767
// use crate::HWISigner;
6868
// use hwi::HWIClient;
6969
//
@@ -78,12 +78,12 @@ impl TransactionSigner for HWISigner {
7878
//
7979
// let (mut wallet, _) = get_funded_wallet(&descriptors.internal[0]);
8080
// wallet.add_signer(
81-
// bdk::KeychainKind::External,
81+
// bdk_wallet::KeychainKind::External,
8282
// SignerOrdering(200),
8383
// Arc::new(custom_signer),
8484
// );
8585
//
86-
// let addr = wallet.get_address(bdk::wallet::AddressIndex::LastUnused);
86+
// let addr = wallet.get_address(bdk_wallet::wallet::AddressIndex::LastUnused);
8787
// let mut builder = wallet.build_tx();
8888
// builder.drain_to(addr.script_pubkey()).drain_wallet();
8989
// let (mut psbt, _) = builder.finish().unwrap();

crates/bdk/Cargo.toml renamed to crates/wallet/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "bdk"
2+
name = "bdk_wallet"
33
homepage = "https://bitcoindevkit.org"
44
version = "1.0.0-alpha.11"
55
repository = "https://github.com/bitcoindevkit/bdk"

crates/bdk/README.md renamed to crates/wallet/README.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88
</p>
99

1010
<p>
11-
<a href="https://crates.io/crates/bdk"><img alt="Crate Info" src="https://img.shields.io/crates/v/bdk.svg"/></a>
11+
<a href="https://crates.io/crates/bdk_wallet"><img alt="Crate Info" src="https://img.shields.io/crates/v/bdk_wallet.svg"/></a>
1212
<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>
1313
<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>
1414
<a href="https://coveralls.io/github/bitcoindevkit/bdk?branch=master"><img src="https://coveralls.io/repos/github/bitcoindevkit/bdk/badge.svg?branch=master"/></a>
15-
<a href="https://docs.rs/bdk"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bdk-green"/></a>
15+
<a href="https://docs.rs/bdk_wallet"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bdk_wallet-green"/></a>
1616
<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>
1717
<a href="https://discord.gg/d7NkDKm"><img alt="Chat on Discord" src="https://img.shields.io/discord/753336465005608961?logo=discord"></a>
1818
</p>
1919

2020
<h4>
2121
<a href="https://bitcoindevkit.org">Project Homepage</a>
2222
<span> | </span>
23-
<a href="https://docs.rs/bdk">Documentation</a>
23+
<a href="https://docs.rs/bdk_wallet">Documentation</a>
2424
</h4>
2525
</div>
2626

27-
## `bdk`
27+
# BDK Wallet
2828

29-
The `bdk` crate provides the [`Wallet`] type which is a simple, high-level
29+
The `bdk_wallet` crate provides the [`Wallet`] type which is a simple, high-level
3030
interface built from the low-level components of [`bdk_chain`]. `Wallet` is a good starting point
3131
for many simple applications as well as a good demonstration of how to use the other mechanisms to
3232
construct a wallet. It has two keychains (external and internal) which are defined by
@@ -36,7 +36,7 @@ can create and sign transactions.
3636

3737
For details about the API of `Wallet` see the [module-level documentation][`Wallet`].
3838

39-
### Blockchain data
39+
## Blockchain data
4040

4141
In order to get blockchain data for `Wallet` to consume, you should configure a client from
4242
an available chain source. Typically you make a request to the chain source and get a response
@@ -55,7 +55,7 @@ that the `Wallet` can use to update its view of the chain.
5555
* [`example-crates/wallet_electrum`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates/wallet_electrum)
5656
* [`example-crates/wallet_rpc`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates/wallet_rpc)
5757

58-
### Persistence
58+
## Persistence
5959

6060
To persist the `Wallet` on disk, it must be constructed with a [`PersistBackend`] implementation.
6161

@@ -67,7 +67,7 @@ To persist the `Wallet` on disk, it must be constructed with a [`PersistBackend`
6767

6868
<!-- compile_fail because outpoint and txout are fake variables -->
6969
```rust,compile_fail
70-
use bdk::{bitcoin::Network, wallet::{ChangeSet, Wallet}};
70+
use bdk_wallet::{bitcoin::Network, wallet::{ChangeSet, Wallet}};
7171
7272
fn main() {
7373
// Create a new file `Store`.
@@ -85,13 +85,13 @@ fn main() {
8585
<!-- ### Sync the balance of a descriptor -->
8686

8787
<!-- ```rust,no_run -->
88-
<!-- use bdk::Wallet; -->
89-
<!-- use bdk::blockchain::ElectrumBlockchain; -->
90-
<!-- use bdk::SyncOptions; -->
91-
<!-- use bdk::electrum_client::Client; -->
92-
<!-- use bdk::bitcoin::Network; -->
88+
<!-- use bdk_wallet::Wallet; -->
89+
<!-- use bdk_wallet::blockchain::ElectrumBlockchain; -->
90+
<!-- use bdk_wallet::SyncOptions; -->
91+
<!-- use bdk_wallet::electrum_client::Client; -->
92+
<!-- use bdk_wallet::bitcoin::Network; -->
9393

94-
<!-- fn main() -> Result<(), bdk::Error> { -->
94+
<!-- fn main() -> Result<(), bdk_wallet::Error> { -->
9595
<!-- let blockchain = ElectrumBlockchain::from(Client::new("ssl://electrum.blockstream.info:60002")?); -->
9696
<!-- let wallet = Wallet::new( -->
9797
<!-- "wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)", -->
@@ -109,11 +109,11 @@ fn main() {
109109
<!-- ### Generate a few addresses -->
110110

111111
<!-- ```rust -->
112-
<!-- use bdk::Wallet; -->
113-
<!-- use bdk::wallet::AddressIndex::New; -->
114-
<!-- use bdk::bitcoin::Network; -->
112+
<!-- use bdk_wallet::Wallet; -->
113+
<!-- use bdk_wallet::wallet::AddressIndex::New; -->
114+
<!-- use bdk_wallet::bitcoin::Network; -->
115115

116-
<!-- fn main() -> Result<(), bdk::Error> { -->
116+
<!-- fn main() -> Result<(), bdk_wallet::Error> { -->
117117
<!-- let wallet = Wallet::new_no_persist( -->
118118
<!-- "wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)", -->
119119
<!-- Some("wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/1/*)"), -->
@@ -131,17 +131,17 @@ fn main() {
131131
<!-- ### Create a transaction -->
132132

133133
<!-- ```rust,no_run -->
134-
<!-- use bdk::{FeeRate, Wallet, SyncOptions}; -->
135-
<!-- use bdk::blockchain::ElectrumBlockchain; -->
134+
<!-- use bdk_wallet::{FeeRate, Wallet, SyncOptions}; -->
135+
<!-- use bdk_wallet::blockchain::ElectrumBlockchain; -->
136136

137-
<!-- use bdk::electrum_client::Client; -->
138-
<!-- use bdk::wallet::AddressIndex::New; -->
137+
<!-- use bdk_wallet::electrum_client::Client; -->
138+
<!-- use bdk_wallet::wallet::AddressIndex::New; -->
139139

140140
<!-- use bitcoin::base64; -->
141-
<!-- use bdk::bitcoin::consensus::serialize; -->
142-
<!-- use bdk::bitcoin::Network; -->
141+
<!-- use bdk_wallet::bitcoin::consensus::serialize; -->
142+
<!-- use bdk_wallet::bitcoin::Network; -->
143143

144-
<!-- fn main() -> Result<(), bdk::Error> { -->
144+
<!-- fn main() -> Result<(), bdk_wallet::Error> { -->
145145
<!-- let blockchain = ElectrumBlockchain::from(Client::new("ssl://electrum.blockstream.info:60002")?); -->
146146
<!-- let wallet = Wallet::new_no_persist( -->
147147
<!-- "wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)", -->
@@ -172,13 +172,13 @@ fn main() {
172172
<!-- ### Sign a transaction -->
173173

174174
<!-- ```rust,no_run -->
175-
<!-- use bdk::{Wallet, SignOptions}; -->
175+
<!-- use bdk_wallet::{Wallet, SignOptions}; -->
176176

177177
<!-- use bitcoin::base64; -->
178-
<!-- use bdk::bitcoin::consensus::deserialize; -->
179-
<!-- use bdk::bitcoin::Network; -->
178+
<!-- use bdk_wallet::bitcoin::consensus::deserialize; -->
179+
<!-- use bdk_wallet::bitcoin::Network; -->
180180

181-
<!-- fn main() -> Result<(), bdk::Error> { -->
181+
<!-- fn main() -> Result<(), bdk_wallet::Error> { -->
182182
<!-- let wallet = Wallet::new_no_persist( -->
183183
<!-- "wpkh([c258d2e4/84h/1h/0h]tprv8griRPhA7342zfRyB6CqeKF8CJDXYu5pgnj1cjL1u2ngKcJha5jjTRimG82ABzJQ4MQe71CV54xfn25BbhCNfEGGJZnxvCDQCd6JkbvxW6h/0/*)", -->
184184
<!-- Some("wpkh([c258d2e4/84h/1h/0h]tprv8griRPhA7342zfRyB6CqeKF8CJDXYu5pgnj1cjL1u2ngKcJha5jjTRimG82ABzJQ4MQe71CV54xfn25BbhCNfEGGJZnxvCDQCd6JkbvxW6h/1/*)"), -->
@@ -202,7 +202,7 @@ fn main() {
202202
cargo test
203203
```
204204

205-
## License
205+
# License
206206

207207
Licensed under either of
208208

@@ -211,15 +211,15 @@ Licensed under either of
211211

212212
at your option.
213213

214-
### Contribution
214+
# Contribution
215215

216216
Unless you explicitly state otherwise, any contribution intentionally
217217
submitted for inclusion in the work by you, as defined in the Apache-2.0
218218
license, shall be dual licensed as above, without any additional terms or
219219
conditions.
220220

221-
[`Wallet`]: https://docs.rs/bdk/1.0.0-alpha.7/bdk/wallet/struct.Wallet.html
222-
[`PersistBackend`]: https://docs.rs/bdk_persist/latest/bdk_persist/trait.PersistBackend.html
221+
[`Wallet`]: https://docs.rs/bdk_wallet/latest/bdk_wallet/wallet/struct.Wallet.html
222+
[`PersistBackend`]: https://docs.rs/bdk_chain/latest/bdk_chain/trait.PersistBackend.html
223223
[`bdk_chain`]: https://docs.rs/bdk_chain/latest
224224
[`bdk_file_store`]: https://docs.rs/bdk_file_store/latest
225225
[`bdk_electrum`]: https://docs.rs/bdk_electrum/latest

crates/bdk/examples/compiler.rs renamed to crates/wallet/examples/compiler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// You may not use this file except in accordance with one or both of these
1010
// licenses.
1111

12-
extern crate bdk;
12+
extern crate bdk_wallet;
1313
extern crate bitcoin;
1414
extern crate miniscript;
1515
extern crate serde_json;
@@ -21,7 +21,7 @@ use bitcoin::Network;
2121
use miniscript::policy::Concrete;
2222
use miniscript::Descriptor;
2323

24-
use bdk::{KeychainKind, Wallet};
24+
use bdk_wallet::{KeychainKind, Wallet};
2525

2626
/// Miniscript policy is a high level abstraction of spending conditions. Defined in the
2727
/// rust-miniscript library here https://docs.rs/miniscript/7.0.0/miniscript/policy/index.html

crates/bdk/examples/mnemonic_to_descriptors.rs renamed to crates/wallet/examples/mnemonic_to_descriptors.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
// licenses.
88

99
use anyhow::anyhow;
10-
use bdk::bitcoin::bip32::DerivationPath;
11-
use bdk::bitcoin::secp256k1::Secp256k1;
12-
use bdk::bitcoin::Network;
13-
use bdk::descriptor;
14-
use bdk::descriptor::IntoWalletDescriptor;
15-
use bdk::keys::bip39::{Language, Mnemonic, WordCount};
16-
use bdk::keys::{GeneratableKey, GeneratedKey};
17-
use bdk::miniscript::Tap;
10+
use bdk_wallet::bitcoin::bip32::DerivationPath;
11+
use bdk_wallet::bitcoin::secp256k1::Secp256k1;
12+
use bdk_wallet::bitcoin::Network;
13+
use bdk_wallet::descriptor;
14+
use bdk_wallet::descriptor::IntoWalletDescriptor;
15+
use bdk_wallet::keys::bip39::{Language, Mnemonic, WordCount};
16+
use bdk_wallet::keys::{GeneratableKey, GeneratedKey};
17+
use bdk_wallet::miniscript::Tap;
1818
use std::str::FromStr;
1919

2020
/// This example demonstrates how to generate a mnemonic phrase

0 commit comments

Comments
 (0)