upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrabble <evan@protest.net>2025-06-25 22:45:33 +1200
committerrabble <evan@protest.net>2025-06-25 22:45:33 +1200
commit93f95c2156ab8317b752823bdac2a14556149cb9 (patch)
tree2acd6cd252bb3c802a59b5dd0489e7353aba2a50
parent6f3926c5b2d414c61cef36e4062ca8b7918cfc15 (diff)
NIP-29: Add optional protected events and original relay tracking
- Change group identifier format from "may" to "must" for consistency - Add optional NIP-70 protected events tag as alternative to timeline references - Add optional "original_relay" tag to track where group was first created - Helps maintain group integrity and trace group origins across forks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
-rw-r--r--29.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/29.md b/29.md
index 601d63a..af2380b 100644
--- a/29.md
+++ b/29.md
@@ -20,7 +20,7 @@ Relays are supposed to generate the events that describe group metadata and grou
20 20
21## Group identifier 21## Group identifier
22 22
23A group may be identified by a string in the format `<host>'<group-id>`. For example, a group with _id_ `abcdef` hosted at the relay `wss://groups.nostr.com` would be identified by the string `groups.nostr.com'abcdef`. 23A group must be identified by a string in the format `<host>'<group-id>`. For example, a group with _id_ `abcdef` hosted at the relay `wss://groups.nostr.com` would be identified by the string `groups.nostr.com'abcdef`.
24 24
25Group identifiers must be strings restricted to the characters `a-z0-9-_`, and SHOULD be random in order to avoid name collisions. 25Group identifiers must be strings restricted to the characters `a-z0-9-_`, and SHOULD be random in order to avoid name collisions.
26 26
@@ -30,6 +30,10 @@ When encountering just the `<host>` without the `'<group-id>`, clients MAY infer
30 30
31Events sent by users to groups (chat messages, text notes, moderation events etc) MUST have an `h` tag with the value set to the group _id_. 31Events sent by users to groups (chat messages, text notes, moderation events etc) MUST have an `h` tag with the value set to the group _id_.
32 32
33## Protected events
34
35Events sent to a group MAY include the [NIP-70](70.md) `-` tag to mark them as protected events. This ensures that group messages can only be published to the intended relay by their original authors, preventing unauthorized republishing to other relays and maintaining the integrity of group discussions within their designated relay. This provides an alternative or additional method to timeline references for keeping group messages from being taken out of context.
36
33## Timeline references 37## Timeline references
34 38
35In order to not be used out of context, events sent to these groups may contain references to previous events seen from the same relay in the `previous` tag. The choice of which previous events to pick belongs to the clients. The references are to be made using the first 8 characters (4 bytes) of any event in the last 50 events seen by the user in the relay, excluding events by themselves. There can be any number of references (including zero), but it's recommended that clients include at least 3 and that relays enforce this. 39In order to not be used out of context, events sent to these groups may contain references to previous events seen from the same relay in the `previous` tag. The choice of which previous events to pick belongs to the clients. The references are to be made using the first 8 characters (4 bytes) of any event in the last 50 events seen by the user in the relay, excluding events by themselves. There can be any number of references (including zero), but it's recommended that clients include at least 3 and that relays enforce this.
@@ -154,13 +158,14 @@ When this event is not found, clients may still connect to the group, but treat
154 ["picture", "https://pizza.com/pizza.png"], 158 ["picture", "https://pizza.com/pizza.png"],
155 ["about", "a group for people who love pizza"], 159 ["about", "a group for people who love pizza"],
156 ["public"], // or ["private"] 160 ["public"], // or ["private"]
157 ["open"] // or ["closed"] 161 ["open"], // or ["closed"]
162 ["original_relay", "wss://original.relay.com"] // optional: original relay where group was created
158 ] 163 ]
159 // other fields... 164 // other fields...
160} 165}
161``` 166```
162 167
163`name`, `picture` and `about` are basic metadata for the group for display purposes. `public` signals the group can be _read_ by anyone, while `private` signals that only AUTHed users can read. `open` signals that anyone can request to join and the request will be automatically granted, while `closed` signals that members must be pre-approved or that requests to join will be manually handled. 168`name`, `picture` and `about` are basic metadata for the group for display purposes. `public` signals the group can be _read_ by anyone, while `private` signals that only AUTHed users can read. `open` signals that anyone can request to join and the request will be automatically granted, while `closed` signals that members must be pre-approved or that requests to join will be manually handled. `original_relay` (optional) indicates the relay where the group was originally created, allowing clients to track the group's origin even when it has been forked to other relays.
164 169
165- *group admins* (`kind:39001`) (optional) 170- *group admins* (`kind:39001`) (optional)
166 171