Add relay hints, replaceable events, and clarification about content to NIP 32

This commit is contained in:
Jonathan Staab 2023-05-17 12:50:29 -07:00
parent 34910c8674
commit 95f537e90d

29
32.md
View File

@ -6,7 +6,7 @@ Labeling
`draft` `optional` `author:staab` `author:gruruya` `author:s3x-jay`
A label is a `kind 1985` note that is used to label other entities. This supports a number of use cases:
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:
- Distributed moderation and content recommendations
- Reviews and ratings
@ -22,7 +22,12 @@ Label Target
The label event MUST include one or more tags representing the object or objects being
labeled: `e`, `p`, `r`, or `t` tags. This allows for labeling of events, people, relays,
or topics respectively.
or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and
`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
----
@ -51,6 +56,12 @@ absolute, granular scale that can be represented in any way (5 stars, color scal
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.
Content
-------
`l` tags 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.
Example events
--------------
@ -64,7 +75,7 @@ cases.
"tags": [
["L", "report"],
["l", "nudity", "report"],
["e", <id>]
["e", <id>, <relay_url>]
],
"content": "",
...
@ -78,8 +89,8 @@ namespaces may be used at the same time.
{
"kind": 1985,
"tags": [
["e", <id>],
["p", <id>],
["e", <id>, <relay_url>],
["p", <id>, <relay_url>],
["t", "chickens"],
["L", "#t"]
["L", "ugc"]
@ -103,8 +114,8 @@ A suggestion that multiple pubkeys be associated with the `permies` topic.
"tags": [
["L", "#t"],
["l", "permies", "#t"],
["p", <pubkey1>],
["p", <pubkey2>]
["p", <pubkey1>, <relay_url>],
["p", <pubkey2>, <relay_url>]
],
"content": "",
...
@ -156,8 +167,8 @@ this spec provides for overlaying structured metadata on top of nostr.
"tags": [
["L", "my-lightning-nomenclature"],
["l", "channel", "my-lightning-nomenclature"],
["p", <pubkey1>],
["p", <pubkey2>]
["p", <pubkey1>, <relay_url>],
["p", <pubkey2>, <relay_url>]
],
"content": "<channel_id>",
...