mirror of
https://github.com/bitcoin/bips.git
synced 2025-03-15 11:59:18 +01:00
Address type flags in a table
This commit is contained in:
parent
ab90b8e787
commit
9c57035d5b
1 changed files with 10 additions and 4 deletions
|
@ -90,13 +90,19 @@ Payment codes are encoded in bech32m and the human readable part is "pay" for ma
|
||||||
|
|
||||||
===Address Types===
|
===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:
|
Currently defined flags:
|
||||||
|
|
||||||
* 0x0001 - P2PKH
|
{| class="wikitable"
|
||||||
* 0x0002 - P2WPKH
|
! Address Type !! Flag !! Value
|
||||||
* 0x0004 - P2TR
|
|-
|
||||||
|
| 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.
|
The remaining flags are reserved for future address types.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue