bdk-cli icon indicating copy to clipboard operation
bdk-cli copied to clipboard

Add "init" wallet support

Open notmandatory opened this issue 7 months ago • 2 comments

Describe the enhancement

Currently all parameters need to be specified in env variables or as cli options for every request. With so many options this is hard to setup and use. It would be nice if a user could "initialize" a wallet name with all the parameters they need, such as descriptors, network, db, server, etc.

Maybe this could be done with Justfile that set the env variables, in a toml file, or in some sort of db file.

Use case

I want to initialize a Testnet wallet with two descriptors, a sqlite db file, and local regtest server url and authentication. Id like to store all these parameters once with my wallet name and then use them every time I specify that wallet name.

Additional context

Something like this is done with the bdk cli examples: https://github.com/bitcoindevkit/bdk/blob/542f9675c0716dfc5b4f3ab4e5320702e9f07a37/examples/example_cli/src/lib.rs#L72

notmandatory avatar May 28 '25 04:05 notmandatory

I did something similar in bdk-sp but using example_electrum from bitcoindevkit/bdk/examples, maybe is worth as inspiration: https://github.com/bitcoindevkit/bdk-sp/blob/develop/example-crates/justfile#L428

nymius avatar Jun 17 '25 14:06 nymius

I did something similar in bdk-sp but using example_electrum from bitcoindevkit/bdk/examples, maybe is worth as inspiration: https://github.com/bitcoindevkit/bdk-sp/blob/develop/example-crates/justfile#L428

Thank you @nymius. I will take a look.

tvpeter avatar Jun 17 '25 14:06 tvpeter