iancoleman / bip39

A web tool for converting BIP39 mnemonic codes
https://iancoleman.io/bip39/
MIT License
3.58k stars 1.45k forks source link

Automated tests #14

Closed iancoleman closed 8 years ago

iancoleman commented 9 years ago

Add automated tests. Manual testing has reached the limit of usefulness.

Urbanoid commented 8 years ago

Hi. I am new to github and I am no expert coder. I have a problem though and that's why I am reaching to you. Don't know if you can help me though.

So here it is. Lately, I've participated in the Decorum (MaidSafe) crowdsale without knowing that I had to know my private key in order to redeem my Decorum digital assets. I've sent my Bitcoins to the Decorum public address with my Ledger wallet. This was only one of my many mistakes made as a newbie in the Crypto World.

Now I am trying to look for my private key with the bip39 tool. Ok it works fine, but it takes a lifetime to look through all addresses in the dedicated column. I've just abandoned the project.

I was just wondering, is there another trick that I don't know of that might help me go faster with my search?

Thanks for your help!

iancoleman commented 8 years ago

Unfortunately I'm not familiar with the Decorum crowdsale nor with Ledger wallet.

I would suggest asking in the Decorum crowdsale topic on the safe network forum, or the bitcoin forum.

One tip that may help you with using this bip39 tool is toggle the private key and index columns off, then select and copy just the addresses into whatever 'watch only' tracking mechanism you use to track decorum crowdsale tokens. But I'm sure you'll get better advice from more knowledgeable people on the forums. Since Ledger uses BIP44 derivation it should be easy to generate the correct addresses using the BIP44 tab for the derivation path.

Hopefully this is some help, but I'm definitely not the best person to be answering this question.

iancoleman commented 8 years ago

This has begun in https://github.com/dcpos/bip39/commit/88e2cdaa545ad7f7fac0256e33e5aeeb6276bc34

Depends on phantomjs

Tests can be run with

$ phantomjs tests.js

Has a lot more tests to be written, but it has begun.

Still exploratory code at this point, will probably need refactoring in the near future depending how much code duplication happens in the test code.