Skip to main content
Added links to helpful articles
Source Link
nickfrosty
  • 1.2k
  • 4
  • 23

When a Solana wallet is generated using a mnemonic, is has a set "derivation path". The reason the wallet you generated with the CLI is different in the CLI and in your web wallet is because of this derivation path.

As of right now, the current version of the solana-keygen program (v1.14.11) uses a single set static derivation path of m/44'/501'. Which is what you would be currently using to generate your pubkey addresses.

In contrast, web based wallets like Phantom, Solflare, or Ledger use a different derivation path. It can vary between the web wallet, but the most common is m/44'/501'/0'/0'.

The difference between these derivation paths is why your generated keys are different.

Good news: there will be a new addition to the solana-keygen program that will allow people to set a derivation path (and therefore generate vanity addresses for use in web wallets). The bad news is that this should be added in v1.15.0.

So for right now, you really have two options:

  1. Wait for version 1.15.0 of the Solana CLI to be published, which you can then update your local version and use the CLI with the --derivation-path flag to generate pubkeys for use in web wallets.
  2. or you can do it now by downloading Solana source code and building the current version of the codebase (from master) and have access to it now

PS: I would not call them "legacy pubkeys" because that is not at all what they are. Both methods are pubkeys, and are the same. Just the derivation path is different :)

Update Feb 5, 2023:

I wrote two articles that go more into the details of how all this works:

When a Solana wallet is generated using a mnemonic, is has a set "derivation path". The reason the wallet you generated with the CLI is different in the CLI and in your web wallet is because of this derivation path.

As of right now, the current version of the solana-keygen program (v1.14.11) uses a single set static derivation path of m/44'/501'. Which is what you would be currently using to generate your pubkey addresses.

In contrast, web based wallets like Phantom, Solflare, or Ledger use a different derivation path. It can vary between the web wallet, but the most common is m/44'/501'/0'/0'.

The difference between these derivation paths is why your generated keys are different.

Good news: there will be a new addition to the solana-keygen program that will allow people to set a derivation path (and therefore generate vanity addresses for use in web wallets). The bad news is that this should be added in v1.15.0.

So for right now, you really have two options:

  1. Wait for version 1.15.0 of the Solana CLI to be published, which you can then update your local version and use the CLI with the --derivation-path flag to generate pubkeys for use in web wallets.
  2. or you can do it now by downloading Solana source code and building the current version of the codebase (from master) and have access to it now

PS: I would not call them "legacy pubkeys" because that is not at all what they are. Both methods are pubkeys, and are the same. Just the derivation path is different :)

When a Solana wallet is generated using a mnemonic, is has a set "derivation path". The reason the wallet you generated with the CLI is different in the CLI and in your web wallet is because of this derivation path.

As of right now, the current version of the solana-keygen program (v1.14.11) uses a single set static derivation path of m/44'/501'. Which is what you would be currently using to generate your pubkey addresses.

In contrast, web based wallets like Phantom, Solflare, or Ledger use a different derivation path. It can vary between the web wallet, but the most common is m/44'/501'/0'/0'.

The difference between these derivation paths is why your generated keys are different.

Good news: there will be a new addition to the solana-keygen program that will allow people to set a derivation path (and therefore generate vanity addresses for use in web wallets). The bad news is that this should be added in v1.15.0.

So for right now, you really have two options:

  1. Wait for version 1.15.0 of the Solana CLI to be published, which you can then update your local version and use the CLI with the --derivation-path flag to generate pubkeys for use in web wallets.
  2. or you can do it now by downloading Solana source code and building the current version of the codebase (from master) and have access to it now

PS: I would not call them "legacy pubkeys" because that is not at all what they are. Both methods are pubkeys, and are the same. Just the derivation path is different :)

Update Feb 5, 2023:

I wrote two articles that go more into the details of how all this works:

Source Link
nickfrosty
  • 1.2k
  • 4
  • 23

When a Solana wallet is generated using a mnemonic, is has a set "derivation path". The reason the wallet you generated with the CLI is different in the CLI and in your web wallet is because of this derivation path.

As of right now, the current version of the solana-keygen program (v1.14.11) uses a single set static derivation path of m/44'/501'. Which is what you would be currently using to generate your pubkey addresses.

In contrast, web based wallets like Phantom, Solflare, or Ledger use a different derivation path. It can vary between the web wallet, but the most common is m/44'/501'/0'/0'.

The difference between these derivation paths is why your generated keys are different.

Good news: there will be a new addition to the solana-keygen program that will allow people to set a derivation path (and therefore generate vanity addresses for use in web wallets). The bad news is that this should be added in v1.15.0.

So for right now, you really have two options:

  1. Wait for version 1.15.0 of the Solana CLI to be published, which you can then update your local version and use the CLI with the --derivation-path flag to generate pubkeys for use in web wallets.
  2. or you can do it now by downloading Solana source code and building the current version of the codebase (from master) and have access to it now

PS: I would not call them "legacy pubkeys" because that is not at all what they are. Both methods are pubkeys, and are the same. Just the derivation path is different :)