Replies: 6 comments 2 replies
-
Now I understand that mnemonic is a class. So:
now gives: TypeError: invalid mnemonic checksum. |
Beta Was this translation helpful? Give feedback.
-
That’s means the mnemonic is wrong. Either a wrong word was used or more often the order was wrong. Some people write mnemonics in 2 columns and go left-to-right then top-to-bottom and some use top-to-bottom then left-to-right. |
Beta Was this translation helpful? Give feedback.
-
(moving to discussions to continue this ;)) |
Beta Was this translation helpful? Give feedback.
-
Could you please give me a random mnemonic phrase that is accepted? Thanks. |
Beta Was this translation helpful? Give feedback.
-
I traced the error and it is related that you are not handling strings with different encodings. I am not sure we can assume now that the encoding is just plain ascii. |
Beta Was this translation helpful? Give feedback.
-
Now I clearly recognize the error, the library is not handling the case where there are trailing '\n' at the end. I assume that the library should handle this case in some way or return a proper error since '\n' is considered like a space or blank in many contexts. |
Beta Was this translation helpful? Give feedback.
-
Ethers Version
6.12.1
Search Terms
mnemonic.computeSeed is not a function
Describe the Problem
Self explainable:
doing: var wallet = ethers.HDNodeWallet.fromMnemonic(data) gives the error.
Code Snippet
Contract ABI
No response
Errors
Environment
node.js (v12 or newer)
Environment (Other)
No response
Beta Was this translation helpful? Give feedback.
All reactions