0

How to generate not a wallet, but a mnemonic phrase itself? In JS, Python. Not in a wallet application. No information about this.

1 Answer 1

1

Using Ethers.js you can do this:

import { Wallet, utils } from 'ethers';

const wallet = Wallet.fromMnemonic(
  utils.entropyToMnemonic(utils.randomBytes(32))
)

console.log('wallet.address:', wallet.address)
console.log('wallet.mnemonic.phrase:', wallet.mnemonic.phrase)
console.log('wallet.privateKey:', wallet.privateKey)

Source: Github

0

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.