Hello,
I need some help recovering access to my DOT on the Polkadot Relay Chain.
My Polkadot address is:
15vEo2xY2gZdDXLUPgmpFZjup5Lu6aQSVi8gMJU4wEBLg3Uv
Using my 12-word recovery phrase:
Exodus generates this exact address.
Trust Wallet also generates this exact address.
However, both Exodus and Trust Wallet only display the Asset Hub balance. They do not show the approximately 28 DOT that are on the Polkadot Relay Chain for the same address.
I have also tried other recovery methods:
I restored the same 12-word recovery phrase on a Ledger Nano S Plus, but it generated a different Polkadot address.
I tried importing the account into SubWallet, but it also generated a different address and I was unable to access the Relay Chain account.
Because of this, I cannot connect the correct Relay Chain account to Polkadot.js and therefore cannot perform a teleport from Relay Chain to Asset Hub.
Is there a correct way to import a BIP39/BIP44 Polkadot account so that it generates the same address:
15vEo2xY2gZdDXLUPgmpFZjup5Lu6aQSVi8gMJU4wEBLg3Uv
and allows me to access the Relay Chain balance and perform the teleport?
Any guidance would be greatly appreciated.
Thank you.
Programmatically, you can derive the same account like this using Bun and TypeScript:
import { ed25519 } from "@noble/curves/ed25519.js";
import { mnemonicToSeedSync, validateMnemonic } from "@scure/bip39";
import { wordlist } from "@scure/bip39/wordlists/english.js";
import { derivePath } from "ed25519-hd-key";
import { toHex } from "polkadot-api/utils";
import { AccountId } from "polkadot-api";
const mnemonic = process.env.SEED_PHRASE as string;
const TRUST_WALLET_POLKADOT_PATH = "m/44'/354'/0'/0'/0'";
if (typeof mnemonic !== "string") throw new Error("MISSING SEED_PHASE");
if (!validateMnemonic(mnemonic, wordlist))
throw new Error("Invalid BIP-39 mnemonic");
const { key: privateKey } = derivePath(
TRUST_WALLET_POLKADOT_PATH,
toHex(mnemonicToSeedSync(mnemonic, "")).slice(2),
);
const publicKey = ed25519.getPublicKey(privateKey);
const address = AccountId(0).dec(publicKey);
console.log(address);
Therefore, you could create a PAPI signer and use PAPI to programmatically teleport the assets to Polkadot Asset Hub.
However, I do not think you will be able to move the entire balance. As far as I know, there is currently no way to teleport the assets while also reaping the relay-chain account. In practice, that probably means you will need to leave at least 1 DOT on the relay chain (the existential deposit).
I can also put together a PAPI script that performs the teleport for you. I will try to find some time over the next few days to prepare it.
Most importantly: never share your mnemonic or seed phrase with anyone. If somebody claims to be helping you and asks for your seed phrase, they are not trying to help you, they are trying to steal your funds.
I had a better idea: I ended up creating @polkadot-api/trust-wallet-to-pjs: a CLI to help users of Trust wallet to import their account into Polkadot{.js} based browser extensions, check it out:
@polkadot-api/trust-wallet-to-pjs
Recover a Polkadot account created in Trust Wallet so you can use it with the
Polkadot{.js} browser extension.
Why do I need this?
Trust Wallet derives Polkadot accounts using a different derivation path and
signing scheme than the Polkadot{.js} extension uses by default. If you import
your Trust Wallet seed phrase directly into Polkadot{.js}, you’ll get a
different address than the one Trust Wallet shows you.
This tool re-derives the exact account Trust Wallet generates from your seed
phrase, and saves it as an encrypted JSON keystore file that Polkadot{.js} can
import directly, so you end up with the same address in both wallets.
Everything runs locally on your machine. Your seed phrase and password are
never sent anywhere.
Usage
npx @polkadot-api/trust-wallet-to-pjs
The CLI will ask you for:
- Your Trust Wallet seed phrase (12 or 24 words, input hidden as you type)
- A password to encrypt the exported file (min. 8 characters)
- Where to save the file (defaults to
./polkadot-account.jsonin the
current directory)
It then prints the derived address and writes the keystore file.
Importing into Polkadot{.js}
- Open the Polkadot{.js} extension.
- Click the
+icon and choose “Import account from JSON”. - Select the generated file.
- Enter the password you chose when running the CLI.
Security notes
- Run this on a trusted, offline-capable machine if possible.
- The generated JSON file is encrypted with your password, but treat it like
any other wallet backup: keep it private and don’t share it. - Your seed phrase gives full control over your funds, never share it with
anyone or paste it into a website.