I want to create a paperwallet for an altcoin (Protoshares).

I know the public key version byte is 0x38 (56) and the addresses start with P...

But how do I find out the ECDSA private key prefix? For bitcoin it's 0x80, for litecoin it's 0xb0.

The Protoshares private keys start with 7... if that helps. Any idea where to look at?

1 Answer 1


Take the private key. It's probably expressed in base-58 encoding, so you just have to translate the number into base-16. The prefix is there in hexadecimal form.

To convert a base58 number to hex, check etotheipi's code. Based on it:

b58_digits = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'

def base58_to_hex(b58str):
  n = 0
  for s in b58str:
    n *= 58
    digit = b58_digits.index(s)
    n += digit
  return hex(n)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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