Importprivkey problem for Litecoin clone I have cloned an older version of Litecoin using a tutorial. I chose the starting letter for the public addresses to be lower case "x". Everything is working fine except for importprivkey. It will always gives error 5 wrong format. I tried using paper wallet generated keys (paper wallet generated private keys starting with addreses K,L and J) while the windows-qt wallet dumprivkey dumps private keys starting with nr 2 but that can not be imported as well. Is it because of letter x? FYI I have compiled a clone using letter "L" (same like Litecoin) and everything works so i doubt there is a coding error.
It seems like you are trying to import an address with importprivkey, which is absolutely incorrect. An address is not a private key and thus cannot be imported with importprivkey. Addresses have different data and will have different prefix letters than private keys. Looking at your code, the prefix for private keys will be 2 and those should be able to be imported into your wallet IF they did not already exist in the wallet (i.e. import to another wallet). This has nothing to do with your address prefix.