Thanks for your response. I didn't know that the private key was formatted like a Bitcoin address (version byte plus checksum bytes at the end). Is it possible to import a raw private key (i.e. a 256 bit random number) or is mandatory to format the key in that way?