You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-31Lines changed: 54 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -31,37 +31,50 @@ This project provides a command-line Bitcoin wallet application using the latest
31
31
And yes, it can do Taproot!!
32
32
33
33
This crate can be used for the following purposes:
34
-
- Instantly create a miniscript based wallet and connect to your backend of choice (Electrum, Esplora, Core RPC, etc) and quickly play around with your own complex bitcoin scripting workflow. With one or many wallets, connected with one or many backends.
35
-
- The `tests/integration.rs` module is used to document high level complex workflows between BDK and different Bitcoin infrastructure systems, like Core, Electrum and Lightning(soon TM).
36
-
- (Planned) Expose the basic command handler via `wasm` to integrate `bdk-cli` functionality natively into the web platform. See also the [playground](https://bitcoindevkit.org/bdk-cli/playground/) page.
34
+
35
+
- Instantly create a miniscript based wallet and connect to your backend of choice (Electrum, Esplora, Core RPC, etc) and quickly play around with your own complex bitcoin scripting workflow. With one or many wallets, connected with one or many backends.
36
+
- The `tests/integration.rs` module is used to document high level complex workflows between BDK and different Bitcoin infrastructure systems, like Core, Electrum and Lightning(soon TM).
37
+
- (Planned) Expose the basic command handler via `wasm` to integrate `bdk-cli` functionality natively into the web platform. See also the [playground](https://bitcoindevkit.org/bdk-cli/playground/) page.
37
38
38
39
If you are considering using BDK in your own wallet project bdk-cli is a nice playground to get started with. It allows easy testnet and regtest wallet operations, to try out what's possible with descriptors, miniscript, and BDK APIs. For more information on BDK refer to the [website](https://bitcoindevkit.org/) and the [rust docs](https://docs.rs/bdk/latest/bdk/index.html)
39
40
40
-
bdk-cli can be compiled with different features to suit your experimental needs.
41
-
- Database Options
42
-
-`key-value-db` : Sets the wallet database to a `sled` db.
43
-
-`sqlite-db` : Sets the wallet database to a `sqlite3` db.
44
-
- Blockchain Options
45
-
-`rpc` : Connects the wallet to bitcoin core via RPC.
46
-
-`electrum` : Connects the wallet to an electrum server.
47
-
-`esplora-ureq` or `esplora-reqwest` : Connects the wallet to an esplora server synchronously or asynchronously.
48
-
- Extra Utility Tools
49
-
-`repl` : use bdk-cli as a [REPL](https://codewith.mu/en/tutorials/1.0/repl) shell (useful for quick manual testing of wallet operations).
50
-
-`compiler` : opens up bdk-cli policy compiler commands.
51
-
-`verify` : uses `bitcoinconsensus` to verify transactions at every `sync` call of the wallet.
52
-
-`reserves` : opens up bdk-cli **Proof of Reserves** operation commands using the [bdk-reserves plugin](https://github.com/bitcoindevkit/bdk-reserves). (requires the `electrum` feature)
53
-
- Automated Node Backend
54
-
-`regtest-bitcoin` : Auto deploys a regtest `bitcoind` node, connects the wallet, and exposes core rpc commands via `bdk-cli node` subcommands.
55
-
-`regtest-electrum` : Auto deploys `electrsd` and connected `bitcoind` nodes, exposes core rpc commands via `bdk-cli node` and provides a wallet connected to the local `electrsd`.
56
-
57
-
The `default` feature set is `repl` and `sqlite-db`. With the `default` features, `bdk-cli`can be used as an **air-gapped** wallet, and can do everything that doesn't require a network connection.
41
+
`bdk-cli` can be [compiled from source](#from-source) or [installed from crates.io](#from-crates) with different features to suit your experimental needs.
42
+
43
+
### Features:
44
+
45
+
- Database
46
+
- `key-value-db` : Sets the wallet database to a `sled` db.
47
+
- `sqlite-db` : Sets the wallet database to a `sqlite3` db.
48
+
49
+
- Blockchain
50
+
- `rpc` : Connects the wallet to bitcoin core via RPC.
51
+
- `electrum` : Connects the wallet to an electrum server.
52
+
- `esplora-ureq` or `esplora-reqwest` : Connects the wallet to an esplora server synchronously or asynchronously.
53
+
54
+
### Additional Features:
55
+
56
+
-`repl` : use `bdk-cli` as a [REPL](https://codewith.mu/en/tutorials/1.0/repl) shell (useful for quick manual testing of wallet operations).
57
+
58
+
-`compiler` : opens up `bdk-cli`policy compiler commands.
58
59
60
+
-`verify` : uses `bitcoinconsensus` to verify transactions at every `sync` call of the wallet.
61
+
62
+
-`reserves` : opens up `bdk-cli`**Proof of Reserves** operation commands using the [bdk-reserves plugin](https://github.com/bitcoindevkit/bdk-reserves). (requires the `electrum` feature)
63
+
64
+
- Automated Node Backend
65
+
- `regtest-bitcoin` : Auto deploys a regtest `bitcoind` node, connects the wallet, and exposes core rpc commands via `bdk-cli node` subcommands.
66
+
- `regtest-electrum` : Auto deploys `electrsd` and connected `bitcoind` nodes, exposes core rpc commands via `bdk-cli node` and provides a wallet connected to the local `electrsd`.
67
+
68
+
69
+
_Note: The `default` feature set is `repl` and `sqlite-db` and enables `bdk-cli` to be used as an **air-gapped** wallet, and doesn't require a network connection._
59
70
60
71
## Install bdk-cli
61
-
### From source
72
+
73
+
### <aname="from-source"></a>From source
74
+
62
75
To install a dev version of `bdk-cli` from a local git repo with the `electrum` blockchain client enabled:
63
76
64
-
```shell
77
+
```sh
65
78
cd<bdk-cli git repo directory>
66
79
cargo install --path . --features electrum
67
80
bdk-cli help# to verify it worked
@@ -72,50 +85,56 @@ disabled. To enable these commands a blockchain client feature such as `electrum
72
85
blockchain client feature must be enabled. Below is an example of how to run the `bdk-cli` binary with
73
86
the `esplora-ureq` blockchain client feature.
74
87
75
-
```shell
88
+
```sh
76
89
RUST_LOG=debug cargo run --features esplora-ureq -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" sync
77
90
```
78
91
79
92
At most one blockchain feature can be enabled, available blockchain client features are:
80
93
`electrum`, `esplora-ureq` (blocking), `esplora-reqwest` (async) and `rpc`.
81
94
82
-
### From crates.io
95
+
### <aname="from-crates"></a>From crates.io
96
+
83
97
You can install the binary for the latest tag of `bdk-cli` with online wallet features
84
98
directly from [crates.io](https://crates.io/crates/bdk-cli) with a command as below:
0 commit comments