add clarifications with further details.

This commit is contained in:
fiatjaf 2022-07-21 06:41:09 -03:00 committed by William Casarin
parent 3962150f3f
commit c505dcc910

16
21.md
View File

@ -27,6 +27,22 @@ If the signature matches and the event pubkey corresponds to the kind-04 filter
Ids and signatures omitted and pubkeys shortened for readability. Ids and signatures omitted and pubkeys shortened for readability.
### Clarifications
- What happens if the client asks for other stuff at the same time? So for example if you request for mutiple keys do you get mutiple challenges, if you ask for other event kinds as same time do they just come back as normal separately?[^q1]
Relays MUST send a single challenge message and clients are expected to send a single challenge response back. If the client for any reason has more than one identity it should use two different subscriptions.
If the filter has other clauses and is requesting other events (non kind-4) the relay SHOULD return these other events as always, and just leave out the kind-4 ones for after the challenge is completed.
Clients MUST send kind-4 requests for a single pubkey (for each subscription), therefore relays SHOULD ignore subscription requests for kind-4 that define multiple pubkeys or no pubkeys at all.
- What if a client wants to grab only direct messages between two parties, for example with a filter like `{"kinds": [4], "authors": ["d3d3..."], "#e": ["8d8d..."]}`?
In this case relays SHOULD check that there is only one pubkey in either `"authors"` and `"#e"` and accept any of those as the challenge response.
[^q1]: https://t.me/nostr_protocol/26059
Rationale Rationale
--------- ---------