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:
parent
1a75a3dc13
commit
1c4fe8dfea
95
bip-0077.md
95
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
|
||||
### Async Payjoin Directory Mediated 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<br/>for Original PSBT
|
||||
activate D
|
||||
S->>D: POST Request<br/>Original PSBT
|
||||
D->>R: GET Response<br/>Original PSBT
|
||||
deactivate D
|
||||
|
||||
S-->>D: Poll GET Requests<br/>for Proposal PSBT
|
||||
activate D
|
||||
R->>D: POST Request<br/>Proposal PSBT
|
||||
D->>S: GET Response<br/>Proposal PSBT
|
||||
deactivate D
|
||||
|
||||
S->>N: Broadcast Payjoin
|
||||
```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<br/>FROM: Client IP<br/>[+ Encapsulated Request]
|
||||
R->>G: Gateway Request<br/>FROM: Relay IP<br/>[+ Encapsulated Request]
|
||||
G->>D: Request
|
||||
D->>G: Response
|
||||
G->>R: Gateway Response<br/>TO: Relay IP<br/>[+ Encapsulated Response]
|
||||
R->>C: Relay Response<br/>TO: Client IP<br/>[+ 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user