]> Untitled Git - bdk-cli/commitdiff
Make repl and electrum default features
authorRiccardo Casatta <riccardo@casatta.it>
Wed, 10 Mar 2021 13:43:46 +0000 (14:43 +0100)
committerRiccardo Casatta <riccardo@casatta.it>
Mon, 15 Mar 2021 09:42:24 +0000 (10:42 +0100)
CHANGELOG.md
Cargo.toml
README.md

index 6645b0f1335c388828f1b9b14c640427e35ba994..48f6d69b2fe1098085457ce459c5856b12a321cb 100644 (file)
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 #### Added
 - `CliSubCommand::Compile` enum variant and `handle_compile_subcommand()` function
+- Make repl and electrum default features
 
 ### `bdk-cli` bin
 
index c18da81e1ac2a3d0b6d7da771bb5aa9ea8492721..cff03dcd0a692be25164b9910f96621e9ae01a53 100644 (file)
@@ -27,7 +27,7 @@ clap = { version = "2.33", optional = true }
 regex = {version = "1", optional = true }
 
 [features]
-default = []
+default = ["repl", "electrum"]
 repl = ["bdk/key-value-db", "clap", "dirs-next", "env_logger", "regex", "rustyline"]
 electrum = ["bdk/electrum"]
 esplora = ["bdk/esplora"]
index e5d4886bfdd54e658055d2e9ad5b3c44d0622097..ae506bb43facbc23643d9e7483d84aef7ac75442 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,32 +14,38 @@ To get usage information for the `bdk-cli` bin use the below command which retur
 available wallet options and commands:
 
 ```shell
-cargo run --features repl,electrum
+cargo run
 ```
 
 To sync a wallet to the default electrum server:
 
 ```shell
-cargo run --features repl,electrum,esplora -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" sync
+cargo run -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" sync
 ```
 
 To get a wallet balance with customized logging:
 
 ```shell
-RUST_LOG=debug,sled=info,rustls=info cargo run --features repl,electrum,esplora -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" get_balance
+RUST_LOG=debug,sled=info,rustls=info cargo run -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" get_balance
 ```
 
 To generate a new extended master key, suitable for using in a descriptor:
 
 ```shell
-cargo run --features repl,electrum -- key generate
+cargo run -- key generate
 ```
 
 To install dev version of `bdk-cli` from local git repo:
 
 ```shell
 cd <bdk-cli git repo directory>
-cargo install --path . --features repl,electrum,esplora
+cargo install --path .
 
 bdk-cli help # to verify it worked
-```
\ No newline at end of file
+```
+
+By default an electrum backend is used, to use esplora instead the relative feature must be enabled and the esplora address must be specified. Note we are enabling logs to see the calls to esplora.
+
+```shell
+RUST_LOG=debug cargo run --features esplora -- wallet -e https://blockstream.info/api/ --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" sync
+```