spacemeshos / smcli

Spacemesh command-line tool
https://spacemesh.io/
MIT License
8 stars 9 forks source link

Show addresses #64

Open 0xjac opened 9 months ago

0xjac commented 9 months ago

Note: This PR does not close the issue #38 as it is a temporary fix and does not implement the required logic in Rust as discussed.

0xjac commented 9 months ago

@lrettig as promised, feel free to use it if you want.

Please note, the following differs slightly from what you requested in #38:

  1. The address command is a sub-command of the wallet (i.e. smcli wallet address, not smcli address) since it's related to the wallet. Happy to move the cmd up to the root if you wish.
  2. wallet read: Since the private key uses the same encode as the public key, the private key is also displayed in bech32 format. Let me know if that's an issue.
  3. wallet read: Extra flags have been added (--hex and --no-address) to preserve the past behavior. (But the default behavior uses bech32 and shows the address)
  4. wallet address: reuses the --parent flag for the same purpose.
lrettig commented 9 months ago

@0xjac thank you again for the contribution here. We did end up adding the ability to print the wallet address along with the keys in #67. Is there anything else in your contribution here that you still think we should include? Let me know if so and I'll take a look.