1
0
mirror of https://github.com/bitcoin/bips.git synced 2024-11-19 01:40:05 +01:00

Remove uneeded error message, add more details on the original/proposal PSBT requirements

This commit is contained in:
nicolas.dorier 2020-05-28 13:30:34 +09:00
parent 633f94d005
commit f62ceee781
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -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===