upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/15.md
blob: 3ae1ef7883cd2553d5c0f3bbae3dc60c2a4fbd46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
NIP-15
======

End of Stored Events Notice
---------------------------

`draft` `optional` `author:Semisol`

Relays may support notifying clients when all stored events have been sent.

If a client sets `eose_notice` field to `true` in any of the filters in a `REQ` message and the relay supports this NIP, the relay MUST send the client a `EOSE` message in the format `["EOSE", <subscription_id>]` which indicates that all stored events matching the filters specified have been sent and all events from on are newly published events.

Example Subscription Filter
---------------------------

The following provides an example of a filter that requests the `set_metadata` (`0`) event(s) of a pubkey and requests the server to send an end of stored events message.

```
{
  "kinds": [0],
  "authors": ["52b4a076bcbbbdc3a1aefa3735816cf74993b1b8db202b01c883c58be7fad8bd"],
  "eose_notice": true
}
```

Client Behavior
---------------

Clients SHOULD use the `supported_nips` field to learn if a relay supports end of stored events notices.  Clients MAY send filters with `eose_notice` to any relay, if they are prepared to not receive a message from relays that do not support this NIP.

Motivation
----------

The motivation for this proposal is to reduce uncertainty when all events have been sent by a relay to make client code possibly less complex.