-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support BIP39 mnemonic for other languages #191
Comments
This cannot be added to the standard package, as the keyword lists are very large and do not compress well, so it would add 3-4Kb for just that one file. I can make additional packages though which include the other languages, and add support to extend the mnemonic wordlist library. Perhaps something like: var zh = require('ethers-bip39-zh');
ethers.HDNode.addWordlist(zh); Would that work for your purposes? I would also include dist files so they can be easily loaded for websites. |
Sounds good! Yes, I think it's very useful for me. Thanks. |
If you are adventurous, this has been added to the TypeScript branch.
Tha API may change, since this is for the next major version, but for now this will suffice, and change will be minor. :) There are also dist files for using this in a browser. Just include script tags for any language you would like after including ethers.min.js. <html>
<body>
<script src="dist/ethers.min.js"></script>
<script src="dist/wordlist-zh.js"></script>
</body>
</html> Currently supported
|
It's Amazing! I can't wait to use the new version. |
Yupp, after v4 is released, the For the browser, we split them out into individual files, since they add about 6-12kb each. |
That's cool. Thanks. |
French and Spanish have been added, so all official wordlists are now fully supported. :) Thanks! :) |
Merge commit '3736a1571480a0f69d632d6fc3bde549cbe46162' into fix/tslib * commit '3736a1571480a0f69d632d6fc3bde549cbe46162': (41 commits) Updated dist files. Added automatic event parsing for contract transaction receipts from tx.wait. Added ability to wait for a specific number of confirmations (ethers-io#229). Fix for geth-etc (official geth is fine), which returns Receipts before the blockHash is synced to the database. Fixed confirmations tests and bootstrap fast blockNumber. Added confirmations to TransactionResponse (ethers-io#156, ethers-io#238). Fixed nested errors for providers that were masking true error (ethers-io#292). Updated dist files. Added version to errors. Fixed French and Spanish for browsers without Uint8Array.forEach. Added French and Spanish includes to phantomjs test page. Increased timeout for querying npm registry. Updated dist files. Added French and Spanish wordlist dist files. Added French and Spanish BIP-39 wordlists (ethers-io#191). Added support for JSON serialized BigNumbers in the constructor (ethers-io#288). Fixed scrypt for long passwords (ethers-io#223). Updated dist files. Added chainId as supported override for contract transactions. Fixed wildcard events and made nested events more robust (ethers-io#289). ... Conflicts: dist/ethers.min.js dist/ethers.min.js.map package-lock.json
Hi, I found BIP39 not only have English mnemonic, but also have Chinese and so on.
Could
ethers.js
support other language mnemonic?I found current stage only have English mnemonic.
If yes, I will be happy to submit a PR to add this feature. Thanks.
The text was updated successfully, but these errors were encountered: