question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ethers.Wallet.createRandom() doesn't provide mnemonic

See original GitHub issue

From the documentation for ethers.Wallet.createRandom() it states:

Wallets created using this method will have a mnemonic

However, the mnemonic is not available.

This appears to be because createRandom() calls Wallet.fromMnemonic() which then generates a privateKey to create a new Wallet instance. However mnemonic is not passed through to the new Wallet instance that is returned.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tahpotcommented, Jul 23, 2020

Apologies for the false alarm, the issue was elsewhere.

0reactions
ricmoocommented, Aug 11, 2020

The mnemonic is a getter, so your console.log implementation may just not be showing it. Try console.log(wallet.mnemonic). 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native app crash -> ethers.Wallet.createRandom({locale ...
I am developing a wallet and I want to use the mnemonic code in Korean, but it works well in debug mode, but...
Read more >
Ethers.js function createRandom() is too slow when ...
I figured out that the createRandom() function is too slow because it is also creating a mnemonic of the private key.
Read more >
Wallets — ethers.js 3.0.0 documentation
A wallet manages a private/public key pair which is used to cryptographically sign transactions and prove ownership on the Ethereum network. Creating Instances¶....
Read more >
Signers - ethers
Returns a new Wallet with a random private key, generated from cryptographically secure entropy sources. If the current environment does not have a...
Read more >
React Native slow / freeze whet i call ethers.Wallet ...
Wallet.fromMnemonic() [Ethers js 5.5.1] · Ask Question. Asked 1 year, 1 month ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found