Skip to content

Commit 1c4fe8d

Browse files
authored
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.
1 parent 1a75a3d commit 1c4fe8d

File tree

1 file changed

+55
-42
lines changed

1 file changed

+55
-42
lines changed

bip-0077.md

Lines changed: 55 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -110,31 +110,33 @@ mutually exclusive and only one can be confirmed.
110110
Messages are buffered in the directory, allowing both parties to tolerate
111111
temporary disconnections and resume communication by polling.
112112

113-
### Sequence Diagram
114-
115-
```mermaid
116-
sequenceDiagram
117-
title Async Payjoin Sequence Diagram
118-
participant R as Receiver
119-
participant D as Directory
120-
participant S as Sender
121-
participant N as Network
122-
123-
R-)S: Payjoin URI (BIP 21) out of band
124-
125-
R-->>D: Poll GET Requests<br/>for Original PSBT
126-
activate D 
127-
S->>D: POST Request<br/>Original PSBT
128-
D->>R: GET Response<br/>Original PSBT
129-
deactivate D
130-
131-
S-->>D: Poll GET Requests<br/>for Proposal PSBT
132-
activate D
133-
R->>D: POST Request<br/>Proposal PSBT
134-
D->>S: GET Response<br/>Proposal PSBT
135-
deactivate D
136-
137-
S->>N: Broadcast Payjoin
113+
### Async Payjoin Directory Mediated Sequence Diagram
114+
115+
```text
116+
+----------+ +------------+ +----------+ +----------+
117+
| Receiver | | Directory | | Sender | | Network |
118+
+----+-----+ +-----+------+ +----+-----+ +----+-----+
119+
| | | |
120+
| Payjoin URI (BIP21), out-of-band | |
121+
+------------------------------------------------>| |
122+
| | | |
123+
| Poll GET: original PSBT (repeat until available) |
124+
+- - - - - - - - - - - ->+ | |
125+
| # POST: original PSBT | |
126+
| #<-----------------------+ |
127+
| 200 OK: original PSBT # | |
128+
|<-----------------------+ | |
129+
| | | |
130+
| | Poll GET: proposal PSBT (repeat until available)
131+
| +<- - - - - - - - - - - -+ |
132+
| POST: proposal PSBT # | |
133+
+-----------------------># | |
134+
| # 200 OK: proposal PSBT | |
135+
| +----------------------->| |
136+
| | | |
137+
| | | Broadcast payjoin |
138+
| | +---------------------->|
139+
| | | |
138140
```
139141

140142
## Specification
@@ -470,23 +472,34 @@ to mailbox endpoint URLs for backwards compatibility with BIP 78 senders.
470472

471473
#### OHTTP Sequence Diagram
472474

473-
```mermaid
474-
sequenceDiagram
475-
title OHTTP Sequence Diagram
476-
participant C as Client
477-
participant R as OHTTP Relay
478-
479-
box PaleVioletRed Payjoin Directory
480-
participant G as OHTTP Gateway
481-
participant D as HTTP Resource
482-
end
483-
484-
C->>R: Relay Request<br/>FROM: Client IP<br/>[+ Encapsulated Request]
485-
R->>G: Gateway Request<br/>FROM: Relay IP<br/>[+ Encapsulated Request]
486-
G->>D: Request
487-
D->>G: Response
488-
G->>R: Gateway Response<br/>TO: Relay IP<br/>[+ Encapsulated Response]
489-
R->>C: Relay Response<br/>TO: Client IP<br/>[+ Encapsulated Response]
475+
```text
476+
.-------------------------------------------.
477+
| Payjoin Directory |
478+
+--------+ +-----------+ | +-------------+ +--------------+ |
479+
| Client | | OHTTP | | | OHTTP | | HTTP | |
480+
| | | Relay | | | Gateway | | Resource | |
481+
+---+----+ +------+----+ | +-----+-------+ +------+-------+ |
482+
| | `--------|-----------------------|----------'
483+
| Relay Request | | |
484+
| [ + Encapsulated | | |
485+
| Request ] | | |
486+
+------------------->| Gateway Request | |
487+
| | [ + Encapsulated | |
488+
| | Request ] | |
489+
| +------------------->| Request |
490+
| | +---------------------->|
491+
| | | |
492+
| | | Response |
493+
| | Gateway |<----------------------+
494+
| | Response | |
495+
| | [ + Encapsulated | |
496+
| | Response ] | |
497+
| Relay |<-------------------+ |
498+
| Response | | |
499+
| [ + Encapsulated | | |
500+
| Response ] | | |
501+
|<-------------------+ | |
502+
| | | |
490503
```
491504

492505
### Relay/Directory interactions

0 commit comments

Comments
 (0)