Skip to content

Commit

Permalink
slip-0019: Update PSBT section.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkozlik committed Mar 16, 2023
1 parent 2cc39e9 commit 019bcd6
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions slip-0019.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,19 @@ Each input which is registered to take part in a CoinJoin transaction should be

A proof of ownership commits to a particular scriptPubKey, which means that the proof is replayable for UTXOs with the same address. Nevertheless, freshness of such a proof is guaranteed if a nonce (such as the *psbtId*) is included in the *commitmentData*.

## PSBT (BIP 174) extension
## PSBT extension

The following new global field type is added to the BIP-0174 specification:
This section proposes additional fields for [BIP-0174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki) PSBTv0 and [BIP-0370](https://github.com/bitcoin/bips/blob/master/bip-0370.mediawiki) PSBTv2 that allow for SLIP-0019 proofs of ownership to be included in a PSBT of any version.

* Type: PSBT identifier PSBT_GLOBAL_PSBT_ID = 0x0A
* Key: None. The key must only contain the 1 byte type.
* `{0x02}`
* Value: A globally unique PSBT identifier. This value should be used as the *commitmentData* in the *proofFooter*.
* `{psbtId}`
The following new global type is defined:
Name | `<keytype>` | `<keydata>` | `<keydata>` Description | `<valuedata>` | `<valuedata>` Description | Versions Requiring Inclusion | Versions Requiring Exclusion | Versions Allowing Inclusion
-----|-------------|-------------|-------------------------|---------------|---------------------------|------------------------------|------------------------------|----------------------------
Proof-of-ownership commitment data | `PSBT_GLOBAL_OWNERSHIP_COMMITMENT = 0x07` | None | No key data | `<bytes commitmentData>` | The value used as the *commitmentData* in each input's proof-of-ownership. | | | 0, 2

The following new per-input field type is added to the BIP-0174 specification:

* Type: Proof of ownership PSBT_IN_PROOF_OF_OWNERSHIP = 0x0A
* Key: None. The key must only contain the 1 byte type.
* `{0x0A}`
* Value: The *proofOfOwnership* as defined above.
* `{proofOfOwnership}`
The following new per-input type is defined:
Name | `<keytype>` | `<keydata>` | `<keydata>` Description | `<valuedata>` | `<valuedata>` Description | Versions Requiring Inclusion | Versions Requiring Exclusion | Versions Allowing Inclusion
-----|-------------|-------------|-------------------------|---------------|---------------------------|------------------------------|------------------------------|----------------------------
Proof-of-ownership | `PSBT_IN_OWNERSHIP_PROOF = 0x19` | None | No key data | `<bytes proofOfOwnership>` | A *proofOfOwnership* for this input, as defined above, allowing a wallet to determine whether it is able to spend this input or not. | | | 0, 2

## Implementation considerations

Expand Down

0 comments on commit 019bcd6

Please sign in to comment.