mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 16:35:52 -05:00
Add relay hints, replaceable events, and clarification about content to NIP 32
This commit is contained in:
parent
34910c8674
commit
95f537e90d
29
32.md
29
32.md
|
@ -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` 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
|
- Distributed moderation and content recommendations
|
||||||
- Reviews and ratings
|
- Reviews and ratings
|
||||||
|
@ -22,7 +22,12 @@ Label Target
|
||||||
|
|
||||||
The label event MUST include one or more tags representing the object or objects being
|
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,
|
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
|
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.
|
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
|
Example events
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
@ -64,7 +75,7 @@ cases.
|
||||||
"tags": [
|
"tags": [
|
||||||
["L", "report"],
|
["L", "report"],
|
||||||
["l", "nudity", "report"],
|
["l", "nudity", "report"],
|
||||||
["e", <id>]
|
["e", <id>, <relay_url>]
|
||||||
],
|
],
|
||||||
"content": "",
|
"content": "",
|
||||||
...
|
...
|
||||||
|
@ -78,8 +89,8 @@ namespaces may be used at the same time.
|
||||||
{
|
{
|
||||||
"kind": 1985,
|
"kind": 1985,
|
||||||
"tags": [
|
"tags": [
|
||||||
["e", <id>],
|
["e", <id>, <relay_url>],
|
||||||
["p", <id>],
|
["p", <id>, <relay_url>],
|
||||||
["t", "chickens"],
|
["t", "chickens"],
|
||||||
["L", "#t"]
|
["L", "#t"]
|
||||||
["L", "ugc"]
|
["L", "ugc"]
|
||||||
|
@ -103,8 +114,8 @@ A suggestion that multiple pubkeys be associated with the `permies` topic.
|
||||||
"tags": [
|
"tags": [
|
||||||
["L", "#t"],
|
["L", "#t"],
|
||||||
["l", "permies", "#t"],
|
["l", "permies", "#t"],
|
||||||
["p", <pubkey1>],
|
["p", <pubkey1>, <relay_url>],
|
||||||
["p", <pubkey2>]
|
["p", <pubkey2>, <relay_url>]
|
||||||
],
|
],
|
||||||
"content": "",
|
"content": "",
|
||||||
...
|
...
|
||||||
|
@ -156,8 +167,8 @@ this spec provides for overlaying structured metadata on top of nostr.
|
||||||
"tags": [
|
"tags": [
|
||||||
["L", "my-lightning-nomenclature"],
|
["L", "my-lightning-nomenclature"],
|
||||||
["l", "channel", "my-lightning-nomenclature"],
|
["l", "channel", "my-lightning-nomenclature"],
|
||||||
["p", <pubkey1>],
|
["p", <pubkey1>, <relay_url>],
|
||||||
["p", <pubkey2>]
|
["p", <pubkey2>, <relay_url>]
|
||||||
],
|
],
|
||||||
"content": "<channel_id>",
|
"content": "<channel_id>",
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user