Skip to content

keys generate prints unexpected P-Chain address format #35

Description

@containerman17

Summary

platform-cli keys generate appears to print a P-Chain address in a different/incorrect format from platform-cli wallet address.

The EVM address matches between both commands, but the P-Chain address shown immediately after key generation does not match the wallet command output.

Reproduction

go run . keys generate --encrypt=false

Output:

Key generated successfully!
  Name:          default
  P-Chain:       Lgocgo1se753cNrhUke5c8yCuMNkVUXZo
  EVM:           0x9C252013241CE4E781010Ff11524b6cD3a52dAf3
  Encrypted:     false
  Default:       yes

Then:

go run . wallet address

Output:

P-Chain Address: P-fuji16lccvh37nkrhqh7j7eda95kv9s7mnwld7zf6sf
EVM Address:     0x9C252013241CE4E781010Ff11524b6cD3a52dAf3

## Expected Behavior

keys generate should print the same P-Chain address format as wallet address, likely including the chain/network prefix, for example:

P-Chain: P-fuji16lccvh37nkrhqh7j7eda95kv9s7mnwld7zf6sf

## Actual Behavior

keys generate prints:

P-Chain: Lgocgo1se753cNrhUke5c8yCuMNkVUXZo

while wallet address prints:

P-Chain Address: P-fuji16lccvh37nkrhqh7j7eda95kv9s7mnwld7zf6sf

## Notes

The underlying key appears to be fine because the EVM address matches and wallet address derives the expected P-Chain address. This looks like a display/
formatting issue in the keys generate success output.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions