upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSemisol <hi@semisol.dev>2022-05-27 19:56:31 +0300
committerSemisol <hi@semisol.dev>2022-05-27 19:56:31 +0300
commit501fd5ce2286e7e7f5e3d7d8b14697486309e7a8 (patch)
tree31e44c7ce380668a8ed760e05302b1bd941f966a
parent1a1e3e74ec40c23e4e5ce0046dd547c847f9a595 (diff)
nip16: kind ranges instead of tags
-rw-r--r--16.md8
1 files changed, 3 insertions, 5 deletions
diff --git a/16.md b/16.md
index e687b81..dba1b9c 100644
--- a/16.md
+++ b/16.md
@@ -10,20 +10,18 @@ Relays may decide to allow replaceable and/or ephemeral events.
10 10
11Replaceable Events 11Replaceable Events
12------------------ 12------------------
13A *replaceable event* is defined as an event with a `replaceable` tag with value `1`. Relays SHOULD treat unknown types as if the event is not replaceable. 13A *replaceable event* is defined as an event with a kind `10000 <= n < 20000`.
14Upon a replaceable event with a newer timestamp than the currently known latest replaceable event with the same kind, the old event SHOULD be discarded and replaced with the newer event. 14Upon a replaceable event with a newer timestamp than the currently known latest replaceable event with the same kind, the old event SHOULD be discarded and replaced with the newer event.
15 15
16Ephemeral Events 16Ephemeral Events
17---------------- 17----------------
18An *ephemeral event* is defined as an event with an `ephemeral` tag with value `1`. Relays are RECOMMENDED to reject unknown types for future extensions. 18An *ephemeral event* is defined as an event with a kind `20000 <= n < 30000`.
19Upon an ephemeral event being received, the relay SHOULD send it to all clients with a matching filter, and MUST NOT store it. 19Upon an ephemeral event being received, the relay SHOULD send it to all clients with a matching filter, and MUST NOT store it.
20 20
21Client Behavior 21Client Behavior
22--------------- 22---------------
23 23
24Clients SHOULD use the `supported_nips` field to learn if a relay supports generic tag queries. Clients SHOULD NOT send ephemeral events to relays that do not support this NIP; they will be persisted. Clients MAY send replaceable events to relays that may not support this NIP, and clients querying SHOULD be prepared for the relay to send multiple events and should use the latest one. 24Clients SHOULD use the `supported_nips` field to learn if a relay supports generic tag queries. Clients SHOULD NOT send ephemeral events to relays that do not support this NIP; they will most likely be persisted. Clients MAY send replaceable events to relays that may not support this NIP, and clients querying SHOULD be prepared for the relay to send multiple events and should use the latest one.
25
26Clients are RECOMMENDED to ignore events without replaceability when requesting replaceable events.
27 25
28Suggested Use Cases 26Suggested Use Cases
29------------------- 27-------------------