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:
Diffstat (limited to '32.md')
-rw-r--r--32.md56
1 files changed, 37 insertions, 19 deletions
diff --git a/32.md b/32.md
index 253a504..f5557ca 100644
--- a/32.md
+++ b/32.md
@@ -27,16 +27,21 @@ or topics respectively.
27Label Tag 27Label Tag
28---- 28----
29 29
30This NIP introduces a new tag `l` which denotes a label. A label MAY be an unqualified string indicating the type of content based on convention, a qualified string referring to a tag type within nostr, or a qualified string referring to a nomenclature external to nostr. Some examples: 30This NIP introduces a new tag `l` which denotes a label, and a new `L` tag which denotes a label namespace. A label MUST include a mark matching an `L` tag. `L` tags refer to a tag type within nostr, or a nomenclature external to nostr defined either formally or by convention. Some examples:
31 31
32- `review` - the publisher is leaving a review about the given entity. 32- `["l", "footstr", "#t"]` - the publisher thinks the given entity should have the `footstr` topic applied.
33- `#t/footstr` - the publisher thinks the given entity should have the `footstr` topic applied. 33- `["l", "<pubkey>", "#p"]` - the publisher things the given entity should be tagged with with `<pubkey>`
34- `#p/<pubkey>` - the publisher things the given entity should be tagged with with `<pubkey>` 34- `["l", "D005528", "MeSH"]` - ["Foot"](https://meshb.nlm.nih.gov/record/ui?ui=D005528) from NIH's Medical Subject Headings vocabulary
35- `MeSH/D005528` - ["Foot"](https://meshb.nlm.nih.gov/record/ui?ui=D005528) from NIH's Medical Subject Headings vocabulary 35- `["l", "3173435", "GeoNames"]` - [Milan, Italy](https://www.geonames.org/3173435/milan.html) using the GeoNames coding system
36- `GeoNames/3173435` - [Milan, Italy](https://www.geonames.org/3173435/milan.html) using the GeoNames coding system 36- `["l", "IT-MI", "ISO-3166-2"]` - Milano, Italy using ISO 3166-2.
37- `ISO-3166-2/IT-MI` - Milano, Italy using ISO 3166-2. 37- `["l", "relay", "review"]` - the publisher is leaving a review about a relay.
38 38
39As much as possible, fully-qualified labels should be used. 39`L` tags containing the label namespaces MUST be included in order to support searching by
40namespace rather than by a specific tag. The special `ugc` ("user generated content") namespace
41MAY be used when the label content is provided by an end user.
42
43`l` and `L` tags MAY be added to other event kinds to support self-reporting. For events
44with a kind other than 1985, labels refer to the event itself.
40 45
41Other Tags 46Other Tags
42----- 47-----
@@ -49,21 +54,25 @@ The label event MAY include a `confidence` tag with a value of 0 to 1. This indi
49Example events 54Example events
50-------------- 55--------------
51 56
52A report that an event contains nudity. 57A report that an event contains nudity. Note that NIP 56 is preferred for reporting content
58to clients, while labels are recommended for supporting distributed content moderation use
59cases.
53 60
54```json 61```json
55{ 62{
56 "kind": 1985, 63 "kind": 1985,
57 "tags": [ 64 "tags": [
58 ["e", <id>], 65 ["L", "report"],
59 ["l", "nudity"] 66 ["l", "nudity", "report"],
67 ["e", <id>]
60 ], 68 ],
61 "content": "", 69 "content": "",
62 ... 70 ...
63} 71}
64``` 72```
65 73
66A single event can apply multiple labels to multiple targets to support mass-tagging. 74A single event can apply multiple labels to multiple targets to support mass-tagging. Multiple
75namespaces may be used at the same time.
67 76
68```json 77```json
69{ 78{
@@ -72,9 +81,14 @@ A single event can apply multiple labels to multiple targets to support mass-tag
72 ["e", <id>], 81 ["e", <id>],
73 ["p", <id>], 82 ["p", <id>],
74 ["t", "chickens"], 83 ["t", "chickens"],
75 ["l", "permaculture"], 84 ["L", "#t"]
76 ["l", "permies"], 85 ["L", "ugc"]
77 ["l", "farming"] 86 ["L", "com.example.labels"]
87 ["l", "chickens", "#t"],
88 ["l", "user generated content", "ugc"],
89 ["l", "permaculture", "com.example.labels"],
90 ["l", "permies", "com.example.labels"],
91 ["l", "farming", "com.example.labels"],
78 ], 92 ],
79 "content": "", 93 "content": "",
80 ... 94 ...
@@ -87,7 +101,8 @@ A suggestion that multiple pubkeys be associated with the `permies` topic.
87{ 101{
88 "kind": 1985, 102 "kind": 1985,
89 "tags": [ 103 "tags": [
90 ["l", "#t/permies"], 104 ["L", "#t"],
105 ["l", "permies", "#t"],
91 ["p", <pubkey1>], 106 ["p", <pubkey1>],
92 ["p", <pubkey2>] 107 ["p", <pubkey2>]
93 ], 108 ],
@@ -104,7 +119,8 @@ that's the case.
104{ 119{
105 "kind": 1985, 120 "kind": 1985,
106 "tags": [ 121 "tags": [
107 ["l", "#t/bitcoin"], 122 ["L", "#t"],
123 ["l", "bitcoin", "#t"],
108 ["r", <relay_url>], 124 ["r", <relay_url>],
109 ["quality", 0.7], 125 ["quality", 0.7],
110 ["confidence", 0.2] 126 ["confidence", 0.2]
@@ -120,7 +136,8 @@ A plain review of a relay.
120{ 136{
121 "kind": 1985, 137 "kind": 1985,
122 "tags": [ 138 "tags": [
123 ["l", "review"], 139 ["L", "review"],
140 ["l", "relay", "review"],
124 ["r", <relay_url>], 141 ["r", <relay_url>],
125 ["quality", 0.1] 142 ["quality", 0.1]
126 ], 143 ],
@@ -137,7 +154,8 @@ this spec provides for overlaying structured metadata on top of nostr.
137{ 154{
138 "kind": 1985, 155 "kind": 1985,
139 "tags": [ 156 "tags": [
140 ["l", "lightning/channel"], 157 ["L", "my-lightning-nomenclature"],
158 ["l", "channel", "my-lightning-nomenclature"],
141 ["p", <pubkey1>], 159 ["p", <pubkey1>],
142 ["p", <pubkey2>] 160 ["p", <pubkey2>]
143 ], 161 ],