You need to change the part where it adds the "version" bytes to the beginning of the address and then hashes it... Bitcoin version is 0x00 and Litecoin is 0x30
I *THINK* it is in ElectrumHelper.php file... in the hash_160_to_bc_address() function:
unfortunately, I cannot include the exact code here... as it seems when I try to do that, the website thinks I am trying to inject PHP code and blocks me with a big security warning!
So, please DO NOT just copy paste this!
$vh160 = chr ($addrtype) . $h160;
...
Edited Code:
$vh160 = hex2bin("30") . $h160;
...
}
Basically... all I did was set the default addrtype to hex value of "30"... and then convert this from "hex" to binary and prepend it to the $hash160 instead of the "chr"(0)... that it was using for Bitcoin.
This seems to start spitting out the LTC addresses that match the xpub from Electrum-LTC... and the addresses that match my xpub from my Ledger Nano S LTC wallet. So, while I am fairly confident it works, I would test it with some small amounts first!