Commit 9d3d326
committed
Add static invoice server messages and boilerplate
Because async recipients are not online to respond to invoice requests,
the plan is for another node on the network that is always-online to serve
static invoices on their behalf.
The protocol is as follows:
- Recipient is configured with blinded message paths to reach the static invoice
server
- On startup, recipient requests blinded message paths for inclusion in their
offer from the static invoice server over the configured paths
- Server replies with offer paths for the recipient
- Recipient builds their offer using these paths and the corresponding static
invoice and replies with the invoice
- Server persists the invoice and confirms that they've persisted it, causing
the recipient to cache the interactively built offer for use
At pay-time, the payer sends an invoice request to the static invoice server,
who replies with the static invoice after forwarding the invreq to the
recipient (to give them a chance to provide a fresh invoice in case they're
online).
Here we add the requisite trait methods and onion messages to support this
protocol.1 parent 606d4b0 commit 9d3d326
File tree
7 files changed
+317
-7
lines changed- fuzz/src
- lightning/src
- ln
- offers
- onion_message
7 files changed
+317
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
124 | 148 | | |
125 | 149 | | |
126 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
12562 | 12565 | | |
12563 | 12566 | | |
12564 | 12567 | | |
| 12568 | + | |
| 12569 | + | |
| 12570 | + | |
| 12571 | + | |
| 12572 | + | |
| 12573 | + | |
| 12574 | + | |
| 12575 | + | |
| 12576 | + | |
| 12577 | + | |
| 12578 | + | |
| 12579 | + | |
| 12580 | + | |
| 12581 | + | |
| 12582 | + | |
| 12583 | + | |
| 12584 | + | |
| 12585 | + | |
| 12586 | + | |
| 12587 | + | |
| 12588 | + | |
12565 | 12589 | | |
12566 | 12590 | | |
12567 | 12591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
154 | 170 | | |
155 | 171 | | |
156 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
533 | 540 | | |
534 | 541 | | |
535 | 542 | | |
| |||
0 commit comments