bitcoinjs / bitcoinjs-lib

A javascript Bitcoin library for node.js and browsers.
MIT License
5.66k stars 2.09k forks source link

Why Did you remove HDNode #1297

Closed dgaydukov closed 5 years ago

dgaydukov commented 5 years ago

I have read your comment about removing HDNode from library, but unfortunately I didn't find any reasonable explanation for this. Can you share with us, why did you do this. I studied your implementation, and it looked like cool substitute for bip32. Once I even wanted to make a PR to add implementation of bip39, so you don't need any additional libraries, and can use only bitcoinjs-lib.

junderw commented 5 years ago

because BIP32 adds a lot of data to packaged builds.

BIP39 adds hundreds of kilobytes.

including these in the library adds no value, as they can be easily installed separately as needed.

Every person that packages bitcoinjs-lib in their app shouldn't have to serve up to an extra megabyte of data to every user of their app when they don't even use it. (BIP32/BIP39)

Also, BIP39 should probably be split up so that everyone doesn't have to install every wordlist.