-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Litecoin testnet/regtest addresses? #6
Comments
hmm, I'm not sure what is going on here yet. The values in coinparams.json are taken directly from the latest litecoin source code in master branch.
note: I verified the values are the same in latest 0.16 tag. So I don't know where ttpv and ttub are coming from. But I take the source code as the final truth, so unless it can be shown that this is somehow the wrong code to look at, it seems the values in coinparams.json are correct. |
I checked the bitwasp/bitcoin-php library source code and it uses the same values as are found in coinparams.json.
Added to the chainParams.cpp code from litecoin github, that's good enough for me. Closing this. Feel free to re-open if you find compelling counter-evidence. |
hmm, I'm re-opening this. It also applies to LTC Mainnet. It seems that Ltpv / Ltub are in (somewhat?) wide use by wallets, even if they are not in the LTC codebase. Slip132 lists them. Also, Iancoleman's Bip39 tool provides a checkbox option:
Seems like a mess. |
Ok, I found these quotes that shed light on the matter: From: pooler/electrum-ltc#52
and from iancoleman/bip39#96
Although when I test LTC on iancoleman's tool today, it defaults to LTub, so I'm not sure what's up with that. Anyway, I'm leaving this open because I might add some sort of switch for LTC LTub usage, but for just now am busy with other things, and it seems like the code is doing the right thing. Anyone that needs LTub right away can use Iancoleman's tool for that. For testnet you could just replace the corresponding values under LTC/test/prefixes/bip32 in vendor/dan-da/coinparams/coinparams.json. |
A final thought. The easiest/best way to implement support for this may be to just add a new "coin" LTC-L to coinparams.json. |
Ltub,Mtub,ttub, etc are working in v0.4.0 with a flag to enable them. The readme provides several examples. The default is still btc style extended keys (xpub and friends). I may revisit that in the future. regtest is not presently supported on LTC due to a parsing error encountered by coinparams source parsing tool. if anyone cares, open an issue for it please. closing this. |
Thanks for the prompt response and for accommodating with a fix! Much appreciated 👍 |
I'm on latest from master.
I read online that the prefixes for the LTC testnet (and regtest?) are:
ttpv
ttub
But the tool gives keys with
tprv
andtpub
:Also tried using an existing LTC-regtest extended key generated with another tool (pycoin's
ku
).which throws error:
As per this SO answer the extended key prefixes for LTC testnet (and regtest?) are
0x0436ef7d
(ext.priv) and0x0436f6e1
(ext.pub).But I see in
vendor/dan-da/coinparams/coinparams.json
that the LTC testnet and regtest actually borrow the prefixes from bitcoin testnet,0x04358394
and0x043587cf
respectively which also explain the tool giving keys withtprv
andtpub
.Only one must be correct I guess. Am I missing something?
The text was updated successfully, but these errors were encountered: