From 88fb2052647f5f7a73127dad7ad6f4d46149cf79 Mon Sep 17 00:00:00 2001
From: Andrew Chow <achow101-github@achow101.com>
Date: Thu, 14 Jan 2021 16:09:52 -0500
Subject: Combine Appendix with field listing tables

---
 bip-0174.mediawiki | 152 +++++++++--------------------------------------------
 1 file changed, 26 insertions(+), 126 deletions(-)

(limited to 'bip-0174.mediawiki')

diff --git a/bip-0174.mediawiki b/bip-0174.mediawiki
index 303c001..81958fd 100644
--- a/bip-0174.mediawiki
+++ b/bip-0174.mediawiki
@@ -94,6 +94,7 @@ The currently defined global types are as follows:
 ! Versions Requiring Inclusion
 ! Versions Requiring Exclusion
 ! Versions Allowing Inclusion
+! Parent BIP
 |-
 | Unsigned Transaction
 | <tt>PSBT_GLOBAL_UNSIGNED_TX = 0x00</tt>
@@ -104,6 +105,7 @@ The currently defined global types are as follows:
 | 0
 |
 | 0
+| 174
 |-
 | Extended Public Key
 | <tt>PSBT_GLOBAL_XPUB = 0x01</tt>
@@ -114,6 +116,7 @@ The currently defined global types are as follows:
 |
 |
 | 0
+| 174
 |-
 | PSBT Version Number
 | <tt>PSBT_GLOBAL_VERSION = 0xFB</tt>
@@ -124,6 +127,7 @@ The currently defined global types are as follows:
 |
 |
 | 0
+| 174
 |-
 | Proprietary Use Type
 | <tt>PSBT_GLOBAL_PROPRIETARY = 0xFC</tt>
@@ -134,6 +138,7 @@ The currently defined global types are as follows:
 |
 |
 | 0
+| 174
 |}
 
 The currently defined per-input types are defined as follows:
@@ -148,6 +153,7 @@ The currently defined per-input types are defined as follows:
 ! Versions Requiring Inclusion
 ! Versions Requiring Exclusion
 ! Versions Allowing Inclusion
+! Parent BIP
 |-
 | Non-Witness UTXO
 | <tt>PSBT_IN_NON_WITNESS_UTXO = 0x00</tt>
@@ -158,6 +164,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Witness UTXO
 | <tt>PSBT_IN_WITNESS_UTXO = 0x01</tt>
@@ -168,6 +175,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Partial Signature
 | <tt>PSBT_IN_PARTIAL_SIG = 0x02</tt>
@@ -178,6 +186,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Sighash Type
 | <tt>PSBT_IN_SIGHASH_TYPE = 0x03</tt>
@@ -188,6 +197,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Redeem Script
 | <tt>PSBT_IN_REDEEM_SCRIPT = 0x04</tt>
@@ -198,6 +208,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Witness Script
 | <tt>PSBT_IN_WITNESS_SCRIPT = 0x05</tt>
@@ -208,6 +219,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | BIP 32 Derivation Path
 | <tt>PSBT_IN_BIP32_DERIVATION = 0x06</tt>
@@ -218,6 +230,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Finalized scriptSig
 | <tt>PSBT_IN_FINAL_SCRIPTSIG = 0x07</tt>
@@ -228,6 +241,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Finalized scriptWitness
 | <tt>PSBT_IN_FINAL_SCRIPTWITNESS = 0x08</tt>
@@ -238,6 +252,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Proof-of-reserves commitment
 | <tt>PSBT_IN_POR_COMMITMENT = 0x09</tt>
@@ -248,6 +263,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| [[bip-0127.mediawiki|127]]
 |-
 | RIPEMD160 preimage
 | <tt>PSBT_IN_RIPEMD160 = 0x0a</tt>
@@ -258,6 +274,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | SHA256 preimage
 | <tt>PSBT_IN_SHA256 = 0x0b</tt>
@@ -268,6 +285,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | HASH160 preimage
 | <tt>PSBT_IN_HASH160 = 0x0c</tt>
@@ -278,6 +296,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | HASH256 preimage
 | <tt>PSBT_IN_HASH256 = 0x0d</tt>
@@ -288,6 +307,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |-
 | Proprietary Use Type
 | <tt>PSBT_IN_PROPRIETARY = 0xFC</tt>
@@ -298,6 +318,7 @@ The currently defined per-input types are defined as follows:
 |
 |
 | 0
+| 174
 |}
 
 The currently defined per-output <ref>'''Why do we need per-output data?''' Per-output data allows signers
