bitcoinj icon indicating copy to clipboard operation
bitcoinj copied to clipboard

Wallettool: subcommand methods

Open ItoroD opened this issue 8 months ago • 3 comments

This PR is an attempt to show the usage of subcommands in wallettool. I have been able to migrate dump, create, and current-receive-addr to subcommands. Currently we can run the commands like this:

wallettool --wallet=<myWalletPath> --net=<myNetwork> --dump-privkeys dump

My next step is to be able to pass specific options to the subcommand that need those options. Those options should no longer be global but specific to the particular subcommand. So that we can have something like.

wallettool --wallet=<myWalletPath> --net=<myNetwork> dump --dump-privkeys

This can easily be done. But before I do I want to take my time to note what options should be global and what options should be local. (by global I mean after main command wallettool and local after subcommand dump, create...

I am also aware that the changes to these will mean updating the tests as well.

ItoroD avatar Apr 12 '25 17:04 ItoroD

I looked at the first two commits in this series. I think we can merge the first 776a498389139a30cfb4c45f56944cdd42903bf3 right away, if so desired.

schildbach avatar Apr 13 '25 11:04 schildbach

I looked at the first two commits in this series. I think we can merge the first 776a498 right away, if so desired.

yes please

ItoroD avatar Apr 13 '25 12:04 ItoroD

I looked at the first two commits in this series. I think we can merge the first 776a498 right away, if so desired.

I have done seperate PR here for the initial comment

ItoroD avatar Apr 15 '25 13:04 ItoroD