litecore-archive / litecore-lib

A pure and powerful JavaScript Litecoin library
https://litecore.io/
Other
72 stars 85 forks source link

How to use the mnemonic to create a private key, public key, address? #19

Open tangmingkao opened 5 years ago

tangmingkao commented 5 years ago

How to use the mnemonic to create a private key, public key, address?

majestic84 commented 5 years ago

Litecore doesn't have built in BIP39 support, but bitcoinjs does. If BIP39 is all you're after, you can still use bitcoinjs for the key generation, and litecore/insight for everything else.

https://github.com/bitcoinjs/bip39

Example usage: https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/bip32.js

My modified version for Litecoin: https://github.com/majestic84/bitcoinjs-lib

tangmingkao commented 5 years ago

At your prompt, I solved this problem, thank you very much!