Repository navigation
Document BIP77 v1 fallback behavior in create_post_request - #1593
Merged
Merged
Conversation
The doc-comment claimed an OHTTP-encapsulated POST request, but the function branches on the sender's reply key: v2 senders get an HPKE-encrypted POST to the sender's reply mailbox, while v1 (BIP 78-compat) senders get a cleartext PUT to the receiver's own mailbox. Document both paths. Note: the function is not renamed because the POST/PUT distinction only applies to the OHTTP-encapsulated request. The request to the OHTTP Relay is still POST, only the inner message is distinguished. Refs payjoin#1487. Companion to a bitcoin/bips spec patch aligning BIP 77 Backwards Compatibility with the implemented behavior.
Mirror the doc-comment fix on the core method so the FFI binding exposes the same v2-vs-v1 branching semantics across the C#, Python, Dart, and JavaScript surfaces. Refs payjoin#1487.
Collaborator
Coverage Report for CI Build 26746893474Coverage remained the same at 85.31%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
xstoicunicornx
approved these changes
Jun 1, 2026
| pub fn psbt(&self) -> &Psbt { &self.psbt_context.payjoin_psbt } | ||
|
|
||
| /// Construct an OHTTP Encapsulated HTTP POST request for the Proposal PSBT | ||
| /// Construct an OHTTP-encapsulated HTTP request carrying the Proposal PSBT. |
Collaborator
There was a problem hiding this comment.
small nit:
Suggested change
| /// Construct an OHTTP-encapsulated HTTP request carrying the Proposal PSBT. | |
| /// Construct an OHTTP-encapsulated HTTP request carrying the Proposal PSBT to be sent to the payjoin directory. |
Maybe this is already obvious, but as someone who is not as familiar with BIP 77 scheme I think it adds clarity that both sender and receiver mailbox live at the same payjoin directory.
17 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Re: #1487 along with bitcoin/bips/pull/2186
Documents v2-receiving-v1-fallback behavior in both core lib and ffi.
Asked claude to draft and manually reviewed each line based on bip change.
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.