From 8e19dfa35ba6e1f198a3218892aad8f420cadba8 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Thu, 9 Jul 2020 17:38:05 -0400 Subject: [PATCH] Specify PSET --- doc/pset.mediawiki | 443 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 443 insertions(+) create mode 100644 doc/pset.mediawiki diff --git a/doc/pset.mediawiki b/doc/pset.mediawiki new file mode 100644 index 0000000000..799ed9400b --- /dev/null +++ b/doc/pset.mediawiki @@ -0,0 +1,443 @@ +Note that this format is not yet implemented by Elements. + +
+  BIP: PSET
+  Layer: Applications
+  Title: Partially Signed Elements Transaction Format
+  Author: Andrew Chow 
+  Comments-Summary: No comments yet.
+  Status: Proposed
+  Type: Standards Track
+  Created: 2020-07-09
+  License: BSD-2-Clause
+
+ +==Introduction== + +===Abstract=== + +This document describes proprietary extensions to the BIP 174 Partially Signed Bitcoin Transaction format. +These extensions are for use in Elements Sidechains to hold the information necessary for +Confidential Transactions, Confidential Assets, and Peg-in transactions. + +===Copyright=== + +This BIP is licensed under the 2-clause BSD license. + +==Specification== + +The Partially Signed ELements Transaction (PSET) format is identical to the BIP 370 PSBT format. +The changes are new proprietary type fields, a new magic sequence, and new roles. +The fields added for PSET are only allowed when the PSBT version is 2. + +For elements, the identifier prefix string is pset. +Note that previous implementations of PSET used a different prefix string and had different fields. +The use of a new identifier prefix is to avoid conflicts with the previous implementations. + +The currently defined elements global proprietary types are as follows: + +{| +! Name +! +! +! Description +! +! Description +! Versions Requiring Inclusion +! Versions Requiring Exclusion +! Versions Allowing Inclusion +|- +| Scalar Offset +| PSBT_ELEMENTS_GLOBAL_SCALAR = 0x00 +| <32 byte scalar> +| A 32 byte Scalar Offset computed by a blinder. +| None +| No value. The value must have a length of zero. +| +| 0 +| 2 +|- +| Elements Transaction Modifiable Flag +| PSBT_ELEMENTS_GLOBAL_TX_MODIFIABLE = 0x01 +| None +| No key data +| <8-bit uint> +| An 8 bit little endian unsigned integer as a bitfield for various elements specific transaction modification flags. Bit 0 is the PSBT Blinded flag and it is set to 1 to indicate that the PSET has not been blinded yet. Once all confidential values, rangeproofs, and asset surjection proofs have been attached to the PSET, it must be set to 0. +| +| 0 +| 2 +|} + +The currently defined elements per-input proprietary types are as folows: + +{| +! Name +! +! +! Description +! +! Description +! Versions Requiring Inclusion +! Versions Requiring Exclusion +! Versions Allowing Inclusion +|- +| Issuance Value +| PSBT_ELEMENTS_IN_ISSUANCE_VALUE = 0x00 +| None +| No key data +| <64-bit int> +| The explicit little endian 64-bit integer for the value of this issuance. This is mutually exclusive with PSBT_ELEMENTS_IN_ISSUANCE_VALUE_COMMITMENT +| +| 0 +| 2 +|- +| Issuance Value Commitment +| PSBT_ELEMENTS_IN_ISSUANCE_VALUE_COMMITMENT = 0x01 +| None +| No key data +| <33 byte commitment> +| The 33 byte Value Commitment. This is mutually exclusive with PSBT_IN_ISSUANCE_VALUE. +| +| 0 +| 2 +|- +| Issuance Value Rangeproof +| PSBT_ELEMENTS_IN_ISSUANCE_VALUE_RANGEPROOF = 0x02 +| None +| No key data +| +| The rangeproof +| +| 0 +| 2 +|- +| Issuance Inflation Keys Rangeproof +| PSBT_ELEMENTS_IN_ISSUANCE_KEYS_RANGEPROOF = 0x03 +| None +| No key data +| +| The rangeproof +| +| 0 +| 2 +|- +| Peg-in Transaction +| PSBT_ELEMENTS_IN_PEG_IN_TX = 0x04 +| None +| No key data +| +| The Peg-in Transaction serialized without witnesses. +| +| 0 +| 2 +|- +| Peg-in Transaction Output Proof +| PSBT_ELEMENTS_IN_PEG_IN_TXOUT_PROOF = 0x05 +| None +| No key data +| +| The transaction output proof for the Peg-in Transaction. +| +| 0 +| 2 +|- +| Peg-in Genesis Hash +| PSBT_ELEMENTS_IN_PEG_IN_GENESIS = 0x06 +| None +| No key data +| +| The 32 byte genesis hash for the Peg-in Transaction. +| +| 0 +| 2 +|- +| Peg-in Claim Script +| PSBT_ELEMENTS_IN_PEG_IN_CLAIM_SCRIPT = 0x07 +| None +| No key data +|