2

Let's say Bob tells you to send him btc and he gives you a p2pkh address whose underlying 160-bit number is, say, 12345. You can't just convert that to the taproot representation of 12345 and send btc to that taproot address; Bob wouldn't receive that right?

So, effectively, for any given 160-bit number, there are 4 different addresses you can generate from it, and sending btc to one address type would indeed send only to that address type, and the other 3 would not receive it?

1 Answer 1

7

There are actually 5 address types commonly in use at the moment (P2PKH, P2SH, P2WPKH, P2WSH, and P2TR), and two of them encode a 32-byte (256-bit) value, not a 20-byte (160-bit) one, so the actual number of possible addresses is 2*2^256 + 3*2^160.

You technically can convert between some address types, for example both P2PKH and P2WPKH encode the same type of public key hash. However, you should never do this, because 1) the recepient will almost certainly not monitor the blockchain for payments to the converted address, and 2) they might not even be able to spend coins sent to the converted address, for example if their private key is on a hardware security module that only works for their original address type. Always send to the exact address you are given.

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.