mirror of
https://github.com/bitcoin/bips.git
synced 2025-03-18 05:42:12 +01:00
Clarify output script and sp info mutual exclusion and unique id
This commit is contained in:
parent
c12ea5ac58
commit
d29e2f81af
@ -37,8 +37,6 @@ Therefore, new fields and role responsibilities must be added to carry, compute,
|
||||
|
||||
This document specifies new fields and new field inclusion/exclusion requirements.
|
||||
|
||||
<tt>PSBT_OUT_SCRIPT</tt> is modified to be optional for outputs in silent payments capable PSBTs. If this field is not included in the output, then the field PSBT_OUT_SP_V0_INFO must be included.
|
||||
|
||||
The new global types are defined as follows:
|
||||
|
||||
{|
|
||||
@ -97,9 +95,16 @@ One new per-output type is defined as follows:
|
||||
| 2
|
||||
|}
|
||||
|
||||
<tt>PSBT_OUT_SCRIPT</tt> is modified to be optional for outputs in silent payments capable PSBTs. If this field is not included in the output, then the field PSBT_OUT_SP_V0_INFO must be included.
|
||||
If a PSBT_OUT_SCRIPT is not present for an output, then that output is being sent to a silent payment address represented by PSBT_OUT_SP_V0_INFO but the script has not yet been computed.
|
||||
If both PSBT_OUT_SCRIPT and PSBT_OUT_SP_V0_INFO are present for an output, then the PSBT_OUT_SCRIPT is the computed output script corresponding to the silent payment address in PSBT_OUT_SP_V0_INFO.
|
||||
If only PSBT_OUT_SCRIPT is present for an output, then the output is not being sent to a silent payment address.
|
||||
|
||||
===Unique Identification===
|
||||
|
||||
Silent payment capable PSBTs can be uniquely identified the same way as PSBTv2s, except when including silent payment outputs. For silent payment capable PSBTs, all silent payment outputs must use the PSBT_OUT_SP_V0_INFO instead of PSBT_OUT_SCRIPT as the output script when creating the unsigned transaction used for unique identification.
|
||||
Silent payment capable PSBTs can be uniquely identified the same way as PSBTv2s, except when including silent payment outputs. If an output contains the the PSBT_OUT_SP_V0_INFO field, it must use that field instead of PSBT_OUT_SCRIPT as the output script when creating the unsigned transaction used for unique identification.<ref name="why_use_sp_info_field"> ''' Why use PSBT_OUT_SP_V0_INFO when serializing for a unique identifier?''' Since the same silent payment capable PSBT is valid whether or not a PSBT_OUT_SCRIPT is included in an output that has PSBT_OUT_SP_V0_INFO set, using the PSBT_OUT_SCRIPT if present for the unique identifier will cause malleability. The identifier will be different depending on whether PSBT_OUT_SCRIPT is present, so always using PSBT_OUT_SP_V0_INFO if it exists makes sure the PSBT is always identified uniquely.</ref>
|
||||
The PSBT_OUT_SP_V0_INFO should be serialized as a zero byte for the version, followed by the 33 bytes of the scan key and then 33 bytes for the spend key.
|
||||
|
||||
|
||||
==Roles==
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user