@@ -314,6 +335,7 @@ determine which outputs are change outputs and verify that the change is returni
 ! Versions Requiring Inclusion
 ! Versions Requiring Exclusion
 ! Versions Allowing Inclusion
+! Parent BIP
 |-
 | Redeem Script
 | <tt>PSBT_OUT_REDEEM_SCRIPT = 0x00</tt>
@@ -324,6 +346,7 @@ determine which outputs are change outputs and verify that the change is returni
 |
 |
 | 0
+| 174
 |-
 | Witness Script
 | <tt>PSBT_OUT_WITNESS_SCRIPT = 0x01</tt>
@@ -334,6 +357,7 @@ determine which outputs are change outputs and verify that the change is returni
 |
 |
 | 0
+| 174
 |-
 | BIP 32 Derivation Path
 | <tt>PSBT_OUT_BIP32_DERIVATION = 0x02</tt>
@@ -344,6 +368,7 @@ determine which outputs are change outputs and verify that the change is returni
 |
 |
 | 0
+| 174
 |-
 | Proprietary Use Type
 | <tt>PSBT_OUT_PROPRIETARY = 0xFC</tt>
@@ -354,6 +379,7 @@ determine which outputs are change outputs and verify that the change is returni
 |
 |
 | 0
+| 174
 |}
 
 Types can be skipped when they are unnecessary. For example, if an input is a witness
@@ -817,129 +843,3 @@ and for coming up with the name and abbreviation of PSBT.
 
 Thanks to Pieter Wuille, Gregory Maxwell, Jonathan Underwood, Daniel Cousens and those who commented on the bitcoin-dev mailing list for additional comments
 and suggestions for improving this proposal.
-
-==Appendix A: Data types and their specifications==
-
-Any data types, their associated scope and BIP number must be defined here
-
-{| class="wikitable" style="width: auto; text-align: center; font-size: smaller; table-layout: fixed;"
-!Scope
-!Type values
-!Name
-!BIP Number
-|-
-| Global
-| 0
-| PSBT_GLOBAL_UNSIGNED_TX
-| BIP 174
-|-
-| Global
-| 1
-| PSBT_GLOBAL_XPUB
-| BIP 174
-|-
-| Global
-| 251
-| PSBT_GLOBAL_VERSION
-| BIP 174
-|-
-| Global
-| 252
-| PSBT_GLOBAL_PROPRIETARY
-| BIP 174
-|-
-| Input
-| 0
-| PSBT_IN_NON_WITNESS_UTXO
-| BIP 174
-|-
-| Input
-| 1
-| PSBT_IN_WITNESS_UTXO
-| BIP 174
-|-
-| Input
-| 2
-| PSBT_IN_PARTIAL_SIG
-| BIP 174
-|-
-| Input
-| 3
-| PSBT_IN_SIGHASH_TYPE
-| BIP 174
-|-
-| Input
-| 4
-| PSBT_IN_REDEEM_SCRIPT
-| BIP 174
-|-
-| Input
-| 5
-| PSBT_IN_WITNESS_SCRIPT
-| BIP 174
-|-
-| Input
-| 6
-| PSBT_IN_BIP32_DERIVATION
-| BIP 174
-|-
-| Input
-| 7
-| PSBT_IN_FINAL_SCRIPTSIG
-| BIP 174
-|-
-| Input
-| 8
-| PSBT_IN_FINAL_SCRIPTWITNESS
-| BIP 174
-|-
-| Input
-| 9
-| PSBT_IN_POR_COMMITMENT
-| [[bip-0127.mediawiki|BIP 127]]
-|-
-| Input
-| 10
-| PSBT_IN_RIPEMD160
-| BIP 174
-|-
-| Input
-| 11
-| PSBT_IN_SHA256
-| BIP 174
-|-
-| Input
-| 12
-| PSBT_IN_HASH160
-| BIP 174
-|-
-| Input
-| 13
-| PSBT_IN_HASH256
-| BIP 174
-|-
-| Input
-| 252
-| PSBT_IN_PROPRIETARY
-| BIP 174
-|-
-| Output
-| 0
-| PSBT_OUT_REDEEM_SCRIPT
-| BIP 174
-|-
-| Output
-| 1
-| PSBT_OUT_WITNESS_SCRIPT
-| BIP 174
-|-
-| Output
-| 2
-| PSBT_OUT_BIP32_DERIVATION
-| BIP 174
-|-
-| Output
-| 252
-| PSBT_OUT_PROPRIETARY
-| BIP 174
-|}
-- 
cgit v1.2.3

