gcash / bchwallet

A secure bitcoin cash wallet daemon written in Go (golang)
ISC License
43 stars 29 forks source link

Make sure the user gets the bip44 coin type in documentation and/or creation process #20

Closed emergent-reasons closed 5 years ago

emergent-reasons commented 5 years ago

~Default (0') is here~ (see comments).

Someone who can inject their own Coin type doesn't need this. For everyone else, it seems worth making it explicit in documentation and/or wallet creation (requires update to bchctl). Current documentation is a generic string:

bchwallet uses the m/44'/<coin type>'/<account>'/<branch>/<address index> HD path for all derived addresses, as described by BIP0044.

Does that sound reasonable or am I missing something obvious?

cpacia commented 5 years ago

So it's actually selecting the cointype from the chainparams that are loaded. So it would typically be 144 for BCH. But you're right that isn't well documented.

emergent-reasons commented 5 years ago

Oh! I didn't see where it overrides the default with chainparams. I will look at that.

emergent-reasons commented 5 years ago

Ok thanks now I see here where the global default is changed to the current net params. Ugh.

It's 145 instead of 144 right?