Move annotations to the label tag for NIP-32. Remove replaceable events

This commit is contained in:
Jonathan Staab 2023-05-23 14:33:27 -07:00
parent 95f537e90d
commit 5b32def861

30
32.md
View File

@ -6,7 +6,7 @@ Labeling
`draft` `optional` `author:staab` `author:gruruya` `author:s3x-jay` `draft` `optional` `author:staab` `author:gruruya` `author:s3x-jay`
A 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: A label is a `kind 1985` event that is used to label other entities. This supports a number of use cases:
- Distributed moderation and content recommendations - Distributed moderation and content recommendations
- Reviews and ratings - Reviews and ratings
@ -25,10 +25,6 @@ labeled: `e`, `p`, `r`, or `t` tags. This allows for labeling of events, people,
or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and
`p` tags. `p` tags.
Any number of targets may be included when using a kind `1985` non-replaceable event. If kind
`32144` is preferred, the event MUST have a single target tag, and its value MUST also be the
value of the `d` tag.
Label Tag Label Tag
---- ----
@ -48,18 +44,21 @@ MAY be used when the label content is provided by an end user.
`l` and `L` tags MAY be added to other event kinds to support self-reporting. For events `l` and `L` tags MAY be added to other event kinds to support self-reporting. For events
with a kind other than 1985, labels refer to the event itself. with a kind other than 1985, labels refer to the event itself.
Other Tags Label Annotations
----- -----
The label event MAY include a `quality` tag with a value of 0 to 1. This allows for an A label tag MAY include a 4th positional element detailing extra information about the label in question. This string
absolute, granular scale that can be represented in any way (5 stars, color scale, etc). should be a url-encoded list of key/value pairs, for example `quality=1&confidence=1`. Any key MAY be used, but the
following are recommended:
The 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. - `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).
- `confidence` may have a value of 0 to 1. This indicates the certainty which the author has about their rating.
- `context` may be a comma-separated list of urls (including NIP-21 urls) indicating other context that should be considered when interpreting labels.
Content Content
------- -------
`l` tags should be short, meaningful strings. Longer discussions, such as for a review, or an Labels should be short, meaningful strings. Longer discussions, such as for a review, or an
explanation of why something was labeled the way it was should go in the event's `content` field. explanation of why something was labeled the way it was should go in the event's `content` field.
Example events Example events
@ -131,10 +130,8 @@ that's the case.
"kind": 1985, "kind": 1985,
"tags": [ "tags": [
["L", "#t"], ["L", "#t"],
["l", "bitcoin", "#t"], ["l", "bitcoin", "#t", "quality=0.7&confidence=0.2"],
["r", <relay_url>], ["r", <relay_url>]
["quality", 0.7],
["confidence", 0.2]
], ],
"content": "I think this relay is mostly just bitcoiners.", "content": "I think this relay is mostly just bitcoiners.",
... ...
@ -148,9 +145,8 @@ A plain review of a relay.
"kind": 1985, "kind": 1985,
"tags": [ "tags": [
["L", "review"], ["L", "review"],
["l", "relay", "review"], ["l", "relay", "review", "quality=0.1"],
["r", <relay_url>], ["r", <relay_url>]
["quality", 0.1]
], ],
"content": "This relay is full of mean people.", "content": "This relay is full of mean people.",
... ...