bitcoindevkit / bdk-cli

A CLI wallet library and REPL tool to demo and test the BDK library
Other
111 stars 65 forks source link

Upgrade for bdk v0.17.0 #81

Closed rajarshimaitra closed 2 years ago

rajarshimaitra commented 2 years ago

In light of https://github.com/bitcoindevkit/bdk/pull/535, I feel the cli code can be optimized a lot. We can remove the OnlineWalletSubcommand and OfflineWalletSubcommand, as there is now no distinction between online and offline wallets. All wallets are offline and we only need a blockchian when we want to sync and broadcast..

This needs to be done before other open PRs can be merged or else it might cause rework on them.

So opening up this issue for approach discussion. Whats the best way structure bdk-cli after the big bdk change? Or should the same structure be kept as it is and adopt with minimal changes?

notmandatory commented 2 years ago

I think the basic options and commands will look the same since we already only enable online commands when a blockchain feature is turned on. But I agree this is a high priority to update to the new bdk API.

kirillzh commented 2 years ago

Could we also add verify feature? Getting this error right now when trying to install bdk-cli binary:

$ cargo install bdk-cli --features repl,electrum,compiler,verify

Package `bdk-cli v0.4.0` does not have the feature `verify` 
rajarshimaitra commented 2 years ago

Could we also add verify feature? Getting this error right now when trying to install bdk-cli binary:

Yes currently bdk-cli doesn't expose the verify function. Do you think that is useful? I am curious to know your use case for transaction verification. In general if your wallet is connected to a backend node, the node verifies the transaction by itself and then provides it to the wallet.

notmandatory commented 2 years ago

I've added a bdk-cli verify feature in #73