There are a few types of LTC address. Some starts with M, some ltc and some with 3. What are the differents between these three? It seems like address starts with M is legacy and the others are the same of segwit. Is this correct?
The nested segwit can be of two types.
1.
P2SH:- addresses that start with 3 (old addresses)
2.
P2WPK(P2SH-P2WPK):- addresses that start with M (new addresses)
You can convert between the standard 3-prefix P2SH address format to M-prefix, you can use this open source tool provided by the Litecoin Foundation:
https://litecoin-project.github.io/p2sh-convert/ The source code can be viewed here:
https://github.com/litecoin-project/p2sh-convert. The converter can also run offline for safety reasons.
Most wallets can be using the new
(P2WPK) (P2SH-P2WPK) litecoin nested segwit addresses but some exchange may still be using the old
(P2SH) format. And you can easily convert from 3
(P2SH) types of lite coin addresses into the M
(P2WPK) (P2SH-P2WPK) type.
Corresponding litecoin 3-prefixes addresses have the same private key with the corrsponding M addresses. You can use the converter above to convert from one to another. It is completely open source.
The reason for the convertion is to minimize the confusion of bitcoin nested segit address that start from 3 with the litecoin segwit address that also started from 3. So the litecoin addess that start from 3 is converted to litecoin M address.
To know more about this, you can read the content from the link below:
https://cryptofacilities.zendesk.com/hc/en-us/articles/360006040974-Litecoin-Address-Format