Closed UdjinM6 closed 7 years ago
Thanks!
@UdjinM6 is it ok to continue using the old bytes for bip32? bitcore-lib gets confused with this dup from bitcoin, e.g.:
> var b = require('bitcore-lib');
> var c = require('coininfo');
> var dashmain = c.dash.main.toBitcore();
> dashmain.name = 'dash';
> dashmain.alias = 'dashmainnet';
> b.Networks.add(dashmain);
> b.HDPrivateKey('dash').network
'dash' # OK
> b.HDPrivateKey(b.Networks.mainnet).network
'dash' # FAIL
Without modifying:
> var b = require('bitcore-lib');
> b.HDPrivateKey(b.Networks.mainnet).network.name
'livenet' # OK
@gpip We had a conversation with multi-coin wallet devs (Jaxx, Exodus) and turned out that none of them are using pure bip32, they see bip32 as coin-agnostic bip and use bip44 to produce coin-specific keys, so we decided to adopt this policy in our reference client as well.
Litecoin values were changed this way too btw (https://www.reddit.com/r/litecoin/comments/48wd2e/why_arent_the_litecoin_bip32_serialization_values/) and they don't match now:
@UdjinM6 even if they don't use pure bip32, this change still breaks bitcore-lib (see https://github.com/bitpay/bitcore-lib/issues/131). You also can't use two bitcore-lib instances as there are checks against that (so you couldn't use bitcore-dash-lib and bitcore-lib to handle this issue). Seems like a good idea to patch bitcore-lib to handle duplicates on network settings correctly.
@gpip
Seems like a good idea to patch bitcore-lib to handle duplicates on network settings correctly.
I agree
Yeah, per BIP43 recommendations: https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki#node-serialization we (Exodus) uses xpub
and xpriv
for all assets.
References: