upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSemisol <45574030+Semisol@users.noreply.github.com>2023-01-04 16:20:27 +0300
committerGitHub <noreply@github.com>2023-01-04 10:20:27 -0300
commit018c45966e4fbd21f26718e4ca17a9e16f36bb31 (patch)
treeceafef09e15117fc10657d9ca364ab8d6de4169d
parent39aec23a1d79067e6449d4af16f89aae37d62ca6 (diff)
Add NIP-33 Parameterized replaceable events (#54)
Co-authored-by: Semisol <45574030+Semisol@users.noreply.github.com> Co-authored-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
-rw-r--r--33.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/33.md b/33.md
new file mode 100644
index 0000000..feb62a6
--- /dev/null
+++ b/33.md
@@ -0,0 +1,32 @@
1NIP-33
2======
3
4Parameterized Replaceable Events
5--------------------------------
6
7`draft` `optional` `author:Semisol` `author:Kukks` `author:Cameri` `author:fiatjaf`
8
9This NIP adds a new event range that allows for replacement of events that have the same `d` tag and kind unlike NIP-16 which only replaced by kind.
10
11Implementation
12--------------
13A *parameterized replaceable event* is defined as an event with a kind `30000 <= n < 40000`.
14Upon a parameterized replaceable event with a newer timestamp than the currently known latest
15replaceable event with the same kind and first `d` tag value being received, the old event
16SHOULD be discarded and replaced with the newer event.
17A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the
18value as an empty string. Events from the same author with any of the following `tags`
19replace each other:
20
21* `"tags":[["d",""]]`
22* `"tags":[]`: implicit `d` tag with empty value
23* `"tags":[["d"]]`: implicit empty value `""`
24* `"tags":[["d",""],["d","not empty"]]`: only first `d` tag is considered
25* `"tags":[["d"],["d","some value"]]`: only first `d` tag is considered
26* `"tags":[["e"]]`: same as no tags
27
28Client Behavior
29---------------
30
31Clients SHOULD use the `supported_nips` field to learn if a relay supports this NIP.
32Clients MAY send parameterized 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 and are recommended to send a `#d` tag filter. Clients should account for the fact that missing `d` tags or ones with no value are not returned in tag filters, and are recommended to always include a `d` tag with a value.