From 8d66a06d62ad5975a0815c5444302936e0929c13 Mon Sep 17 00:00:00 2001 From: Dan Gould Date: Thu, 18 Dec 2025 05:09:09 -0500 Subject: [PATCH] Change sequence diagrams to text format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated sequence diagrams to use text format instead of mermaid syntax. I cargo cult'd the RFC Rules: > “How are images handled for the plain text version of an RFC?” > The RFC Editor will accept both ASCII art and SVG. If only ASCII art is provided, it will be included in all publication formats. If ASCII art and SVG are both provided, ASCII art will be included in the plain text, and SVG in all other outputs. A note indicating alternative artwork is available is strongly advised. If only SVG is provided, a URI will be included in the plain-text publication format pointing to the HTML version. All artwork and figures should have a complete written description to support assisted reader technology. see: https://www.rfc-editor.org/rse/format-faq/ Since BIPs don't publish html/pdf renders, ASCII art seems like the right choice to render everywhere. Since normative prose is already provided, I chose not to include a written description of the diagrams to support assisted reader tech. --- bip-0077.md | 97 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 42 deletions(-) diff --git a/bip-0077.md b/bip-0077.md index d45da9829a..e0129d0cf1 100644 --- a/bip-0077.md +++ b/bip-0077.md @@ -110,31 +110,33 @@ mutually exclusive and only one can be confirmed. Messages are buffered in the directory, allowing both parties to tolerate temporary disconnections and resume communication by polling. -### Sequence Diagram - -```mermaid -sequenceDiagram - title Async Payjoin Sequence Diagram - participant R as Receiver - participant D as Directory - participant S as Sender - participant N as Network - - R-)S: Payjoin URI (BIP 21) out of band - - R-->>D: Poll GET Requests
for Original PSBT - activate D  - S->>D: POST Request
Original PSBT - D->>R: GET Response
Original PSBT - deactivate D - - S-->>D: Poll GET Requests
for Proposal PSBT - activate D - R->>D: POST Request
Proposal PSBT - D->>S: GET Response
Proposal PSBT - deactivate D - - S->>N: Broadcast Payjoin +### Async Payjoin Directory Mediated Sequence Diagram + +```text + +----------+ +------------+ +----------+ +----------+ + | Receiver | | Directory | | Sender | | Network | + +----+-----+ +-----+------+ +----+-----+ +----+-----+ + | | | | + | Payjoin URI (BIP21), out-of-band | | + +------------------------------------------------>| | + | | | | + | Poll GET: original PSBT (repeat until available) | + +- - - - - - - - - - - ->+ | | + | # POST: original PSBT | | + | #<-----------------------+ | + | 200 OK: original PSBT # | | + |<-----------------------+ | | + | | | | + | | Poll GET: proposal PSBT (repeat until available) + | +<- - - - - - - - - - - -+ | + | POST: proposal PSBT # | | + +-----------------------># | | + | # 200 OK: proposal PSBT | | + | +----------------------->| | + | | | | + | | | Broadcast payjoin | + | | +---------------------->| + | | | | ``` ## Specification @@ -470,23 +472,34 @@ to mailbox endpoint URLs for backwards compatibility with BIP 78 senders. #### OHTTP Sequence Diagram -```mermaid -sequenceDiagram - title OHTTP Sequence Diagram - participant C as Client - participant R as OHTTP Relay - - box PaleVioletRed Payjoin Directory - participant G as OHTTP Gateway - participant D as HTTP Resource - end - - C->>R: Relay Request
FROM: Client IP
[+ Encapsulated Request] - R->>G: Gateway Request
FROM: Relay IP
[+ Encapsulated Request] - G->>D: Request - D->>G: Response - G->>R: Gateway Response
TO: Relay IP
[+ Encapsulated Response] - R->>C: Relay Response
TO: Client IP
[+ Encapsulated Response] +```text + .-------------------------------------------. + | Payjoin Directory | + +--------+ +-----------+ | +-------------+ +--------------+ | + | Client | | OHTTP | | | OHTTP | | HTTP | | + | | | Relay | | | Gateway | | Resource | | + +---+----+ +------+----+ | +-----+-------+ +------+-------+ | + | | `--------|-----------------------|----------' + | Relay Request | | | + | [ + Encapsulated | | | + | Request ] | | | + +------------------->| Gateway Request | | + | | [ + Encapsulated | | + | | Request ] | | + | +------------------->| Request | + | | +---------------------->| + | | | | + | | | Response | + | | Gateway |<----------------------+ + | | Response | | + | | [ + Encapsulated | | + | | Response ] | | + | Relay |<-------------------+ | + | Response | | | + | [ + Encapsulated | | | + | Response ] | | | + |<-------------------+ | | + | | | | ``` ### Relay/Directory interactions