1
0
Fork 0
mirror of https://github.com/bitcoin/bips.git synced 2025-03-13 11:09:16 +01:00

Address type flags in a table

This commit is contained in:
Clark Moody 2022-07-22 16:29:46 -05:00 committed by Alfred Hodler
parent ab90b8e787
commit 9c57035d5b

View file

@ -90,13 +90,19 @@ Payment codes are encoded in bech32m and the human readable part is "pay" for ma
===Address Types===
Address type flags determine which address types a payment code accepts. This is represented by big-endian ordered 16 bits. For instance, a hypothetical payment code that handles all address types will have all defined bits set to 1.
Address type flags determine which address types a payment code accepts. This is represented by big-endian ordered 16 bits. For instance, a hypothetical payment code that handles all address types will have all defined bits set to 1 (<code>0xffff</code>).
Currently defined flags:
* 0x0001 - P2PKH
* 0x0002 - P2WPKH
* 0x0004 - P2TR
{| class="wikitable"
! Address Type !! Flag !! Value
|-
| P2PKH || <code>1 << 0</code> || <code>0x0001</code>
|-
| P2WPKH || <code>1 << 1</code> || <code>0x0002</code>
|-
| P2TR || <code>1 << 2</code> || <code>0x0004</code>
|}
The remaining flags are reserved for future address types.