1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-01-19 15:03:08 +00:00

BIP77: Change sequence diagrams to text format (#2064)

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.
This commit is contained in:
Dan Gould 2026-01-14 04:50:52 +08:00 committed by GitHub
parent 1a75a3dc13
commit 1c4fe8dfea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,31 +110,33 @@ mutually exclusive and only one can be confirmed.
Messages are buffered in the directory, allowing both parties to tolerate Messages are buffered in the directory, allowing both parties to tolerate
temporary disconnections and resume communication by polling. temporary disconnections and resume communication by polling.
### Sequence Diagram ### Async Payjoin Directory Mediated Sequence Diagram
```mermaid ```text
sequenceDiagram +----------+ +------------+ +----------+ +----------+
title Async Payjoin Sequence Diagram | Receiver | | Directory | | Sender | | Network |
participant R as Receiver +----+-----+ +-----+------+ +----+-----+ +----+-----+
participant D as Directory | | | |
participant S as Sender | Payjoin URI (BIP21), out-of-band | |
participant N as Network +------------------------------------------------>| |
| | | |
R-)S: Payjoin URI (BIP 21) out of band | Poll GET: original PSBT (repeat until available) |
+- - - - - - - - - - - ->+ | |
R-->>D: Poll GET Requests<br/>for Original PSBT | # POST: original PSBT | |
activate D  | #<-----------------------+ |
S->>D: POST Request<br/>Original PSBT | 200 OK: original PSBT # | |
D->>R: GET Response<br/>Original PSBT |<-----------------------+ | |
deactivate D | | | |
| | Poll GET: proposal PSBT (repeat until available)
S-->>D: Poll GET Requests<br/>for Proposal PSBT | +<- - - - - - - - - - - -+ |
activate D | POST: proposal PSBT # | |
R->>D: POST Request<br/>Proposal PSBT +-----------------------># | |
D->>S: GET Response<br/>Proposal PSBT | # 200 OK: proposal PSBT | |
deactivate D | +----------------------->| |
| | | |
S->>N: Broadcast Payjoin | | | Broadcast payjoin |
| | +---------------------->|
| | | |
``` ```
## Specification ## Specification
@ -470,23 +472,34 @@ to mailbox endpoint URLs for backwards compatibility with BIP 78 senders.
#### OHTTP Sequence Diagram #### OHTTP Sequence Diagram
```mermaid ```text
sequenceDiagram .-------------------------------------------.
title OHTTP Sequence Diagram | Payjoin Directory |
participant C as Client +--------+ +-----------+ | +-------------+ +--------------+ |
participant R as OHTTP Relay | Client | | OHTTP | | | OHTTP | | HTTP | |
| | | Relay | | | Gateway | | Resource | |
box PaleVioletRed Payjoin Directory +---+----+ +------+----+ | +-----+-------+ +------+-------+ |
participant G as OHTTP Gateway | | `--------|-----------------------|----------'
participant D as HTTP Resource | Relay Request | | |
end | [ + Encapsulated | | |
| Request ] | | |
C->>R: Relay Request<br/>FROM: Client IP<br/>[+ Encapsulated Request] +------------------->| Gateway Request | |
R->>G: Gateway Request<br/>FROM: Relay IP<br/>[+ Encapsulated Request] | | [ + Encapsulated | |
G->>D: Request | | Request ] | |
D->>G: Response | +------------------->| Request |
G->>R: Gateway Response<br/>TO: Relay IP<br/>[+ Encapsulated Response] | | +---------------------->|
R->>C: Relay Response<br/>TO: Client IP<br/>[+ Encapsulated Response] | | | |
| | | Response |
| | Gateway |<----------------------+
| | Response | |
| | [ + Encapsulated | |
| | Response ] | |
| Relay |<-------------------+ |
| Response | | |
| [ + Encapsulated | | |
| Response ] | | |
|<-------------------+ | |
| | | |
``` ```
### Relay/Directory interactions ### Relay/Directory interactions