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-29: restriction for _id_ #1493

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion 29.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ Relay-based Groups

This NIP defines a standard for groups that are only writable by a closed set of users. They can be public for reading by external users or not.

Groups are identified by a random string of any length that serves as an _id_.
Groups are identified by a random string of any length that serves as an _id_, generated by client.

_id_: is restricted to the characters `a-z0-9-_`, case-insensitive.

The relays MUST decide to reject creation of a group if an _id_ issued by client is not following the above restriction or MAY reject the creation if it's already exist or that's not acceptable based on their policies. (e.g. length of _id_ is too long).

There is no way to create a group, what happens is just that relays (most likely when asked by users) will create rules around some specific ids so these ids can serve as an actual group, henceforth messages sent to that group will be subject to these rules.

Normally a group will originally belong to one specific relay, but the community may choose to move the group to other relays or even fork the group so it exists in different forms -- still using the same _id_ -- across different relays.

Since relays can reject a specific _id_ based on their policies or when it's already exist, it's RECOMMENDED to use UUIDs for this purpose.

## Relay-generated events

Relays are supposed to generate the events that describe group metadata and group admins. These are _addressable_ events signed by the relay keypair directly, with the group _id_ as the `d` tag.
Expand Down