diff options
| author | Jonathan Staab <shtaab@gmail.com> | 2023-05-23 14:33:27 -0700 |
|---|---|---|
| committer | Jonathan Staab <shtaab@gmail.com> | 2023-06-13 09:31:15 -0700 |
| commit | 5b32def861fb114feb564ce2d089b7983639ada8 (patch) | |
| tree | a684d7908237ac16076fa77657f5d956c43ad800 | |
| parent | 95f537e90d568ff23e485f336d251b5d415e1191 (diff) | |
Move annotations to the label tag for NIP-32. Remove replaceable events
| -rw-r--r-- | 32.md | 30 |
1 files changed, 13 insertions, 17 deletions
| @@ -6,7 +6,7 @@ Labeling | |||
| 6 | 6 | ||
| 7 | `draft` `optional` `author:staab` `author:gruruya` `author:s3x-jay` | 7 | `draft` `optional` `author:staab` `author:gruruya` `author:s3x-jay` |
| 8 | 8 | ||
| 9 | 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: | 9 | A label is a `kind 1985` event that is used to label other entities. This supports a number of use cases: |
| 10 | 10 | ||
| 11 | - Distributed moderation and content recommendations | 11 | - Distributed moderation and content recommendations |
| 12 | - Reviews and ratings | 12 | - Reviews and ratings |
| @@ -25,10 +25,6 @@ labeled: `e`, `p`, `r`, or `t` tags. This allows for labeling of events, people, | |||
| 25 | or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and | 25 | or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and |
| 26 | `p` tags. | 26 | `p` tags. |
| 27 | 27 | ||
| 28 | Any number of targets may be included when using a kind `1985` non-replaceable event. If kind | ||
| 29 | `32144` is preferred, the event MUST have a single target tag, and its value MUST also be the | ||
| 30 | value of the `d` tag. | ||
| 31 | |||
| 32 | Label Tag | 28 | Label Tag |
| 33 | ---- | 29 | ---- |
| 34 | 30 | ||
| @@ -48,18 +44,21 @@ MAY be used when the label content is provided by an end user. | |||
| 48 | `l` and `L` tags MAY be added to other event kinds to support self-reporting. For events | 44 | `l` and `L` tags MAY be added to other event kinds to support self-reporting. For events |
| 49 | with a kind other than 1985, labels refer to the event itself. | 45 | with a kind other than 1985, labels refer to the event itself. |
| 50 | 46 | ||
| 51 | Other Tags | 47 | Label Annotations |
| 52 | ----- | 48 | ----- |
| 53 | 49 | ||
| 54 | The label event MAY include a `quality` tag with a value of 0 to 1. This allows for an | 50 | A label tag MAY include a 4th positional element detailing extra information about the label in question. This string |
| 55 | absolute, granular scale that can be represented in any way (5 stars, color scale, etc). | 51 | should be a url-encoded list of key/value pairs, for example `quality=1&confidence=1`. Any key MAY be used, but the |
| 52 | following are recommended: | ||
| 56 | 53 | ||
| 57 | 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. | 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). |
| 55 | - `confidence` may have a value of 0 to 1. This indicates the certainty which the author has about their rating. | ||
| 56 | - `context` may be a comma-separated list of urls (including NIP-21 urls) indicating other context that should be considered when interpreting labels. | ||
| 58 | 57 | ||
| 59 | Content | 58 | Content |
| 60 | ------- | 59 | ------- |
| 61 | 60 | ||
| 62 | `l` tags should be short, meaningful strings. Longer discussions, such as for a review, or an | 61 | Labels should be short, meaningful strings. Longer discussions, such as for a review, or an |
| 63 | explanation of why something was labeled the way it was should go in the event's `content` field. | 62 | explanation of why something was labeled the way it was should go in the event's `content` field. |
| 64 | 63 | ||
| 65 | Example events | 64 | Example events |
| @@ -131,10 +130,8 @@ that's the case. | |||
| 131 | "kind": 1985, | 130 | "kind": 1985, |
| 132 | "tags": [ | 131 | "tags": [ |
| 133 | ["L", "#t"], | 132 | ["L", "#t"], |
| 134 | ["l", "bitcoin", "#t"], | 133 | ["l", "bitcoin", "#t", "quality=0.7&confidence=0.2"], |
| 135 | ["r", <relay_url>], | 134 | ["r", <relay_url>] |
| 136 | ["quality", 0.7], | ||
| 137 | ["confidence", 0.2] | ||
| 138 | ], | 135 | ], |
| 139 | "content": "I think this relay is mostly just bitcoiners.", | 136 | "content": "I think this relay is mostly just bitcoiners.", |
| 140 | ... | 137 | ... |
| @@ -148,9 +145,8 @@ A plain review of a relay. | |||
| 148 | "kind": 1985, | 145 | "kind": 1985, |
| 149 | "tags": [ | 146 | "tags": [ |
| 150 | ["L", "review"], | 147 | ["L", "review"], |
| 151 | ["l", "relay", "review"], | 148 | ["l", "relay", "review", "quality=0.1"], |
| 152 | ["r", <relay_url>], | 149 | ["r", <relay_url>] |
| 153 | ["quality", 0.1] | ||
| 154 | ], | 150 | ], |
| 155 | "content": "This relay is full of mean people.", | 151 | "content": "This relay is full of mean people.", |
| 156 | ... | 152 | ... |