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
+44-19Lines changed: 44 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -38,35 +38,46 @@ This crate can be used for the following purposes:
38
38
39
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)
40
40
41
-
`bdk-cli` can be compiled with different features to suit your experimental needs.
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
42
43
-
- Database Options
43
+
### Features:
44
+
45
+
- Database
44
46
- `key-value-db` : Sets the wallet database to a `sled` db.
45
47
- `sqlite-db` : Sets the wallet database to a `sqlite3` db.
46
48
47
-
- Blockchain Options
49
+
- Blockchain
48
50
- `rpc` : Connects the wallet to bitcoin core via RPC.
49
51
- `electrum` : Connects the wallet to an electrum server.
50
52
- `esplora-ureq` or `esplora-reqwest` : Connects the wallet to an esplora server synchronously or asynchronously.
51
53
52
-
- Extra Utility Tools
53
-
- `repl` : use `bdk-cli` as a [REPL](https://codewith.mu/en/tutorials/1.0/repl) shell (useful for quick manual testing of wallet operations).
54
-
- `compiler` : opens up `bdk-cli` policy compiler commands.
55
-
- `verify` : uses `bitcoinconsensus` to verify transactions at every `sync` call of the wallet.
56
-
- `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)
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.
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)
57
63
58
64
- Automated Node Backend
59
65
- `regtest-bitcoin` : Auto deploys a regtest `bitcoind` node, connects the wallet, and exposes core rpc commands via `bdk-cli node` subcommands.
60
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`.
61
67
62
-
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.
68
+
---
69
+
70
+
##### 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.
63
71
72
+
---
64
73
65
74
## Install bdk-cli
66
-
### From source
75
+
76
+
### <aname="from-source"></a>From source
77
+
67
78
To install a dev version of `bdk-cli` from a local git repo with the `electrum` blockchain client enabled:
68
79
69
-
```shell
80
+
```sh
70
81
cd<bdk-cli git repo directory>
71
82
cargo install --path . --features electrum
72
83
bdk-cli help# to verify it worked
@@ -77,50 +88,56 @@ disabled. To enable these commands a blockchain client feature such as `electrum
77
88
blockchain client feature must be enabled. Below is an example of how to run the `bdk-cli` binary with
78
89
the `esplora-ureq` blockchain client feature.
79
90
80
-
```shell
91
+
```sh
81
92
RUST_LOG=debug cargo run --features esplora-ureq -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" sync
82
93
```
83
94
84
95
At most one blockchain feature can be enabled, available blockchain client features are:
85
96
`electrum`, `esplora-ureq` (blocking), `esplora-reqwest` (async) and `rpc`.
86
97
87
-
### From crates.io
98
+
### <aname="from-crates"></a>From crates.io
99
+
88
100
You can install the binary for the latest tag of `bdk-cli` with online wallet features
89
101
directly from [crates.io](https://crates.io/crates/bdk-cli) with a command as below:
0 commit comments