upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/51.md
blob: c74487f6d642bbe324b2cdfde1707b40ec023ce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
NIP-51
======

Lists
-----

`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)                            |