#bitcoin #wallet #descriptor #psbt

bin+lib bdk-cli

A CLI library and example CLI tool based on the BDK descriptor-based wallet library

2 unstable releases

0.2.0 Feb 26, 2021
0.1.0 Jan 8, 2021

#534 in Magic Beans

MIT license


bdk-cli lib and example bin tool

CI Code Coverage


This project provides a command line interface (cli) Bitcoin wallet library and REPL wallet tool based on the bdk library.

bdk-cli bin usage examples

To get usage information for the bdk-cli bin use the below command which returns a list of available wallet options and commands:

cargo run --features repl,electrum

To sync a wallet to the default electrum server:

cargo run --features repl,electrum,esplora -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" sync

To get a wallet balance with customized logging:

RUST_LOG=debug,sled=info,rustls=info cargo run --features repl,electrum,esplora -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" get_balance

To generate a new extended master key, suitable for using in a descriptor:

cargo run --features repl,electrum -- key generate

To install dev version of bdk-cli from local git repo:

cd <bdk-cli git repo directory>
cargo install --path . --features repl,electrum,esplora

bdk-cli help # to verify it worked


~228K SLoC