bitcoinjs-lib icon indicating copy to clipboard operation
bitcoinjs-lib copied to clipboard

Litecoin has invalid BIP32 network constants

Open bluen opened this issue 9 years ago • 5 comments

It seems the network definition for bip32 extended keys of litecoin do not match the real ones, see https://github.com/litecoin-project/litecoin/blob/master/src/chainparams.cpp#L133 and https://github.com/litecoin-project/litecoin/blob/master/src/chainparams.cpp#L134

base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();

bluen avatar Jul 10 '17 15:07 bluen

PR accepted.

dcousens avatar Jul 12 '17 23:07 dcousens

~~As per @coblee in https://github.com/bitcoinjs/bitcoinjs-lib/pull/819#issuecomment-315238237, the fault is at https://github.com/litecoin-project/litecoin/blob/master/src/chainparams.cpp#L133, not here~~

dcousens avatar Jul 14 '17 00:07 dcousens

Just wondered if anyone managed to resolve or find a solution for this?

tonychew1986 avatar Feb 26 '18 12:02 tonychew1986

@tonychew1986 please read https://github.com/bitcoinjs/bitcoinjs-lib/pull/819

dcousens avatar Feb 26 '18 13:02 dcousens

Thanks @dcousens

tonychew1986 avatar Feb 27 '18 02:02 tonychew1986