What BTC wallet are you using? That is the originating wallet?
WIF private keys contain information about whether the compressed address should be used or the uncompressed one. Most likely the problem is that you've encoded the WIF private key for the wrong type of address. So I suggest converting to the other type and importing that.
FYI uncompressed private keys begin with 5 and compressed ones begin with L or K. You can convert between the two using bitaddress.org's wallet details tab (run offline).
Thank you for the explanation.
I don't use any BTC wallet. Whenever I need a new address, I just generate a random number in Python by:
priv = os.urandom(32)
then apply the necessary steps to generate the corresponding Public Key and Address.
I save that in a text file, encrypt it with gpg, then shred the original text file.
So normally I don't need to use the WIF at all. No mnemonic word lists either. Just good old private key.
I know it's a bit primitive but I like it that way :-)
I also wrote a python script to convert the Private Key to WIF:
import hashlib
import base58
import binascii
def privateKeyToWIF(key):
versionByte = "80"
extendedKey = versionByte + key
extendedKey_bytes = binascii.unhexlify(extendedKey)
doubleSHA256 = hashlib.sha256(hashlib.sha256(extendedKey_bytes).digest()).hexdigest()
checksum = doubleSHA256[:8]
finalKey = extendedKey + checksum
WIF = base58.b58encode(binascii.unhexlify(finalKey))
return WIF
I wasn't sure that's working properly, and following you message I verified it does, with bitaddress.org results.