-
Notifications
You must be signed in to change notification settings - Fork 504
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
Uncaught Error: KeyStore: Invalid mnemonic #182
Comments
I believe there is some kind of problem in:
So, I checked and problem probably is on library I have my own 12-word seed and it fails anytime. And I used this below, and Validation was OK. I still try to find where problem is ;/ |
OK, I can confirm that problem is with "12 word seed" , or I'm doing something wrong with the words. This seed work:
this not:
I changed enforce => road, and I got error about wrong mnemonic. |
@pdanysz Not every 12 words is a valid mnemonic, the mnemonic contains a checksum, so if you just change one word it will not be a valid mnemonic. |
@christianlundkvist yes, correct, thank you! |
Well, my problem persists. Whenever an invalid password is matched with the given mnemonic, I am unable to catch the error. That was the essence of this topic, not the generation of a mnemonic :) |
…f invalid mnemonic occurs
Hi @DalderupMaurice , this is due to the fact that init function throws error if invalid mnemonic appears. But that error is not caught by it's calling function viz. For now, you can import "bitcore-mnemonic" library and prior to calling |
Thanks man, really appreciate the effort :D |
@christianlundkvist can you explain this:
So I cannot use any 12 words, is there a schema to follow? Are only certain words allowed, is there a good resource for this? E.g. can I use any combination of those: I'm not getting this explanation: EDIT: this library makes it easier: |
@360disrupt Not any 12 random words make a correct mnemonic (not at least for Ethereum and Bitcoin chains). You can view the wordlist here. Again, you cannot arrange these words randomly yourself to make a valid mnemonic. This has steps to create one. You can visit https://iancoleman.io/bip39/ to generate mnemonic for yourself. Or include this in your codebase to create wallets. Here you can see that eth-lightwallet uses it as well ;) |
Upgrading from eth-lightwallet 2.5.4 to 3.0.x I am having the issue that I am unable to catch the error whenever a wrong mnemonic is passed to lightwallet.keystore.createVault.
Example:
In this example, whenever the password is wrong, the callback does not retrieve an error keystore. It just displays an uncaught error in the console of the browser. I also tried placing a try - catch around it, but it still does not work.
This is the error shown in the browser:
The text was updated successfully, but these errors were encountered: