Skip to content

Commit 9c57035

Browse files
clarkmoodyalfred-hodler
authored andcommitted
Address type flags in a table
1 parent ab90b8e commit 9c57035

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

bip-alfredhodler-privatepayments.mediawiki

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,19 @@ Payment codes are encoded in bech32m and the human readable part is "pay" for ma
9090

9191
===Address Types===
9292

93-
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.
93+
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>).
9494

9595
Currently defined flags:
9696

97-
* 0x0001 - P2PKH
98-
* 0x0002 - P2WPKH
99-
* 0x0004 - P2TR
97+
{| class="wikitable"
98+
! Address Type !! Flag !! Value
99+
|-
100+
| P2PKH || <code>1 << 0</code> || <code>0x0001</code>
101+
|-
102+
| P2WPKH || <code>1 << 1</code> || <code>0x0002</code>
103+
|-
104+
| P2TR || <code>1 << 2</code> || <code>0x0004</code>
105+
|}
100106

101107
The remaining flags are reserved for future address types.
102108

0 commit comments

Comments
 (0)