1

Hello Solana community

I have generated a solana keypair using the solana CLI: The command line:

solana-keygen new

It generated the secret 12-word mnemonic phrase (I am not going to share) and my public key which is 5EhxUF3eGXxbPATVEHdRUmVSYCb7wPM4Sb3TfHXiPbhB.

I was able to successfully use that keypair to make transactions using the solana SDK @solana/web3.js and I can see my transactions on solscan.io.

Now I am trying to import that solana keypair on wallet applications such as TrustWallet or Solfare or Phantom.

Each wallet application is asking me to enter my secret 12-word mnemonic phrase. But when I enter the secret phrase, the wallet derives a different public key which is FtsAJAhLd9qvorQSFby61Sar2Q1GrZ3QL4ibaRaPE6q6.

Can anyone recommend which wallet application to use to import my solana keypair.

The reason why I decided to generate my solana keypair using the solana CLI is because I could not extract the private key of my solana wallet from TrustWallet or Solfare. All I could get was the secret 12-word phrase. I tried to use the bip39 application to get my private key from the 12-word phrase, but I could not figure out which one was my solana private key.

Thanks for your time.

1
  • Trust wallet can accept additionally private key in hex string format and base58, what is the logic in base58 wif format, I tried key pair from solders.kaypair, tried base58.encode private key, but it won't work... Commented Oct 7 at 19:23

1 Answer 1

3

Try using the using the solana-keygen new --no-outfile --derivation-path command this should work.

i faced a similar issue earlie this week, i will try to explain as i understood it this has something to do with Solana CLI using a slightly different derivation path for generating keypair to what wallets typically use. The Solana CLI uses the path m/44'/501' to generate a single "root key". This root key can then be used to derive further child keys for specific purposes.

On the other hand, most Solana wallets use the path m/44'/501'/0'/0'. This path generates a specific child key from the root key, providing a direct path to a usable keypair.

So when creating a keypair from CLI be sure to define the derivation pathnusing the solana-keygen new --no-outfile --derivation-path command

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.