summaryrefslogtreecommitdiff
path: root/bip-0174.mediawiki
diff options
context:
space:
mode:
Diffstat (limited to 'bip-0174.mediawiki')
-rw-r--r--bip-0174.mediawiki19
1 files changed, 15 insertions, 4 deletions
diff --git a/bip-0174.mediawiki b/bip-0174.mediawiki
index 31a593d..f197728 100644
--- a/bip-0174.mediawiki
+++ b/bip-0174.mediawiki
@@ -43,12 +43,12 @@ risk of being defrauded.
==Specification==
The Partially Signed Bitcoin Transaction (PSBT) format consists of key-value maps.
-Each key-value pair must have a unique key within its scope; duplicates are not allowed.
-Each map consists of a sequence of records, terminated by a <tt>0x00</tt> byte <ref>'''Why
+Each map consists of a sequence of key-value records, terminated by a <tt>0x00</tt> byte <ref>'''Why
is the separator here <tt>0x00</tt> instead of <tt>0xff</tt>?'''
The separator here is used to distinguish between each chunk of data. A separator of 0x00 would mean that
the unserializer can read it as a key length of 0, which would never occur with actual keys. It can thus
-be used as a separator and allow for easier unserializer implementation.</ref>. The format
+be used as a separator and allow for easier unserializer implementation.</ref>.
+Each key-value pair must have a unique key within its scope; duplicates are not allowed. The format
of a record is as follows:
Note: <tt><..></tt> indicates that the data is prefixed by a compact size unsigned integer representing
@@ -174,6 +174,12 @@ The currently defined per-input types are defined as follows:
** Value: The Finalized scriptWitness contains a fully constructed scriptWitness with signatures and any other scripts necessary for the input to pass validation.
*** <tt>{scriptWitness}</tt>
+* Type: Proof-of-reserves commitment <tt>PSBT_IN_POR_COMMITMENT = 0x09</tt>
+** Key: None. The key must only contain the 1 byte type.
+*** <tt>{0x09}</tt>
+** Value: The UTF-8 encoded commitment message string for the proof-of-reserves. See [[bip-0127.mediawiki|BIP 127]] for more information.
+*** <tt>{porCommitment}</tt>
+
The currently defined per-output <ref>'''Why do we need per-output data?''' Per-output data allows signers
to verify that the outputs are going to the intended recipient. The output data can also be use by signers to
determine which outputs are change outputs and verify that the change is returning to the correct place.</ref> types are defined as follows:
@@ -375,7 +381,7 @@ All other data except the UTXO and unknown fields in the input key-value map sho
===Transaction Extractor===
The Transaction Extractor must only accept a PSBT.
-It checks whether all inputs have complete scriptSigs and scriptWitnesses by checking for the presence of <tt>0x05</tt> Finalized scriptSig and <tt>0x06</tt> Finalized scriptWitness typed records. If they do, the Transaction Extractor should construct complete scriptSigs and scriptWitnesses and encode them into network serialized transactions. Otherwise the Extractor must not modify the PSBT.
+It checks whether all inputs have complete scriptSigs and scriptWitnesses by checking for the presence of <tt>0x07</tt> Finalized scriptSig and <tt>0x08</tt> Finalized scriptWitness typed records. If they do, the Transaction Extractor should construct complete scriptSigs and scriptWitnesses and encode them into network serialized transactions. Otherwise the Extractor must not modify the PSBT.
The Extractor should produce a fully valid, network serialized transaction if all inputs are complete.
The Transaction Extractor does not need to know how to interpret scripts in order to extract the network serialized transaction. However it may be able to in order to validate the network serialized transaction at the same time.
@@ -698,6 +704,11 @@ Any data types, their associated scope and BIP number must be defined here
| PSBT_IN_FINAL_SCRIPTWITNESS
| BIP 174
|-
+| Input
+| 9
+| PSBT_IN_POR_COMMITMENT
+| [[bip-0127.mediawiki|BIP 127]]
+|-
| Output
| 0
| PSBT_OUT_REDEEM_SCRIPT