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.

  • What tutorial did you follow? What code have you changed. This is most definitely a coding error as you probably did not change something that you needed to.
    – Andrew Chow
    May 1, 2018 at 19:40
  • Hi Andrew.The cone process involved generating a new Merkle root,changing network identifiers,etc.As I said everything is working good and up to date about 22 million coins were mined..we have blockchain explorer..mining pool etc..but the importprivkey will not work.However when I changed the letter x with L and started a separate test blockchain importing private keys worked...here is the github code github.com/OracolXor/Oracol-XOR-Coin if you want to have a look.At this point i am prepared to pay for your time if you believe you can solve the problem.Thanks for the reply.Adrian May 2, 2018 at 16:27

1 Answer 1


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.

  • Hi Andrew.Yes i understand and yes the dumped private key from my wallet they start with 2...i have tried to import dumped private keys from other wallets and it does not import .same error..now regarding the paper wallet ..the paper wallet does not generate addresses in WIF format that start with 2 ..the paper wallet WIF format keys start with K L or J..the paper wallet link is here oracol.mobi/paperwallet/index.html by the way...i noticed the same with Litecoin ..the bumped private keys start with T but the imported privete keys startvwith 6 ... May 2, 2018 at 21:39
  • .so ho do i get my wallet to import private keys ? the link to the oracol-qt windows wallet is here uploadfiles.io/ilu34 ..again i really appreciate taking the time to look into this .I can send you a btc contribution if you can point me in the right direction or help me solve this .Adrian May 2, 2018 at 21:40
  • P.S.- I had so far two people with good programming skills look into it and they could not find the solution ... May 3, 2018 at 0:15
  • Your paper wallet generator is using the wrong prefix, so of course it is wrong. You are using 0x109 which is invalid; the prefix byte is only one byte, this is more than one byte. The issue here is that you are overflowing the one byte, so instead of allowing the default behavior of adding 128 to the address prefix, you should set the prefix byte explicitly in all software.
    – Andrew Chow
    May 3, 2018 at 2:58
  • Yes...so if i may "translate" this in my own terms it means that because the sum of 137 (x) + 128 = 265 (or 0x109) is > 256 ?? I thought of that but could not fin any reference what is the work around..if 0x109 is wrong what is the correct way of calculating it or implementing it ( or as you mentioned - you should set the prefix byte explicitly in all software ) I used the info on this bitcointalk thread to calculate the values bitcointalk.org/index.php?topic=384093.10 Thanks again for helping with this .You have no idea how many nights i did not sleep trying to fix this thing May 3, 2018 at 4:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.