I managed to write a piece of code that generates a bitcoin address and creates a transaction. I would like to make some tests on the testnet but it seems to lack some documentation. So far I figured that we use a different version 0xEF (rather than 0x80) when creating a WIF key, and that we use a net byte of 0x6F (rather than 0x00) when creating a public address from the public key.

What other differences are there? The differences I mentioned above are not sufficient to create a valid public address it appears. Maybe the base58 encoding is different? What about raw transactions?

  • The differences I mentioned above are not sufficient to create a valid public address it appears. How have you come to that conclusion?
    – weston
    Dec 28, 2017 at 15:11

1 Answer 1


The difference between a main net and test net address is exactly the first byte (and of course the checksum). The base58 encoding method is not different, but due to the first byte being different (and 256 doesn't divide by 58), the whole address does look different. For example:

Public key: 03919f9806cd4d07b588b14bcf7f5e8466d1c59f3694eb24101bbf59b91f933bfa
Main net address: 1KHL3He8D171NX8MpLH4XGsBqBjMmEDrHC
Test net address: myoHLLj722YG9dbyXuFSMC5WhBL4h7nqhs

I can't say what your problem was attempting the testnet transaction as you haven't given any details but there are no great differences between the two (raw transaction format or address formats etc.) or it wouldn't be much use as a test.

  • The issue was with creating the public address but I figured it out. So there's no difference at all when creating a testnet transaction? Dec 29, 2017 at 17:02
  • I doubt it, like I said, wouldn't be that useful as a test if you had to change a load of stuff, but just try it.
    – weston
    Dec 29, 2017 at 17:04

Your Answer

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

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