-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIP-51 Lists #183
NIP-51 Lists #183
Changes from 5 commits
096a81d
462f91c
6ec16f8
27b0daf
371fa2f
538d4c9
3f84fbc
3d83866
39b17bf
4554227
efd2648
53d012c
7eae30d
90b5ba6
afcee04
3b8d58b
0c3c45e
60c01e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
NIP-51 | ||
====== | ||
|
||
Lists | ||
------------------------- | ||
|
||
`draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` | ||
|
||
A special event with kind `30000`, meaning "list" 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` field. 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. This event kind would follow [NIP-33 - Parameterized Replaceable Events](33.md). Lists SHOULD NOT mix different tags (ie. 'p' tags can't be included in the same list as 'e' tags). | ||
|
||
The parameter for the list event will comprised of `<type>:<name>`: | ||
- `<type>` identifies the type of tags included in the list | ||
- `<name>` identifies the list by name | ||
|
||
Commonly established list names for this kind are: | ||
- `mute` - a list of tags that the user wants to mute | ||
- `follow` - a list of tags that the user wants to follow | ||
- `pin` - a list of tags that the user wants to pin (for display on profile) | ||
- `bookmark` - a list of tags that the user wants to bookmark | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for example, each of these ones (or multiple in batches) would be part of a NIP that references this one and NIP33 and standardizes the use of these names in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but how would the behavior change between the different lists? |
||
Outside of the commonly established list names users are allowed to choose custom names for their lists. | ||
|
||
For example, if a user has keys: | ||
``` | ||
priv: fb505c65d4df950f5d28c9e4d285ee12ffaf315deef1fc24e3c7cd1e7e35f2b1 | ||
pub: b1a5c93edcc8d586566fde53a20bdb50049a97b15483cb763854e57016e0fa3d | ||
``` | ||
and wants to publicly follow a list with these users: | ||
|
||
```json | ||
["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], | ||
["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"] | ||
``` | ||
and privately follow a list with these users: | ||
|
||
```json | ||
["p", "9ec7a778167afb1d30c4833de9322da0c08ba71a69e1911d5578d3144bb56437"], | ||
["p", "8c0da4862130283ff9e67d889df264177a508974e2feb96de139804ea66d6168"] | ||
monlovesmango marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
then they would create a list event like below: | ||
|
||
```json | ||
{ | ||
"kind": 30000, | ||
"tags": [ | ||
["d", "p:follow"], | ||
["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], | ||
["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"], | ||
], | ||
"content": "kHU7tKasd/HD5HXt7DtZcZvcK8Fa+BJMDduG5pfJkvh0jFktbtCG7jll6/b2diG2DRnVO+HJUhY0hfPXD/6TiSMLNh/IcWrqpdXacSIGEeI9VuYI0eoUw77VAhADWvpIPEeyN6qbm4QcEibM2hAVIYg90m1hpiG6/of+8sv5urD4W3QdhUWZqFim281THw3uWHf8rqFgzmHs4+nXX2G4xw==?iv=s74CzOnLHTonCkkjN7lcAg==", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you provide a decrypted version of the content so people reading will know what to encrypt? it's not clear from this doc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the decrypted version is actually listed above, so I added some verbiage to tell the reader that. |
||
...other fields | ||
} | ||
``` | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this part is needed. do we want to implicitly restrict list types here? I think that part should be handled in separate NIPs, and would allow to follow this model with lists that mix multiple kinds of tags by standardizing
d
tags.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the same spirit we could allow other structured types in the encrypted body - and we should. This leads me to question the purpose of this nip. Maybe it should be more prescriptive, not less? Maybe it should be exclusively about
follow
,mute
andblock
as that might be something the OP could readily implement and experiment with.The event pinning and bookmarks might belong into the profile and more structured encrypted data respectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even if this NIP was only limited to follow, I would still want the type. I would want users to be able to create lists of hashtags, people, and events to follow. however putting those all into one event will be a mess for client implementation. there is no situation where hashtags and follows will be processed together, the client will always have to parse them out and handle them separately.
happy to drop pinned and bookmarks entirely. just threw them in bc seemed like people are itching for these.