upleb.uk

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

summaryrefslogtreecommitdiff
path: root/33.md
diff options
context:
space:
mode:
Diffstat (limited to '33.md')
-rw-r--r--33.md25
1 files changed, 23 insertions, 2 deletions
diff --git a/33.md b/33.md
index db572ad..10681fa 100644
--- a/33.md
+++ b/33.md
@@ -10,10 +10,14 @@ This NIP adds a new event range that allows for replacement of events that have
10 10
11Implementation 11Implementation
12-------------- 12--------------
13The value of a tag is defined as the first parameter of a tag after the tag name.
14
13A *parameterized replaceable event* is defined as an event with a kind `30000 <= n < 40000`. 15A *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 16Upon 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 17replaceable event with the same kind, author and first `d` tag value being received, the old event
16SHOULD be discarded and replaced with the newer event. 18SHOULD be discarded, effectively replacing what gets returned when querying for
19`author:kind:d-tag` tuples.
20
17A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the 21A 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` 22value as an empty string. Events from the same author with any of the following `tags`
19replace each other: 23replace each other:
@@ -24,6 +28,23 @@ replace each other:
24* `"tags":[["d",""],["d","not empty"]]`: only first `d` tag is considered 28* `"tags":[["d",""],["d","not empty"]]`: only first `d` tag is considered
25* `"tags":[["d"],["d","some value"]]`: only first `d` tag is considered 29* `"tags":[["d"],["d","some value"]]`: only first `d` tag is considered
26* `"tags":[["e"]]`: same as no tags 30* `"tags":[["e"]]`: same as no tags
31* `"tags":[["d","","1"]]`: only the first value is considered (`""`)
32
33Clients SHOULD NOT use `d` tags with multiple values and SHOULD include the `d` tag even if it has no value to allow querying using the `#d` filter.
34
35Referencing and tagging
36-----------------------
37
38Normally (as per NIP-01, NIP-12) the `"p"` tag is used for referencing public keys and the
39`"e"` tag for referencing event ids and the `note`, `npub`, `nprofile` or `nevent` are their
40equivalents for event tags (i.e. an `nprofile` is generally translated into a tag
41`["p", "<event hex id>", "<relay url>"]`).
42
43To support linking to parameterized replaceable events, the `naddr` code is introduced on
44NIP-19. It includes the public key of the event author and the `d` tag (and relays) such that
45the referenced combination of public key and `d` tag can be found.
46
47The equivalent in `tags` to the `naddr` code is the tag `"a"`, comprised of `["a", "<kind>:<pubkey>:<d-identifier>", "<relay url>"]`.
27 48
28Client Behavior 49Client Behavior
29--------------- 50---------------