Skip to content

Conversation

@nnymsgthb
Copy link

Because LTC is natively supported by bitcoinjs-lib I think it is justifiedd to support extended LTC-keys in xprv/xpub format, especially because this format is used by some common wallets (e.g. Jaxx and I believe Exodus). The network definition was taken from @iancolemn (see https://github.com/iancoleman/bip39/blob/master/src/js/bitcoinjs-extensions.js).

@dabura667
Copy link
Contributor

Ugh...

What is the point of standards if no one uses them... sigh

@dcousens perhaps we should allow HDNodes to prefer the network object and only soft-warn if it differs from the standard.

Switching to a soft-warn rather than a hard fail could also (in an ugly way) fix the ypub / zpub problem.

@dabura667
Copy link
Contributor

NACK on the new network idea, though.

@dcousens
Copy link
Contributor

dcousens commented Jan 25, 2018

@dabura667 my thoughts was, only enforce the network object strictly if they provide it.
I also don't know if we should bother, users who want to suppory multiple constants can easily use an array of networks...

@dcousens dcousens closed this Jan 25, 2018
@dcousens
Copy link
Contributor

@nnymsgthb this isn't the solution to this problem.

For your purposes, you can simply use:

bitcoin.HDNode.fromBase58(..., [bitcoin, litecoin, custom1, custom2]) // or bitcoin.HDNode.fromBase58(..., custom1) 

Where custom is your network object defined above.

@dcousens
Copy link
Contributor

Related #927

@nnymsgthb
Copy link
Author

Related #995

@dcousens dcousens mentioned this pull request Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment