diff options
| author | Jonathan Staab <shtaab@gmail.com> | 2023-06-13 17:30:26 -0700 |
|---|---|---|
| committer | Jonathan Staab <shtaab@gmail.com> | 2023-06-13 17:30:26 -0700 |
| commit | bef3e6c941c80114c1a040d42317c8fef4a74e7d (patch) | |
| tree | 4259954e6ce1f4315f796f90dbd42aa631105656 /32.md | |
| parent | 61849b5a6bd1171a4c661c5c0531984a7b3db993 (diff) | |
Add a few more notes to nip 32
Diffstat (limited to '32.md')
| -rw-r--r-- | 32.md | 25 |
1 files changed, 18 insertions, 7 deletions
| @@ -26,7 +26,7 @@ Label Tag | |||
| 26 | This NIP introduces a new tag `l` which denotes a label, and a new `L` tag which denotes a label namespace. | 26 | This NIP introduces a new tag `l` which denotes a label, and a new `L` tag which denotes a label namespace. |
| 27 | A label MUST include a mark matching an `L` tag. `L` tags refer to a tag type within nostr, or a nomenclature | 27 | A label MUST include a mark matching an `L` tag. `L` tags refer to a tag type within nostr, or a nomenclature |
| 28 | external to nostr defined either formally or by convention. Any string can be a namespace, but publishers SHOULD | 28 | external to nostr defined either formally or by convention. Any string can be a namespace, but publishers SHOULD |
| 29 | ensure they are unambiguous by using a well-defined ISO standard or reverse domain name notation. Some examples: | 29 | ensure they are unambiguous by using a well-defined namespace (such as an ISO standard) or reverse domain name notation. Some examples: |
| 30 | 30 | ||
| 31 | Namespaces starting with `#` indicate that the label target should be associated with the label's value. | 31 | Namespaces starting with `#` indicate that the label target should be associated with the label's value. |
| 32 | This is a way of attaching standard nostr tags to events, pubkeys, relays, urls, etc. | 32 | This 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 |
| 43 | namespace rather than by a specific tag. The special `ugc` ("user generated content") namespace | 43 | namespace 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 | |||
| 175 | When using this NIP to bulk-label many targets at once, events may be deleted and a replacement | 175 | When using this NIP to bulk-label many targets at once, events may be deleted and a replacement |
| 176 | may be published. We have opted not to use parameterizable/replaceable events for this due to the | 176 | may be published. We have opted not to use parameterizable/replaceable events for this due to the |
| 177 | complexity in coming up with a standard `d` tag. | 177 | complexity in coming up with a standard `d` tag. |
| 178 | |||
| 179 | Before creating a vocabulary, explore how your use case may have already been designed and | ||
| 180 | imitate that design if possible. Reverse domain name notation is encouraged to avoid | ||
| 181 | namespace clashes, but for the sake of interoperability all namespaces should be | ||
| 182 | considered open for public use, and not proprietary. In other words, if there is a | ||
| 183 | namespace that fits your use case, use it even if it points to someone else's domain name. | ||
| 184 | |||
| 185 | Vocabularies MAY choose to include the namespace in the label, delimited by a `:` character. | ||
| 186 | This may be preferred when defining more formal vocabularies that should not be confused with | ||
| 187 | another namespace when querying without an `L` tag. For these vocabularies, all labels | ||
| 188 | SHOULD include the namespace (rather than mixing qualified and unqualified labels). | ||