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:47:56 -0700
committerJonathan Staab <shtaab@gmail.com>2023-06-13 09:31:15 -0700
commit2372874b98fd109cfa517532a276cec456e738f8 (patch)
tree518311a360adc5f070addd9fa499e3104d5f7a52 /32.md
parent5b32def861fb114feb564ce2d089b7983639ada8 (diff)
Use JSON for label metadata in NIP-32
Diffstat (limited to '32.md')
-rw-r--r--32.md11
1 files changed, 5 insertions, 6 deletions
diff --git a/32.md b/32.md
index a16ddf7..161af53 100644
--- a/32.md
+++ b/32.md
@@ -21,7 +21,7 @@ Label Target
21---- 21----
22 22
23The label event MUST include one or more tags representing the object or objects being 23The label event MUST include one or more tags representing the object or objects being
24labeled: `e`, `p`, `r`, or `t` tags. This allows for labeling of events, people, relays, 24labeled: `e`, `p`, `a`, `r`, or `t` tags. This allows for labeling of events, people, relays,
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
@@ -47,9 +47,8 @@ with a kind other than 1985, labels refer to the event itself.
47Label Annotations 47Label Annotations
48----- 48-----
49 49
50A label tag MAY include a 4th positional element detailing extra information about the label in question. This string 50A label tag MAY include a 4th positional element detailing extra metadata about the label in question. This string
51should be a url-encoded list of key/value pairs, for example `quality=1&confidence=1`. Any key MAY be used, but the 51should be a json-encoded object. Any key MAY be used, but the following are recommended:
52following are recommended:
53 52
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). 53- `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. 54- `confidence` may have a value of 0 to 1. This indicates the certainty which the author has about their rating.
@@ -130,7 +129,7 @@ that's the case.
130 "kind": 1985, 129 "kind": 1985,
131 "tags": [ 130 "tags": [
132 ["L", "#t"], 131 ["L", "#t"],
133 ["l", "bitcoin", "#t", "quality=0.7&confidence=0.2"], 132 ["l", "bitcoin", "#t", "{\"quality\": 0.7, \"confidence\": 0.2}"],
134 ["r", <relay_url>] 133 ["r", <relay_url>]
135 ], 134 ],
136 "content": "I think this relay is mostly just bitcoiners.", 135 "content": "I think this relay is mostly just bitcoiners.",
@@ -145,7 +144,7 @@ A plain review of a relay.
145 "kind": 1985, 144 "kind": 1985,
146 "tags": [ 145 "tags": [
147 ["L", "review"], 146 ["L", "review"],
148 ["l", "relay", "review", "quality=0.1"], 147 ["l", "relay", "review", "{\"quality\": 0.1}"],
149 ["r", <relay_url>] 148 ["r", <relay_url>]
150 ], 149 ],
151 "content": "This relay is full of mean people.", 150 "content": "This relay is full of mean people.",