2

Normally when validating a bitcoin address I Base58 decode the string, validate the checksum, throw away the checksum, and end up with 21 bytes. Then I verify that the address is fr the correct network: If the first byte is 0x00 I have an address for the production network If the first byte is 0x6F I have an address for the test network

For this multisig address 2N5vbPQB7pMqyVa8JRcpZdCQLQCwDZCMyfo I get 0xC4 as the first byte. Does this mean that 0xC4 is the prefix for all multisig addresses on the production network? In that case, what is the prefix for the test network?

1 Answer 1

2

Multisig addresses are defined as follows:

base58(0x05 + [20-byte scripthash] + [4-byte checksum])

For testnet, it's 0xC4 instead of 0x05, indeed.

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.