2

How can you get a mnemonic phrase wallet key (12 words login key) from a private key? actually I Will create a mobile app in flutter and a web app in react js so can you please guide me

1 Answers1

3

It's the other way around. Multiple private keys can be derived from the mnemonic phrase, but it's not mathematically possible to derive the phrase from a private key.

See the original BIP39 standard introducing the mnemonic phrase: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki

Petr Hejda
  • 40,554
  • 8
  • 72
  • 100
  • 1
    So we can not convert the private key to mnemonic-phrase-words with help of web3js , ethers.js https://iancoleman.io/bip39/ – Sachin Divergent Jun 22 '22 at 09:35
  • @SachinDivergent That's correct. You can see that the linked tool also converts the mnemonic phrase to private keys - not private key to the phrase. – Petr Hejda Jun 22 '22 at 09:41
  • 1
    Adding some useful command in ethers js to play with wallet : - ethers.Wallet.createRandom : create new wallet all with mnemonic and private key - ethers.Wallet.fromMnemonic : make instance to wallets from mnemonic in ethers js there is no function to return mnemonic from private key like @PetrHejda said. ps Im a fan of you Petr :)) – alvin Christianto May 06 '23 at 15:23