upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Staab <shtaab@gmail.com>2023-06-13 17:30:26 -0700
committerJonathan Staab <shtaab@gmail.com>2023-06-13 17:30:26 -0700
commitbef3e6c941c80114c1a040d42317c8fef4a74e7d (patch)
tree4259954e6ce1f4315f796f90dbd42aa631105656
parent61849b5a6bd1171a4c661c5c0531984a7b3db993 (diff)
Add a few more notes to nip 32
-rw-r--r--32.md25
1 files changed, 18 insertions, 7 deletions
diff --git a/32.md b/32.md
index fcf6082..45cadbe 100644
--- a/32.md
+++ b/32.md
@@ -26,7 +26,7 @@ Label Tag
26This NIP introduces a new tag `l` which denotes a label, and a new `L` tag which denotes a label namespace. 26This NIP introduces a new tag `l` which denotes a label, and a new `L` tag which denotes a label namespace.
27A label MUST include a mark matching an `L` tag. `L` tags refer to a tag type within nostr, or a nomenclature 27A label MUST include a mark matching an `L` tag. `L` tags refer to a tag type within nostr, or a nomenclature
28external to nostr defined either formally or by convention. Any string can be a namespace, but publishers SHOULD 28external to nostr defined either formally or by convention. Any string can be a namespace, but publishers SHOULD
29ensure they are unambiguous by using a well-defined ISO standard or reverse domain name notation. Some examples: 29ensure they are unambiguous by using a well-defined namespace (such as an ISO standard) or reverse domain name notation. Some examples:
30 30
31Namespaces starting with `#` indicate that the label target should be associated with the label's value. 31Namespaces starting with `#` indicate that the label target should be associated with the label's value.
32This is a way of attaching standard nostr tags to events, pubkeys, relays, urls, etc. 32This is a way of attaching standard nostr tags to events, pubkeys, relays, urls, etc.
@@ -36,8 +36,8 @@ This is a way of attaching standard nostr tags to events, pubkeys, relays, urls,
36- `["l", "D005528", "MeSH"]` - ["Foot"](https://meshb.nlm.nih.gov/record/ui?ui=D005528) from NIH's Medical Subject Headings vocabulary 36- `["l", "D005528", "MeSH"]` - ["Foot"](https://meshb.nlm.nih.gov/record/ui?ui=D005528) from NIH's Medical Subject Headings vocabulary
37- `["l", "3173435", "GeoNames"]` - [Milan, Italy](https://www.geonames.org/3173435/milan.html) using the GeoNames coding system 37- `["l", "3173435", "GeoNames"]` - [Milan, Italy](https://www.geonames.org/3173435/milan.html) using the GeoNames coding system
38- `["l", "IT-MI", "ISO-3166-2"]` - Milano, Italy using ISO 3166-2. 38- `["l", "IT-MI", "ISO-3166-2"]` - Milano, Italy using ISO 3166-2.
39- `["l", "VI-hum", "social.nos.ontology"]` - Violence toward a human being as defined by ontology.nos.social. 39- `["l", "VI-hum", "com.example.ontology"]` - Violence toward a human being as defined by ontology.example.com.
40- `["l", "relay/review", "social.coracle.ontology"]` - the publisher is leaving a review about a relay, as defined by ontology.coracle.social. 40- `["l", "relay/review", "com.example.ontology"]` - the publisher is leaving a review about a relay, as defined by ontology.example.com.
41 41
42`L` tags containing the label namespaces MUST be included in order to support searching by 42`L` tags containing the label namespaces MUST be included in order to support searching by
43namespace rather than by a specific tag. The special `ugc` ("user generated content") namespace 43namespace rather than by a specific tag. The special `ugc` ("user generated content") namespace
@@ -128,8 +128,8 @@ A plain review of a relay.
128{ 128{
129 "kind": 1985, 129 "kind": 1985,
130 "tags": [ 130 "tags": [
131 ["L", "social.coracle.ontology"], 131 ["L", "com.example.ontology"],
132 ["l", "relay/review", "social.coracle.ontology", "{\"quality\": 0.1}"], 132 ["l", "relay/review", "com.example.ontology", "{\"quality\": 0.1}"],
133 ["r", <relay_url>] 133 ["r", <relay_url>]
134 ], 134 ],
135 "content": "This relay is full of mean people.", 135 "content": "This relay is full of mean people.",
@@ -161,8 +161,8 @@ Publishers can self-label by adding `l` tags to their own non-1985 events.
161{ 161{
162 "kind": 1, 162 "kind": 1,
163 "tags": [ 163 "tags": [
164 ["L", "social.nos.ontology"], 164 ["L", "com.example.ontology"],
165 ["l", "IL-frd", "social.nos.ontology"] 165 ["l", "IL-frd", "com.example.ontology"]
166 ], 166 ],
167 "content": "Send me 100 sats and I'll send you 200 back", 167 "content": "Send me 100 sats and I'll send you 200 back",
168 ... 168 ...
@@ -175,3 +175,14 @@ Other Notes
175When using this NIP to bulk-label many targets at once, events may be deleted and a replacement 175When using this NIP to bulk-label many targets at once, events may be deleted and a replacement
176may be published. We have opted not to use parameterizable/replaceable events for this due to the 176may be published. We have opted not to use parameterizable/replaceable events for this due to the
177complexity in coming up with a standard `d` tag. 177complexity in coming up with a standard `d` tag.
178
179Before creating a vocabulary, explore how your use case may have already been designed and
180imitate that design if possible. Reverse domain name notation is encouraged to avoid
181namespace clashes, but for the sake of interoperability all namespaces should be
182considered open for public use, and not proprietary. In other words, if there is a
183namespace that fits your use case, use it even if it points to someone else's domain name.
184
185Vocabularies MAY choose to include the namespace in the label, delimited by a `:` character.
186This may be preferred when defining more formal vocabularies that should not be confused with
187another namespace when querying without an `L` tag. For these vocabularies, all labels
188SHOULD include the namespace (rather than mixing qualified and unqualified labels).