From 9c57035d5ba087e6f66f4425cd81d05a048089ef Mon Sep 17 00:00:00 2001 From: Clark Moody Date: Fri, 22 Jul 2022 16:29:46 -0500 Subject: [PATCH] Address type flags in a table --- bip-alfredhodler-privatepayments.mediawiki | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bip-alfredhodler-privatepayments.mediawiki b/bip-alfredhodler-privatepayments.mediawiki index 378f75ce..66487fab 100644 --- a/bip-alfredhodler-privatepayments.mediawiki +++ b/bip-alfredhodler-privatepayments.mediawiki @@ -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 (0xffff). Currently defined flags: -* 0x0001 - P2PKH -* 0x0002 - P2WPKH -* 0x0004 - P2TR +{| class="wikitable" +! Address Type !! Flag !! Value +|- +| P2PKH || 1 << 0 || 0x0001 +|- +| P2WPKH || 1 << 1 || 0x0002 +|- +| P2TR || 1 << 2 || 0x0004 +|} The remaining flags are reserved for future address types.