Skip to content

Document BIP77 v1 fallback behavior in create_post_request - #1593

Merged
DanGould merged 2 commits into
payjoin:masterfrom
DanGould:bip77-v1-fallback-doc
Jun 5, 2026
Merged

DanGould merged 2 commits into
payjoin:masterfrom
DanGould:bip77-v1-fallback-doc

Conversation

@DanGould

@DanGould DanGould commented Jun 1, 2026

Copy link
Copy Markdown
Member

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:

DanGould added 2 commits June 1, 2026 17:27
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.
@DanGould DanGould added the documentation Improvements or additions to documentation label Jun 1, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 26746893474

Coverage remained the same at 85.31%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13846
Covered Lines: 11812
Line Coverage: 85.31%
Coverage Strength: 391.26 hits per line

💛 - Coveralls

@DanGould
DanGould requested a review from benalleng June 1, 2026 09:52

@benalleng benalleng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5d70e3f reads well to me 👍

Image

@xstoicunicornx xstoicunicornx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5d70e3f

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bc1cindy bc1cindy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@DanGould
DanGould merged commit 91046a7 into payjoin:master Jun 5, 2026
23 checks passed
@benalleng benalleng mentioned this pull request Jun 7, 2026
17 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants