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

pubkey of 'solana-keygen new' does not match output of 'solana-keygen pubkey' #17325

Closed
ulrichstark opened this issue May 19, 2021 · 6 comments
Closed
Labels
stale [bot only] Added to stale content; results in auto-close after a week.

Comments

@ulrichstark
Copy link
Contributor

ulrichstark commented May 19, 2021

Problem

When i run solana-keygen new --no-outfile with no extra passphrase, it generates the keypair like normal and displays a different pubkey compared to the output of solana-keygen pubkey prompt:// (and inputting the newly generated seed phrase).

I am using 1.6.9.

I also tested on 1.6.7 with the same command to generate and solana-keygen pubkey ask:// to verify the public key.
And they match! But not on 1.6.9 anymore...

@CriesofCarrots
Copy link
Contributor

Correct. As of v1.6.9, solana-keygen pubkey prompt: returns the solana bip44 base address for the seed phrase, ie. derivation path m/44'/501'. You can still access the raw ed25519 keypair using the ASK keyword, eg: solana-keygen pubkey ASK

cc @t-nelson , let's consider updating solana-keygen new --no-outfile to display the the bip44 base address; perhaps not until we update the keypair file syntax.

@t-nelson
Copy link
Contributor

cc @t-nelson , let's consider updating solana-keygen new --no-outfile to display the the bip44 base address; perhaps not until we update the keypair file syntax.

Yeah I think updating it with the new keypair file changes makes sense. I'm hoping to get to those this week.

Perhaps a docs update to mention the legacy, raw usage is sufficient in the mean time?

burnto added a commit to burnto/solana that referenced this issue Aug 19, 2021
Per solana-labs#17325 (comment), this change adds a note to the paper wallet docs mentioning the use of the `ASK` keyword. 

Also specifes that the `solana-keygen pubkey prompt://` command returns a derived bip44 base address.

(I'm new to Solana development and this was a point of confusion for me, only resolved by finding this issue)
CriesofCarrots pushed a commit that referenced this issue Aug 20, 2021
* Add note about ASK keyword to paper wallet doc

Per #17325 (comment), this change adds a note to the paper wallet docs mentioning the use of the `ASK` keyword. 

Also specifes that the `solana-keygen pubkey prompt://` command returns a derived bip44 base address.

(I'm new to Solana development and this was a point of confusion for me, only resolved by finding this issue)

* Update docs/src/wallet-guide/paper-wallet.md

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
mergify bot pushed a commit that referenced this issue Aug 20, 2021
* Add note about ASK keyword to paper wallet doc

Per #17325 (comment), this change adds a note to the paper wallet docs mentioning the use of the `ASK` keyword.

Also specifes that the `solana-keygen pubkey prompt://` command returns a derived bip44 base address.

(I'm new to Solana development and this was a point of confusion for me, only resolved by finding this issue)

* Update docs/src/wallet-guide/paper-wallet.md

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
(cherry picked from commit 3be5715)
mergify bot added a commit that referenced this issue Aug 20, 2021
* Add note about ASK keyword to paper wallet doc

Per #17325 (comment), this change adds a note to the paper wallet docs mentioning the use of the `ASK` keyword.

Also specifes that the `solana-keygen pubkey prompt://` command returns a derived bip44 base address.

(I'm new to Solana development and this was a point of confusion for me, only resolved by finding this issue)

* Update docs/src/wallet-guide/paper-wallet.md

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
(cherry picked from commit 3be5715)

Co-authored-by: Brent Fitzgerald <burnto@gmail.com>
@nileshtrivedi
Copy link

I ran into this issue 6 months after it was first reported: https://twitter.com/nileshtrivedi/status/1459422751979151363

@t-nelson
Copy link
Contributor

I ran into this issue 6 months after it was first reported: https://twitter.com/nileshtrivedi/status/1459422751979151363

Use ASK not prompt:. solana-keygen new doesn't support bip32 yet

@Mamu9
Copy link

Mamu9 commented Nov 24, 2021

Yes. That's a big trouble for me as I was trying to import private key into phantom and it was saying incorrect format. I was just doing an NFT experiment and uploading in the devnet.. YES solana-keygen new doesn't support bip32 yet. I copied the devnet.jason content and it was all 213,45,23,80.....format I raised a ticket.

@ghost
Copy link

ghost commented Mar 17, 2022

But how can I get private key for pubkey from solana-keygen new --no-outfile?

P.S. Solution: solana-keygen recover ASK -o recov.json will give you private key from seed phrase

@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Mar 20, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

No branches or pull requests

5 participants