-
-
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
Add Czech Wordlist (v5) #691
Comments
Added. Closing now, but if anyone has any issues, please let me know. :) |
I've been using ethers to do differential fuzzing with a new feature I am adding here: ethereum/eth-account#87 (via a custom cli script). I can get all the languages to work just fine, however Czech is giving me an error with "invalid mnemonic" when I try to derive the key for the phrase |
Hmmm. Is it actually a valid mnemonic? How did you confirm the checksum? Using another piece of software? The wordlist checks that it’s hash matches the original wordlist file after constructing the list. Can you provide a snippet of code? I’ll also double check the file hash. |
As far as I can tell it's valid: https://iancoleman.io/bip39/#czech I'm using the same methodology to compute the checksum as I am with all of the other languages, but I'm curious if there's something to Python's handling of utf-8 where the ordering is different than how it gets loaded into Javascript I'm using the files directly as they appear in the BIP39 wordlist repository, it's getting bundled alongside the Python library I am working on and should be in the exact order as provided, when used for computing the checksum |
As far as I can tell, they match up, using
>>> ethers_wordlist = list(map(lambda w: w.lower(), filter(lambda i: i != '', re.split(r'([A-Z][a-z]+)', "[your extended wordlist string]"))))
>>> from eth_account.hdaccount import Mnemonic
>>> Mnemonic("czech").wordlist == ethers_wordlist
True |
On my computer now and able to test. It works for me. How are you using the API?
|
Oh. I think I see your problem. You are using ethers v4. You need to use v5 for the Czech wordlist. In v4, you are just getting |
Ahhhhhhh, weird |
Thanks @ricmoo, that did the trick! |
See: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md
The text was updated successfully, but these errors were encountered: