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:
authorfiatjaf <fiatjaf@gmail.com>2023-02-04 07:16:16 -0300
committerfiatjaf <fiatjaf@gmail.com>2023-02-04 07:16:16 -0300
commit0acfd0e84badd3bc54f680e3617ab045a844919c (patch)
tree02b238a4ab1770cddf4854e51d505d4f6ca30d78 /33.md
parent7c444e3474167f7dcdcecf28b8679b022996e958 (diff)
declare `nref` on NIP-33. remove need for NIP-01 bridge event.
Diffstat (limited to '33.md')
-rw-r--r--33.md18
1 files changed, 16 insertions, 2 deletions
diff --git a/33.md b/33.md
index 6b05bd0..314cc83 100644
--- a/33.md
+++ b/33.md
@@ -12,10 +12,10 @@ Implementation
12-------------- 12--------------
13The value of a tag is defined as the first parameter of a tag after the tag name. 13The value of a tag is defined as the first parameter of a tag after the tag name.
14 14
15A *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`.
16Upon 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
17replaceable event with the same kind and first `d` tag value being received, the old event 17replaceable event with the same kind and first `d` tag value being received, the old event
18SHOULD be discarded and replaced with the newer event. 18SHOULD be discarded and replaced with the newer event.
19A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the 19A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the
20value as an empty string. Events from the same author with any of the following `tags` 20value as an empty string. Events from the same author with any of the following `tags`
21replace each other: 21replace each other:
@@ -30,6 +30,20 @@ replace each other:
30 30
31Clients 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. 31Clients 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.
32 32
33Referencing and tagging
34-----------------------
35
36Normally (as per NIP-01, NIP-12) the `"p"` tag is used for referencing public keys and the
37`"e"` tag for referencing event ids and the `note`, `npub`, `nprofile` or `nevent` are their
38equivalents for event tags (i.e. an `nprofile` is generally translated into a tag
39`["p", "<event hex id>", "<relay url>"]`).
40
41To support linking to parameterized replaceable events, the `nref` code is introduced on
42NIP-19. It includes the public key of the event author and the `d` tag (and relays) such that
43the referenced combination of public key and `d` tag can be found.
44
45The equivalent in `tags` to the `nref` code is the tag `"f"`, comprised of `["f", "<pubkey>:<d-identifier>", "<relay url>"]`.
46
33Client Behavior 47Client Behavior
34--------------- 48---------------
35 49