2

I'm aware you can add another account with a separate private key using Phantom wallet (on Chrome), but at the end it's sharing the same recovery phrase.

However I've got multiple wallets with different recovery phrases.

So is it possible to use two or more wallets with different recovery phrase using the same instance of Phantom wallet?

3 Answers 3

4

The only other seed phrase that I am aware that can be added to an existing Phantom wallet is Ledger. Besides that, as of today, it's not possible.

2
  • 2
    This is correct as of July 2022. We may add multi-mnemonic capabilities in the future. Outside of connecting a ledger, the only other way to use Phantom with multiple mnemonics today is to use different instances across different browsers & devices. Jul 13, 2022 at 13:47
  • As of December 2023, you can now import different wallets with different recovery phrases in the same Phantom instance. They implemented it.
    – Ake
    Dec 28, 2023 at 2:11
3

WARNING: This process will write private keys to disk in plaintext. If that is unacceptable in your security model, or you do not know whether it is acceptable, DO NOT PROCEED!

The Solana CLI utils can be used to "recover" keypairs from other seed phrases. These keypairs can then be added to Phantom with the "import private key" method. This does require a bit of knowledge around how BIP32/44 address derivation paths work

  1. Find the correct derivation path by public key

    solana-keygen pubkey 'prompt:?key=A[/B]'
    

    Explained:

    • solana-keygen pubkey displays the public key for a keypair
    • prompt: tells it to query a seed phrase from the command line and use BIP32-ed25519 keypair derivation along the Solana BIP44 derivation path (m/44'/501')
    • ?key=A[/B] specifies the third (A) and optionally, fourth (B) BIP44 derivation path components. That is:
      • ?key=1 corresponds to m/44'/501'/1'
      • ?key=1/2 corresponds to m/44'/501'/1'/2'

    Most web wallets use derivation paths corresponding to ?key=N/0 by default, where N corresponds to wallet W - 1 (eg. wallet 1 is ?key=0/0, wallet 2 is ?key=1/0, ...)

    NOTE: Be sure to single quote the prompt:... argument as some shells (zsh, etc) try to interpret the ? by default

  2. Recover the corresponding key pair using the derivation path found above

    solana-keygen recover --output recovered-wallet.json 'prompt:?key=A[/B]'
    

    Explained:

    • solana-kegen recover recovers keypairs from user supplied inputs
    • --output FILE tells it to write the recovered keypair to FILE rather than the default, ${HOME}/.config/solana/id.json
    • prompt:?key=A[/B] specifies the BIP44 derivation as described above
  3. Paste the contents of recovered-wallet.json into the "private key" field of the "import private key" form in Phantom

1

Yes you can add different wallets with different seed phrases For instance, I have created multiple wallets using solana-cli tools with the command solana-keygen new and I get a file that has an array of numbers that serve as the privatekey and can be used to import wallet in Phantom extension. Two different wallets made using cli tools and also with different seed phrase and saved in different files

that is wallet 1 imported

that is wallet 2 imported

2
  • it would probably be helpful to explain how you get from creating the new keypair with the CLI to displaying its balance in Phantom
    – trent.sol
    Jul 16, 2022 at 4:44
  • 1
    @trent.sol We can get this by following Add/Create Wallet --> Import Private key --> Paste the array from doc created and import Jul 19, 2022 at 8:04

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.