This project provides a command line interface (cli) Bitcoin wallet library and REPL
wallet tool based on the bdk library.
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