nips/51.md

25 lines
2.0 KiB
Markdown
Raw Normal View History

NIP-51
======
Lists
-----
2023-08-15 12:32:30 -04:00
`draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` `author:gzuuus`
This NIP defines lists of things that users can create. Lists can contain references to anything, and these references can be **public** or **private**.
Public items in a list are specified in the event `tags` array, while private items are specified in a JSON array that mimics the structure of the event `tags` array, but stringified and encrypted using the same scheme from [NIP-04](04.md) (the shared key is computed using the author's public and private key) and stored in the `.content`.
## Generic lists
The kinds `30000` and `30001` have been reserved for generic lists. These must be accompanied by a `d` tag identifying the list, but these are generally client-specific, except in the standard cases specified below.
## Standard lists
| name | kind | "d" tag | description | expected tag items |
| --- | --- | --- | --- | --- |
| Muted list | 30000 | `"mute"` | things the user doesn't want to see in their feeds | `"p"` (pubkeys), `"t"` (hashtags) |
| Bookmarks list | 30001 | `"bookmark"` | things the user intends to save for the future | `"e"` (kind:1 notes), `"a"` (kind:30023 articles) |
| Pin list | 30001 | `"pin"` | events the user intends to showcase in their profile page | `"e"` (kind:1 notes) |
| Relay sets | 30002 | (user-defined) | user-defined relay groups the user can easily pick and choose from during variadic operations | `"relay"` (relay URLs) |