1

The Solana documentation states that executing solana-keygen new --no-outfile outputs pubkey: $PUBLIC_KEY, where $PUBLIC_KEY is the wallet address per:

The value shown after pubkey: is your wallet address.

However, executing solana-keygen verify $PUBLIC_KEY prompt:// outputs Error: Verification for public key: $PUBLIC_KEY: Failed.

In contrast, executing solana-keygen pubkey prompt:// outputs $DERIVED_PUBLIC_KEY per:

This is the derived solana BIP44 wallet address associated with your seed phrase.

Executing solana-keygen verify $DERIVED_PUBLIC_KEY prompt:// outputs Verification for public key: $DERIVED_PUBLIC_KEY: Success.

Is $PUBLIC_KEY the correct wallet address for receiving SOL, or $DERIVED_PUBLIC_KEY?

1 Answer 1

1

This is a bit confusing, but the words displayed when you run solana-keygen new --no-outfile are connected to a legacy scheme which uses the raw keypair rather than a derivation path.

You can recover it using the ASK keyword, ie:

solana-keygen verify $PUBLIC_KEY ASK

More information at https://docs.solanalabs.com/cli/wallets/paper#public-key-derivation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.