You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bip-0078.mediawiki
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,8 @@ This fee contribution can't be used to pay for anything else than additional inp
147
147
148
148
* <code>minfeerate=</code>, a decimal in satoshi per vbyte that the sender can use to constraint the receiver to not drop the minimum fee rate too much.
149
149
150
+
* <code>disableoutputsubstitution=</code>, a boolean indicating if the sender forbids the receiver to modify his own output, see [[#output-substitution|payment output substitution]]. (default to <code>false</code>)
151
+
150
152
===Receiver's well known errors===
151
153
152
154
If for some reason the receiver is unable to create a payjoin proposal, it will reply with a HTTP code different than 200.
@@ -271,7 +273,7 @@ The sender should check the payjoin proposal before signing it to prevent a mali
271
273
The sender must be careful to only sign the inputs that were present in the original PSBT and nothing else.
272
274
273
275
Note:
274
-
* The sender must allow the receiver to add/remove or modify his own outputs
276
+
* The sender must allow the receiver to add/remove or modify his own outputs (Except is explicitely disabled via the optional parameter <code>disableoutputsubstitution=</code>)
275
277
* The sender should allow the receiver to not add any input. Useful for the receiver to change the paymout output scriptPubKey type.
276
278
* If no input have been added, the sender's wallet implementation should accept the payjoin proposal, but not mark the transaction as an actual payjoin in the user interface.
277
279
@@ -421,7 +423,8 @@ public async Task<PSBT> RequestPayjoin(
421
423
var ourOutputs = new Queue<(TxOut OriginalTxOut, PSBTOutput SignedPSBTOutput)>();
422
424
for (int i = 0; i < originalGlobalTx.Outputs.Count; i++)
423
425
{
424
-
if (signedPSBT.Outputs[i].ScriptPubKey != bip21.Address.ScriptPubKey)
426
+
if (optionalParameters.DisableOutputSubstitution ||
0 commit comments