File tree Expand file tree Collapse file tree 1 file changed +14
-28
lines changed
docs/fxrp/token-interactions Expand file tree Collapse file tree 1 file changed +14
-28
lines changed Original file line number Diff line number Diff line change @@ -42,34 +42,20 @@ The x402 implementation consists of four components:
4242
4343## EIP-3009 Payment Flow
4444
45- ```
46- ┌─────────┐ 1. Request Resource ┌─────────────┐
47- │ Agent │ ─────────────────────────────▶│ Server │
48- │ │ ◀───────────────────────────── │ │
49- │ │ 2. 402 + Payment Req │ │
50- │ │ │ │
51- │ │ 3. Sign EIP-712 Auth │ │
52- │ │ (off-chain signature) │ │
53- │ │ │ │
54- │ │ 4. Request + X-Payment │ │
55- │ │ ─────────────────────────────▶│ │
56- │ │ ┌───────────┴─────────────┤
57- │ │ 5. settlePayment() │
58- │ │ │ │
59- │ │ ▼ │
60- │ │ ┌─────────────┐ │
61- │ │ │ Facilitator │ │
62- │ │ └──────┬──────┘ │
63- │ │ │ │
64- │ │ 6. transferWithAuthorization │
65- │ │ │ │
66- │ │ ▼ │
67- │ │ ┌─────────────┐ │
68- │ │ │ MockUSDT0 │ │
69- │ │ └─────────────┘ │
70- │ │ │ │
71- │ │ ◀───────────────────────────── │ │
72- └─────────┘ 7. 200 OK + Resource └─────────────┘
45+ ``` mermaid
46+ sequenceDiagram
47+ participant Agent
48+ participant Server
49+ participant Facilitator
50+ participant MockUSDT0
51+
52+ Agent->>Server: 1. Request Resource
53+ Server-->>Agent: 2. 402 + Payment Req
54+ Agent->>Agent: 3. Sign EIP-712 Auth<br/>(off-chain signature)
55+ Agent->>Server: 4. Request + X-Payment header
56+ Server->>Facilitator: 5. settlePayment()
57+ Facilitator->>MockUSDT0: 6. transferWithAuthorization()
58+ Server-->>Agent: 7. 200 OK + Resource
7359```
7460
7561The flow works as follows:
You can’t perform that action at this time.
0 commit comments