upleb.uk

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

summaryrefslogtreecommitdiff
path: root/32.md
diff options
context:
space:
mode:
authorJonathan Staab <shtaab@gmail.com>2023-05-23 14:33:27 -0700
committerJonathan Staab <shtaab@gmail.com>2023-06-13 09:31:15 -0700
commit5b32def861fb114feb564ce2d089b7983639ada8 (patch)
treea684d7908237ac16076fa77657f5d956c43ad800 /32.md
parent95f537e90d568ff23e485f336d251b5d415e1191 (diff)
Move annotations to the label tag for NIP-32. Remove replaceable events
Diffstat (limited to '32.md')
-rw-r--r--32.md30
1 files changed, 13 insertions, 17 deletions
diff --git a/32.md b/32.md
index b84fc64..a16ddf7 100644
--- a/32.md
+++ b/32.md
@@ -6,7 +6,7 @@ Labeling
6 6
7`draft` `optional` `author:staab` `author:gruruya` `author:s3x-jay` 7`draft` `optional` `author:staab` `author:gruruya` `author:s3x-jay`
8 8
9A label is a `kind 1985` (regular) event or `kind 32144` (replaceable) event that is used to label other entities. This supports a number of use cases: 9A label is a `kind 1985` event that is used to label other entities. This supports a number of use cases:
10 10
11- Distributed moderation and content recommendations 11- Distributed moderation and content recommendations
12- Reviews and ratings 12- Reviews and ratings
@@ -25,10 +25,6 @@ labeled: `e`, `p`, `r`, or `t` tags. This allows for labeling of events, people,
25or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and 25or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and
26`p` tags. 26`p` tags.
27 27
28Any number of targets may be included when using a kind `1985` non-replaceable event. If kind
29`32144` is preferred, the event MUST have a single target tag, and its value MUST also be the
30value of the `d` tag.
31
32Label Tag 28Label Tag
33---- 29----
34 30
@@ -48,18 +44,21 @@ MAY be used when the label content is provided by an end user.
48`l` and `L` tags MAY be added to other event kinds to support self-reporting. For events 44`l` and `L` tags MAY be added to other event kinds to support self-reporting. For events
49with a kind other than 1985, labels refer to the event itself. 45with a kind other than 1985, labels refer to the event itself.
50 46
51Other Tags 47Label Annotations
52----- 48-----
53 49
54The label event MAY include a `quality` tag with a value of 0 to 1. This allows for an 50A label tag MAY include a 4th positional element detailing extra information about the label in question. This string
55absolute, granular scale that can be represented in any way (5 stars, color scale, etc). 51should be a url-encoded list of key/value pairs, for example `quality=1&confidence=1`. Any key MAY be used, but the
52following are recommended:
56 53
57The label event MAY include a `confidence` tag with a value of 0 to 1. This indicates the certainty which the author has about their rating. 54- `quality` may have a value of 0 to 1. This allows for an absolute, granular scale that can be represented in any way (5 stars, color scale, etc).
55- `confidence` may have a value of 0 to 1. This indicates the certainty which the author has about their rating.
56- `context` may be a comma-separated list of urls (including NIP-21 urls) indicating other context that should be considered when interpreting labels.
58 57
59Content 58Content
60------- 59-------
61 60
62`l` tags should be short, meaningful strings. Longer discussions, such as for a review, or an 61Labels should be short, meaningful strings. Longer discussions, such as for a review, or an
63explanation of why something was labeled the way it was should go in the event's `content` field. 62explanation of why something was labeled the way it was should go in the event's `content` field.
64 63
65Example events 64Example events
@@ -131,10 +130,8 @@ that's the case.
131 "kind": 1985, 130 "kind": 1985,
132 "tags": [ 131 "tags": [
133 ["L", "#t"], 132 ["L", "#t"],
134 ["l", "bitcoin", "#t"], 133 ["l", "bitcoin", "#t", "quality=0.7&confidence=0.2"],
135 ["r", <relay_url>], 134 ["r", <relay_url>]
136 ["quality", 0.7],
137 ["confidence", 0.2]
138 ], 135 ],
139 "content": "I think this relay is mostly just bitcoiners.", 136 "content": "I think this relay is mostly just bitcoiners.",
140 ... 137 ...
@@ -148,9 +145,8 @@ A plain review of a relay.
148 "kind": 1985, 145 "kind": 1985,
149 "tags": [ 146 "tags": [
150 ["L", "review"], 147 ["L", "review"],
151 ["l", "relay", "review"], 148 ["l", "relay", "review", "quality=0.1"],
152 ["r", <relay_url>], 149 ["r", <relay_url>]
153 ["quality", 0.1]
154 ], 150 ],
155 "content": "This relay is full of mean people.", 151 "content": "This relay is full of mean people.",
156 ... 152 ...