summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicolas.dorier <nicolas.dorier@gmail.com>2020-05-28 13:30:34 +0900
committernicolas.dorier <nicolas.dorier@gmail.com>2020-05-28 13:30:34 +0900
commitf62ceee781ae80ca704effb15dc35ab1eebade1a (patch)
tree7273da121aa46032fe6b4269931dabfbb4bc4480
parent633f94d0056dd3aec8ed89343fcfa37f8905e117 (diff)
downloadbips-f62ceee781ae80ca704effb15dc35ab1eebade1a.tar.xz
Remove uneeded error message, add more details on the original/proposal PSBT requirements
-rw-r--r--bip-xxxx.mediawiki38
1 files changed, 23 insertions, 15 deletions
diff --git a/bip-xxxx.mediawiki b/bip-xxxx.mediawiki
index 7334e30..58dcd97 100644
--- a/bip-xxxx.mediawiki
+++ b/bip-xxxx.mediawiki
@@ -98,6 +98,26 @@ To ensure compatibility with web-wallets and browser-based-tools, all responses
The sender must ensure that the url refers to a scheme or protocol using authenticated encryption, for example TLS with certificate validation, or a .onion link to a hidden service whose public key identifier has already been communicated via a TLS connection. Senders SHOULD NOT accept a url representing an unencrypted or unauthenticated connection.
+The original PSBT MUST:
+* Have all the `witnessUTXO` or `nonWitnessUTXO` information filled in.
+* Be finalized.
+* Not including fields unneeded for the receiver such as global xpubs or keypath information.
+* Be broadcastable.
+
+The original PSBT MAY:
+* Have outputs unrelated to the payment for batching purpose.
+
+The payjoin proposal MUST:
+* Use all the inputs from the original PSBT.
+* Only finalize the inputs added by the receiver.
+* Have all the `witnessUTXO` or `nonWitnessUTXO` information filled in.
+* Keep all the outputs unrelated to the payment.
+
+The payjoin proposal MAY:
+* Add inputs.
+* Add outputs.
+* Modify payment's output.
+
===Receiver's well known errors===
If for some reason the receiver is unable to create a payjoin proposal, it will reply with a HTTP code different than 200.
@@ -116,29 +136,17 @@ The well-known error codes are:
!Error code
!Meaning
|-
-|leaking-data
-|Key path information or GlobalXPubs should not be included in the original PSBT.
-|-
-|psbt-not-finalized
-|The original PSBT must be finalized.
-|-
|unavailable
|The payjoin endpoint is not available for now.
|-
|not-enough-money
|The receiver added some inputs but could not bump the fee of the payjoin proposal.
|-
-|insane-psbt
-|Some consistency check on the PSBT failed.
-|-
|version-unsupported
|This version of payjoin is not supported.
|-
-|need-utxo-information
-|The witness UTXO or non witness UTXO is missing
-|-
-|invalid-transaction
-|The original transaction is invalid for payjoin
+|original-psbt-rejected
+|The receiver rejected the original PSBT.
|}
The receiver is allowed to return implementation specific errors which may assist the sender to diagnose any issue.
@@ -147,7 +155,7 @@ However, it is important that error codes that are not well-known and that the m
Such error codes or messages could be used maliciously to phish a non technical user.
Instead those errors or messages can only appear in debug logs.
-It is advised to hard code the description of the error codes into the sender's software.
+It is advised to hard code the description of the wellknown error codes into the sender's software.
===Receiver's original PSBT checklist===