Skip to content

Add a wallet command to get the account extended public key #1926

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OBorce
Copy link
Contributor

@OBorce OBorce commented Jun 2, 2025

No description provided.

Comment on lines 308 to 309
#[clap(name = "account-extended-public-key")]
AccountExtendedPublicKey,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order of the enum items here will determine the order of the commands in the help.

So let's put this one near other "account-" commands, preferably sorting them by name.

Ok(ConsoleCommand::Print(format!(
"The account extended public key is: {hex_public_key},\n\
with chain code: {hex_chain_code}.\n\
Or contained in the QR code:\n{qr_code}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be reformulated.

  1. "The account extended public key is: {hex_public_key}" - this is not the extended public key, it's just the pubic key.
  2. "Or contained in the QR code" - this sounds broken. Also, it's not clear what is in the code exactly, i.e. how the key and the code are combined together.

As we discussed during the daily, we should probably define a format for a hex-encoded extended public key (e.g. it's always "{hex_public_key}{hex_chain_code}") and then always print it as a single hex string. Then the question "what's in the qr code" won't matter anymore.

P.S.

  1. should we take no_qr into account here as well?
  2. IMO it's better to add the "as-hex" suffix to the command name, even though we don't plan to have a base58 representation for ext keys for now, at least for consistency.

@OBorce OBorce force-pushed the feature/account-extended-pk branch from 3f40979 to 3b78955 Compare June 6, 2025 15:56
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.

2 participants