Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show addresses #64

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

0xjac
Copy link

@0xjac 0xjac commented Jul 13, 2023

  • Show address in wallet read (can be hidden with --no-address).
  • Show public and private key in bech32 format for the wallet read command. (Use --hex for the old format)
  • New command wallet address showing the address of a wallet.

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
Copy link
Author

0xjac commented Jul 13, 2023

@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.

The `wallet address` cmd lists all the addresses of a given wallet.

Related to spacemeshos#38
- Public keys are displayed in the bech32 format by default.
- The old hex format is still available with the `--hex` flag.

Related to spacemeshos#38
The addresses associated with a wallet file are now displayed when the
file is read.

The flag `--no-address` hides the address, similar to the old behavior.

Related to spacemeshos#38
@lrettig
Copy link
Member

lrettig commented Aug 3, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants