-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function to generate mnemonic? #34
Comments
Good point, we should add a code snippet to the recipe book for that. > ethers.HDNode.entropyToMnemonic(ethers.utils.randomBytes(16));
'company comic cage filter pipe scheme stock usual bubble once easily nut'
> ethers.HDNode.entropyToMnemonic(ethers.utils.randomBytes(20));
'gloom lunar consider second empower school salon lift loyal stone attend patient color artist stand'
> ethers.HDNode.entropyToMnemonic(ethers.utils.randomBytes(24));
'library rural mimic quit discover party luggage hint junior flight middle horror brush pizza delay saddle picture culture'
> ethers.HDNode.entropyToMnemonic(ethers.utils.randomBytes(28));
'culture flavor crush lyrics tenant forest amazing second labor clump tilt zebra renew shaft fork resemble other dress era unlock lens'
> ethers.HDNode.entropyToMnemonic(ethers.utils.randomBytes(32));
'wash fuel arrange false sad again theory flame junk actual act advice glue frame tiny layer artwork various dry life exact oyster kangaroo clip' Most services (including Ethers Wallet) use 16 bytes of entropy. Wallet.createWallet will soon create mnemonic enabled wallets too and will include the same x-ethers data as ethers.objc. |
Oh! of course, perfect. Thank you for connecting the dots for me 👍 |
entropyToMnemonic seems not supported in V5 of ethersjs, is there any workaround? |
how to create entropyToMnemonic with wordlist? |
v 5.7.2
What's the bloody matter? |
@GildedHonour See the docs. (Sorry, just saw it isn't listed; but it follows the pattern of the other functions; in v6 is it part of the HDNodeWallet class.) |
Could you possibly answer more ambigiously? @ricmoo |
Now I get it |
@GildedHonour I gave more details (and an example) in the other issue you opened. |
I don't see a way to generate a mnemonic/seed for the HDNode. Should I just use the bip39 library or am I missing something?
The text was updated successfully, but these errors were encountered: