diff options
| -rw-r--r-- | 51.md | 97 | ||||
| -rw-r--r-- | 51a.md | 9 | ||||
| -rw-r--r-- | 51b.md | 9 | ||||
| -rw-r--r-- | 51c.md | 9 | ||||
| -rw-r--r-- | 51d.md | 9 | ||||
| -rw-r--r-- | README.md | 6 |
6 files changed, 139 insertions, 0 deletions
| @@ -0,0 +1,97 @@ | |||
| 1 | NIP-51 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Lists | ||
| 5 | ------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` `depends:33` | ||
| 8 | |||
| 9 | A "list" event is defined as having a list of public and/or private tags. Public tags will be listed in the event `tags`. Private tags will be encrypted in the event `content`. Encryption for private tags will use [NIP-04 - Encrypted Direct Message](04.md) encryption, using the list author's private and public key for the shared secret. A distinct event kind should be used for each list type created. | ||
| 10 | |||
| 11 | If a list type should only be defined once per user (like the 'Mute' list), the list type's events should follow the specification for [NIP-16 - Replaceable Events](16.md). These lists may be referred to as 'replaceable lists'. | ||
| 12 | |||
| 13 | Otherwise the list type's events should follow the specification for [NIP-33 - Parameterized Replaceable Events](33.md), where the list name will be used as the 'd' parameter. These lists may be referred to as 'parameterized replaceable lists'. | ||
| 14 | |||
| 15 | ## List Event Kinds | ||
| 16 | |||
| 17 | | kind | list type | NIP | | ||
| 18 | |------|-----------------------------|---------------| | ||
| 19 | | 10000| Mute | [51a](51a.md) | | ||
| 20 | | 10001| Pin | [51b](51b.md) | | ||
| 21 | | 30000| Categorized People | [51c](51c.md) | | ||
| 22 | | 30001| Categorized Bookmarks | [51d](51d.md) | | ||
| 23 | ## Replaceable List Event Example | ||
| 24 | |||
| 25 | Lets say a user wants to create a 'Mute' list and has keys: | ||
| 26 | ``` | ||
| 27 | priv: fb505c65d4df950f5d28c9e4d285ee12ffaf315deef1fc24e3c7cd1e7e35f2b1 | ||
| 28 | pub: b1a5c93edcc8d586566fde53a20bdb50049a97b15483cb763854e57016e0fa3d | ||
| 29 | ``` | ||
| 30 | The user wants to publicly include these users: | ||
| 31 | |||
| 32 | ```json | ||
| 33 | ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], | ||
| 34 | ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"] | ||
| 35 | ``` | ||
| 36 | and privately include these users (below is the JSON that would be encrypted and placed in the event content): | ||
| 37 | |||
| 38 | ```json | ||
| 39 | [ | ||
| 40 | ["p", "9ec7a778167afb1d30c4833de9322da0c08ba71a69e1911d5578d3144bb56437"], | ||
| 41 | ["p", "8c0da4862130283ff9e67d889df264177a508974e2feb96de139804ea66d6168"] | ||
| 42 | ] | ||
| 43 | ``` | ||
| 44 | |||
| 45 | Then the user would create a 'Mute' list event like below: | ||
| 46 | |||
| 47 | ```json | ||
| 48 | { | ||
| 49 | "kind": 10000, | ||
| 50 | "tags": [ | ||
| 51 | ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], | ||
| 52 | ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"], | ||
| 53 | ], | ||
| 54 | "content": "VezuSvWak++ASjFMRqBPWS3mK5pZ0vRLL325iuIL4S+r8n9z+DuMau5vMElz1tGC/UqCDmbzE2kwplafaFo/FnIZMdEj4pdxgptyBV1ifZpH3TEF6OMjEtqbYRRqnxgIXsuOSXaerWgpi0pm+raHQPseoELQI/SZ1cvtFqEUCXdXpa5AYaSd+quEuthAEw7V1jP+5TDRCEC8jiLosBVhCtaPpLcrm8HydMYJ2XB6Ixs=?iv=/rtV49RFm0XyFEwG62Eo9A==", | ||
| 55 | ...other fields | ||
| 56 | } | ||
| 57 | ``` | ||
| 58 | |||
| 59 | |||
| 60 | ## Parameterized Replaceable List Event Example | ||
| 61 | |||
| 62 | Lets say a user wants to create a 'Categorized People' list of `nostr` people and has keys: | ||
| 63 | ``` | ||
| 64 | priv: fb505c65d4df950f5d28c9e4d285ee12ffaf315deef1fc24e3c7cd1e7e35f2b1 | ||
| 65 | pub: b1a5c93edcc8d586566fde53a20bdb50049a97b15483cb763854e57016e0fa3d | ||
| 66 | ``` | ||
| 67 | The user wants to publicly include these users: | ||
| 68 | |||
| 69 | ```json | ||
| 70 | ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], | ||
| 71 | ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"] | ||
| 72 | ``` | ||
| 73 | and privately include these users (below is the JSON that would be encrypted and placed in the event content): | ||
| 74 | |||
| 75 | ```json | ||
| 76 | [ | ||
| 77 | ["p", "9ec7a778167afb1d30c4833de9322da0c08ba71a69e1911d5578d3144bb56437"], | ||
| 78 | ["p", "8c0da4862130283ff9e67d889df264177a508974e2feb96de139804ea66d6168"] | ||
| 79 | ] | ||
| 80 | ``` | ||
| 81 | |||
| 82 | Then the user would create a 'Categorized People' list event like below: | ||
| 83 | |||
| 84 | ```json | ||
| 85 | { | ||
| 86 | "kind": 30000, | ||
| 87 | "tags": [ | ||
| 88 | ["d", "nostr"], | ||
| 89 | ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], | ||
| 90 | ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"], | ||
| 91 | ], | ||
| 92 | "content": "VezuSvWak++ASjFMRqBPWS3mK5pZ0vRLL325iuIL4S+r8n9z+DuMau5vMElz1tGC/UqCDmbzE2kwplafaFo/FnIZMdEj4pdxgptyBV1ifZpH3TEF6OMjEtqbYRRqnxgIXsuOSXaerWgpi0pm+raHQPseoELQI/SZ1cvtFqEUCXdXpa5AYaSd+quEuthAEw7V1jP+5TDRCEC8jiLosBVhCtaPpLcrm8HydMYJ2XB6Ixs=?iv=/rtV49RFm0XyFEwG62Eo9A==", | ||
| 93 | ...other fields | ||
| 94 | } | ||
| 95 | ``` | ||
| 96 | |||
| 97 | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | NIP-51a | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Mute List | ||
| 5 | ------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` | ||
| 8 | |||
| 9 | An event with kind `10000` is defined as a replaceable list event (see [NIP-51 - Lists](51.md) for listing content a user wants to mute. Any standarized tag can be included in a Mute List. \ No newline at end of file | ||
| @@ -0,0 +1,9 @@ | |||
| 1 | NIP-51b | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Pin List | ||
| 5 | ------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` | ||
| 8 | |||
| 9 | An event with kind `10001` is defined as a replaceable list event (see [NIP-51 - Lists](51.md) for listing content a user wants to pin. Any standarized tag can be included in a Pin List. \ No newline at end of file | ||
| @@ -0,0 +1,9 @@ | |||
| 1 | NIP-51c | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Categorized People List | ||
| 5 | ------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` | ||
| 8 | |||
| 9 | An event with kind `30000` is defined as a parameterized replaceable list event (see [NIP-51 - Lists](51.md)) for categorizing people. The 'd' parameter for this event holds the category name of the list. The tags included in these lists MUST follow the format of kind 3 events as defined in [NIP-02 - Contact List and Petnames](02.md). \ No newline at end of file | ||
| @@ -0,0 +1,9 @@ | |||
| 1 | NIP-51c | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Categorized Bookmarks List | ||
| 5 | ------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` | ||
| 8 | |||
| 9 | An event with kind `30001` is defined as a parameterized replaceable list event (see [NIP-51 - Lists](51.md)) for categorizing bookmarks. The 'd' parameter for this event holds the category name of the list. Any standarized tag can be included in a Categorized Bookmarks List. \ No newline at end of file | ||
| @@ -32,6 +32,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh | |||
| 32 | - [NIP-42: Authentication of clients to relays](42.md) | 32 | - [NIP-42: Authentication of clients to relays](42.md) |
| 33 | - [NIP-46: Nostr Connect](46.md) | 33 | - [NIP-46: Nostr Connect](46.md) |
| 34 | - [NIP-50: Keywords filter](50.md) | 34 | - [NIP-50: Keywords filter](50.md) |
| 35 | - [NIP-51: Lists](51.md) | ||
| 35 | - [NIP-56: Reporting](56.md) | 36 | - [NIP-56: Reporting](56.md) |
| 36 | - [NIP-57: Lightning Zaps](57.md) | 37 | - [NIP-57: Lightning Zaps](57.md) |
| 37 | - [NIP-58: Badges](58.md) | 38 | - [NIP-58: Badges](58.md) |
| @@ -39,6 +40,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh | |||
| 39 | - [NIP-78: Application-specific data](78.md) | 40 | - [NIP-78: Application-specific data](78.md) |
| 40 | 41 | ||
| 41 | ## Event Kinds | 42 | ## Event Kinds |
| 43 | |||
| 42 | | kind | description | NIP | | 44 | | kind | description | NIP | |
| 43 | | ------------- | -------------------------------- | ----------- | | 45 | | ------------- | -------------------------------- | ----------- | |
| 44 | | 0 | Metadata | [1](01.md) | | 46 | | 0 | Metadata | [1](01.md) | |
| @@ -57,9 +59,13 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh | |||
| 57 | | 1984 | Reporting | [56](56.md) | | 59 | | 1984 | Reporting | [56](56.md) | |
| 58 | | 9734 | Zap Request | [57](57.md) | | 60 | | 9734 | Zap Request | [57](57.md) | |
| 59 | | 9735 | Zap | [57](57.md) | | 61 | | 9735 | Zap | [57](57.md) | |
| 62 | | 10000 | Mute List | [51](51.md) | | ||
| 63 | | 10001 | Pin List | [51](51.md) | | ||
| 60 | | 10002 | Relay List Metadata | [65](65.md) | | 64 | | 10002 | Relay List Metadata | [65](65.md) | |
| 61 | | 22242 | Client Authentication | [42](42.md) | | 65 | | 22242 | Client Authentication | [42](42.md) | |
| 62 | | 24133 | Nostr Connect | [46](46.md) | | 66 | | 24133 | Nostr Connect | [46](46.md) | |
| 67 | | 30000 | Categorized People List | [51](51.md) | | ||
| 68 | | 30001 | Categorized Bookmark List | [51](51.md) | | ||
| 63 | | 30008 | Profile Badges | [58](58.md) | | 69 | | 30008 | Profile Badges | [58](58.md) | |
| 64 | | 30009 | Badge Definition | [58](58.md) | | 70 | | 30009 | Badge Definition | [58](58.md) | |
| 65 | | 30023 | Long-form Content | [23](23.md) | | 71 | | 30023 | Long-form Content | [23](23.md) | |