A Bitcoin address is created with Base58Check encoding and it requires a version prefix, such as
0x00 for a P2PKH(pay-to-public-key-hash) address,
0x05 for a P2SH(pay-to-script-hash) address.
Does the version prefix of a Bitcoin address force the type of transactions the address may treat, or is it just for indicating the appropriate one?
In other words, can one do:
- Generate a ECDSA key pair.
- Create a Bitcoin address with it, with a version prefix
- The generated address is a P2SH(-like) address; at least its format is.
- Make a P2PKH transaction with it.