Closed jensb89 closed 2 years ago
Should be doable but I don’t think setting the values like that works, probably better to fork it and change the magic bytes in network.py.
You might also need to change the network bytes for the address generation for example setting cryptotools.BTC.network.main[‘keyhash’]
to b’\x30’
(from this SE answer)
Thanks for the fast reply, I will give it a try.
Update for everyone else reading this: It seems to work by just overwriting the main network settings like this:
cryptotools.BTC.network.main["extended_pub"]["P2PKH"] = b'\x01\x9d\xa4\x62' #Ltub
cryptotools.BTC.network.main["hrp"] = 'ltc'
cryptotools.BTC.network.main["keyhash"] = b'\x30'
cryptotools.BTC.network.main["scripthash"] = b'\x32' #for the new M-addresses
cryptotools.BTC.network.main["wif"] = b'\x37' #not important?
Thanks again for the link :)
Just a question and not an issue: is it possible to also obtain the litecoin addresses from an Ltub key? Should be very similar to the Xpub right?
I tried to overwrite some network settings like this:
and then
... but I guess I'm still missing something. For starters I guess the derivation path is still wrong and must be M/x/x/1/0/0 instead of 0/0/0. But I can't change it and didn't find the hard coded 0 for bitcoin?! Where is the coin type (0 for bitcoin) defined?
Any idea? Would it even work like that? :D Thanks :)