Commit 6282ffb
committed
Announce allowed purposes in gateway
This change signals to relays (see payjoin/ohttp-relay#58) that even if
the gateway is not known to the relay, requests are still allowed for
the purposes of BIP 77.
Because receivers choose the directory (which is its own gateway), but
senders choose the relay, before introducing this functionality it this
would have been the responsibility of the sender (or more realistically
their wallet vendor) to choose an appropriate relay, one that accepts
requests on behalf of the receiver's chosen directory.
Rationale for adding a UUID: although arguably 64 bits of randomness is
more than enough, and even just the string "BIP 77" is likely to be
unique and unambiguous, adding a UUID practically ensures an opt-in is
really an opt-in as 128 random bits would not be repeated except
intentionally.
Rationale for format: we just need a set of opaque identifiers, encoding
the same way as TLS ALPN does makes sense since that's well specified,
binary safe, easy to parse and places readonable limits on string
lengths.1 parent 8649acf commit 6282ffb
1 file changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
426 | 427 | | |
427 | 428 | | |
428 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
429 | 440 | | |
430 | 441 | | |
431 | 442 | | |
| |||
440 | 451 | | |
441 | 452 | | |
442 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
443 | 471 | | |
444 | 472 | | |
445 | 473 | | |
| |||
0 commit comments