Skip to content
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-42 Lists #114

Closed
wants to merge 0 commits into from
Closed

Conversation

monlovesmango
Copy link
Member

hey all,

wanted to get this NIP out there for encrypted lists as I think we should start supporting blocking and muting sooner rather than later with the influx of users. I believe I did the encryption right but would love for someone to double check.

also this was just my initial take but would love feedback to make it better.

@vishalxl
Copy link

vishalxl commented Dec 23, 2022

This is creating two kind 30000 events if the users wants private/secret block list and a mute list.

Why not combine the two or all such lists into one event, which will include the name of list too.

So the json will look something like:

{
    "block":  [
          ["p", "2df69cd0c6ab95e08f466abe7b39bb64e744ee31ffc3041f270bdfec2a37ec06"],
          ["p", "2bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"]
    ],
    "mute": [
          ["p", "3df69cd0c6ab95e08f466abe7b39bb64e744ee31ffc3041f270bdfec2a37ec06"],
          ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"]
    ]
}

( I may need to edit the exact json)

You encrypt it and put it in content field or even a special tag field if you don't want to put encrypted stuff in content, and that won't tell anyone whether user has mute/block list even.

Also, each list can have some other payload associated with it. For example, this allows for an 'about' field for each list, which will also remain encrypted. Other payloads or properties of lists can be come up with. Which may be standard even as we find use cases.

Edit: we can also have a mixture of private and public lists.

@jb55
Copy link
Contributor

jb55 commented Dec 27, 2022

I was thinking these could be different lists in case it gets too big and hit relay message size limits.

42 Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Dec 27, 2022

Concept ACK

Commonly established parameters for this kind are:

  • block - an encrypted list of 'p' tags (or pubkeys) that the user wants to block
  • mute - an encrypted list of 'p' tags (or pubkeys) that the user wants to mute
  • follow - an encrypted list of 'p' tags (or pubkeys) that the user wants to follow secretly
  • hashtag - an encrypted list of t tags (or hashtag) that the user wants to follow
  • event - an encrypted list of e tags (or event id) that the user wants to follow

How does the first encrypted list work and block someone?

Copy link
Member

@cameri cameri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@monlovesmango
Copy link
Member Author

How does the first encrypted list work and block someone?

I guess it wouldn't work now that I think about it. block lists would have to be public and they would have to have the users in the event tag so that it is queryable. I will remove this.

@leesalminen
Copy link

I'm working on a feature for Astral right now [0] that allows users to arbitrarily group sets of relays together. When posting a new note you can select relay group(s) to post to. And when viewing a feed you can select relay group(s) to filter by.

Wondering if this can be incorporated in NIP-42?

[0] monlovesmango/astral#93

@monlovesmango
Copy link
Member Author

from @eskema on nostr (note1uazzw78ws6mz2wq9c74vz5y6lf24pj3aqnh9lc7frc94seax8p6qma7pvs):

just a thought looking at this, why not keep everything in the same event and have the public be in tags and private in encrypted content? would that simplify or complicate?

I like this idea and am gonna make this a generalized lists pr for both public and private lists. I also changed the parameter for this kind to start with the type of list (rather than just being a list name)

@monlovesmango monlovesmango changed the title NIP-42 Encrypted Lists NIP-42 Lists Jan 15, 2023
@monlovesmango
Copy link
Member Author

@leesalminen I think for the relay groups we could likely just make a relay list for each group..? might be a bit hacky bc there isn't a convention for tagging for relays. but as long as it is kept private it shouldn't interfere with anything...

@monlovesmango
Copy link
Member Author

fml I accidentally closed this pr (will never create pr on my master branch again). new pr is here: #183

@Giszmo
Copy link
Member

Giszmo commented Jan 23, 2023

Why did you not rescue this PR? You can edit the source branch of your PR ... at least I thought you could. Apparently I cannot do this on your PR or it's a GitLab feature not available on GitHub? I'd prefer you revived this PR.

@monlovesmango
Copy link
Member Author

I would prefer that too but I could not find a way to retrieve the original commits. I know with git generally you can do this. but couldn't find a way with github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants