spesmilo / electrum

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

Man Page #8542

Open sorenstoutner opened 11 months ago

sorenstoutner commented 11 months ago

I am writing a Man Page for Electrum, which is the primary documentation format used on Debian systems.

https://en.wikipedia.org/wiki/Man_page

I was able to get most of the information I needed from the excellent help commands. But there are a few things that aren't clear to me.

  1. What are the possible arguments for the -v VERBOSTIY global option? I am used to using log levels between 0-7, but trying any of those numbers produces an error.
  2. What are the possible arguments for the -V VERBOSITY global option? It says it should be a shortcut-filter list, but I wasn't able to find any documentation of what that is.
  3. Is electrum gui -g text expected to work? On my machine, I receive an error saying that the paperclip module is missing.
  4. electrum gui -L es_ES does not appear to do anything, as Electrum is still launched in English. However, the -L option does work as expected with the make_seed command.
  5. electrum gui -m, which is supposed to hide the GUI on startup, does not appear to work. Electrum launches but isn't hidden. Am I missing something from the syntax?
  6. I assume that clear_ln_blacklist clears the Lightning blacklist. Is that correct?
  7. convert_xkey lists an example of xpub -> ypub. Are there any other types of keys beyond these two?
  8. --seed_type lists standard and segwit as possible options. Are there any other options? Which is the default if none is specified?
  9. Does createmultisig create a MultiSig address or a MultiSig wallet? The documentation in Electrum says MultiSig address, but all the general Bitcoin information I found online only talks about MultiSig wallets. What are the possible values for the num argument? What is the syntax (delimiter) for using multiple public keys?
  10. What does dumpgraph do?
  11. How is get_ssl_domain used? It returns blank for me, and it is unclear to me what ssl_keyfile and ssl_certificate it is using.
  12. What are the possible fee methods that can be passed to electrum getfeerate --fee_method FEE_METHOD?
  13. What is the syntax for passing a list of wallet addresses to getprivatekeys? All of the variations I tried produced errors.
  14. What is the syntax for passing a list of private keys to signtransaction_with_privkey?
  15. How is inject_fees used?
  16. Is there a specific syntax for searchcontacts or does it just simply match partial strings?
  17. Is there a list of configuration variables that can be set with setconfig?

For those who are interested, I have attached the current draft of the Man Page (the system doesn't like the .1 extension, so there is an extra .txt at the end). As a side note, I would be happy to contribute the Man Page to the Electrum project if desired. Otherwise, I can maintain it in the Debian packaging.

electrum.1.txt

ecdsa commented 11 months ago

Thanks for tackling this project! I think we could use this opportunity to cleanup a few things in the command line. There is quite some old cruft there.

2: The -v VERBOSITY options are not really useful; I designed that in order to keep things under control, given the inflation of logging messages. However, it makes the whole thing more complicated than necessary, and I think it was a mistake. We should try to simplify that.

3: Various GUIs have different requirements. We do not require the paperclip module in order to install electrum. Also, the text GUI is incomplete, it does not have an install wizard. ( @accumulator )

6: clear_ln_blacklist was added for testing. Not sure if still used.

10: dumpgraph was added for testing. Not sure if still used.

15: inject_fees was added for testing. Not sure if still used.

17: We recently restructured config variables, and they are now listed in simple_config.py (they used to be scattered around in the code). Maybe we could pass a helpstring to ConfigVar, and make it visible from command line

accumulator commented 11 months ago

3: Various GUIs have different requirements. We do not require the paperclip module in order to install electrum. Also, the text GUI is incomplete, it does not have an install wizard. ( @accumulator )

The text GUI is not really useful atm. It's undocumented (AFAICS), some menu options are unreachable, history doesn't scroll etc. Also, I was able to quite easily trigger a crash.

Do we want to prioritize implementing the new wallet wizard for this gui? I think it needs a bigger overhaul if we decide to allocate time here.

ecdsa commented 11 months ago

@accumulator we do not want to keep having two separate wizards for Qt and QML for too long. The new wizard was added under the agreement that it would eventually replace the old one. I think it is time to finish that wizard, add whatever is missing to it for Qt.

In that context, applying the new wizard to the text GUI would make sense, and would probably not cost much more time, and it might help make it more generic. I am not asking you ti prioritize the text GUI, but to finish the work on Qt.

accumulator commented 11 months ago

Right.......

Anyway, I'm already 40% done refactoring the Qt wizard to the new framework, I'll add the PR once it's getting close to ready for review.

SomberNight commented 11 months ago

(I don't think it's worth spending non-trivial time on the text/stdio GUIs. We can fix regressions/adapt them to internal API changes -- typically that should be easy -- but both of them are basically just fun toy GUIs. The simplicity (in terms of code) of these prototype GUIs is probably the top argument re keeping them. Adding new features should be done with this in mind (i.e. a toy wizard could make sense). I don't expect anyone uses either on mainnet btw...)


7: yes, see here https://github.com/spesmilo/electrum/blob/f4f88f42942e7cc3d4bc67ba4fa8a24bbb996e83/electrum/constants.py#L86-L100 The types atm are x,y,z,Y,Z, which distinguish script type information, and the convert_xkey command can be used to convert between them.

8: the current types are here: https://github.com/spesmilo/electrum/blob/f4f88f42942e7cc3d4bc67ba4fa8a24bbb996e83/electrum/version.py#L13 and the current default: https://github.com/spesmilo/electrum/blob/f4f88f42942e7cc3d4bc67ba4fa8a24bbb996e83/electrum/mnemonic.py#L203 The default is not specified in commands.py to avoid duplication. -- though for documentation purposes this is ofc not ideal.

9: createmultisig creates a single address; but tbh it's not really useful as-is I think. it mirrors a similarly named command from bitcoind

12: see https://github.com/spesmilo/electrum/blob/f4f88f42942e7cc3d4bc67ba4fa8a24bbb996e83/electrum/commands.py#L1049

sorenstoutner commented 11 months ago
  1. Would the following text be accurate?

Convert the xtype of a master key. E.G. xpub ‐> ypub. Valid options are ’xprv’, ’yprv’, ’zprv’, ’Yprv’, ’Zprv’, ’xpub’, ’ypub’, ’zpub’, ’Ypub’, and ’Zpub’. Requires the xkey and xtype positional arguments.

ecdsa commented 11 months ago

note: I just removed get_ssl_domain from master, see 012ce1c1bb6fad43e55ab18e92f85ec7514e96e6

sorenstoutner commented 11 months ago

Thanks for the heads up.

ecdsa commented 10 months ago

I also removed dumpgraph and inject_fees from the CLI, see bee19d7dece177273c7414224eb56ee4e9165ac3. I think it would be nice to be able to control the fee policy from the command line, though. I will try to come up with a solution shortly.