spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.32k stars 3.05k forks source link

Plugins that add command-line commands #1814

Open doc-hex opened 8 years ago

doc-hex commented 8 years ago

I'd like to make a plugin that defines a new command-line command. At this point, that doesn't seem possible, and existing plugins are only adding support for hardware wallets so they can interact with standard command-line commands.

Challenges include:

My proposed changes (which I would make and submit as a PR for further review):

step 1:

step 2A:

OR a different approach: step 2B:

From my point of view, approach 2A is better, but 2B is more general purpose and flexible. The only real difference is that 2A is "more objected oriented".

What do you think of these changes? Other ideas?

doc-hex commented 8 years ago

Just had a much better idea, call it Option 3:

ecdsa commented 8 years ago

why not add a hook in the command line parser?