upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--72.md (renamed from 172.md)36
-rw-r--r--README.md6
2 files changed, 23 insertions, 19 deletions
diff --git a/172.md b/72.md
index 3535039..750b076 100644
--- a/172.md
+++ b/72.md
@@ -1,5 +1,5 @@
1NIP-172 1NIP-72
2======= 2======
3 3
4Moderated Communities (Reddit Style) 4Moderated Communities (Reddit Style)
5------------------------------------ 5------------------------------------
@@ -10,29 +10,29 @@ The goal of this NIP is to create moderator-approved public communities around a
10 10
11# Community Definition 11# Community Definition
12 12
13`Kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals. 13`Kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals.
14 14
15```js 15```json
16{ 16{
17 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>", 17 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
18 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", 18 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
19 "created_at": "<Unix timestamp in seconds>", 19 "created_at": <Unix timestamp in seconds>,
20 "kind": 34550, 20 "kind": 34550,
21 "tags": [ 21 "tags": [
22 ["d", "<Community name>"], 22 ["d", "<Community name>"],
23 ["description", "<Community description>"], 23 ["description", "<Community description>"],
24 ["image", "<Community image url>", "<Width>x<Height>"], 24 ["image", "<Community image url>", "<Width>x<Height>"],
25 25
26 //.. other tags relevant to defining the community 26 //.. other tags relevant to defining the community
27 27
28 // moderators 28 // moderators
29 ["p", "<32-bytes hex of a pubkey1>", "<optional recommended relay URL>", "moderator"], 29 ["p", "<32-bytes hex of a pubkey1>", "<optional recommended relay URL>", "moderator"],
30 ["p", "<32-bytes hex of a pubkey2>", "<optional recommended relay URL>", "moderator"], 30 ["p", "<32-bytes hex of a pubkey2>", "<optional recommended relay URL>", "moderator"],
31 ["p", "<32-bytes hex of a pubkey3>", "<optional recommended relay URL>", "moderator"], 31 ["p", "<32-bytes hex of a pubkey3>", "<optional recommended relay URL>", "moderator"],
32 32
33 // relays used by the community (w/optional marker) 33 // relays used by the community (w/optional marker)
34 ["relay", "<relay hosting author kind 0>", "author"], 34 ["relay", "<relay hosting author kind 0>", "author"],
35 ["relay", "<relay where to send and receive requests>", "requests"], 35 ["relay", "<relay where to send and receive requests>", "requests"],
36 ["relay", "<relay where to send and receive approvals>", "approvals"], 36 ["relay", "<relay where to send and receive approvals>", "approvals"],
37 ["relay", "<relay where to post requests to and fetch approvals from>"] 37 ["relay", "<relay where to post requests to and fetch approvals from>"]
38 ] 38 ]
@@ -43,15 +43,15 @@ The goal of this NIP is to create moderator-approved public communities around a
43 43
44Any Nostr event can be a post request. Clients MUST add the community's `a` tag to the new post event in order to be presented for the moderator's approval. 44Any Nostr event can be a post request. Clients MUST add the community's `a` tag to the new post event in order to be presented for the moderator's approval.
45 45
46```js 46```json
47{ 47{
48 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>", 48 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
49 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", 49 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
50 "created_at": "<Unix timestamp in seconds>", 50 "created_at": <Unix timestamp in seconds>,
51 "kind": 1, 51 "kind": 1,
52 "tags": [ 52 "tags": [
53 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"], 53 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
54 ], 54 ],
55 "content": "<My content>" 55 "content": "<My content>"
56} 56}
57``` 57```
@@ -62,27 +62,27 @@ Community management clients MAY filter all mentions to a given `kind:34550` eve
62 62
63The post-approval event MUST include `a` tags of the communities the moderator is posting into (one or more), the `e` tag of the post and `p` tag of the author of the post (for approval notificaitons). The event SHOULD also include the stringified `post request` event inside the `.content` ([NIP-18-style](18.md)) and a `k` tag with the original post's event kind to allow filtering of approved posts by kind. 63The post-approval event MUST include `a` tags of the communities the moderator is posting into (one or more), the `e` tag of the post and `p` tag of the author of the post (for approval notificaitons). The event SHOULD also include the stringified `post request` event inside the `.content` ([NIP-18-style](18.md)) and a `k` tag with the original post's event kind to allow filtering of approved posts by kind.
64 64
65```js 65```json
66{ 66{
67 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>", 67 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
68 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", 68 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
69 "created_at": "<Unix timestamp in seconds>", 69 "created_at": <Unix timestamp in seconds>,
70 "kind": "4550", 70 "kind": 4550,
71 "tags": [ 71 "tags": [
72 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"], 72 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
73 ["e", "<Post Request ID>", "<Optional relay url>"], 73 ["e", "<Post Request ID>", "<Optional relay url>"],
74 ["p", "<Post Request Author ID>", "<Optional relay url>"], 74 ["p", "<Post Request Author ID>", "<Optional relay url>"],
75 ["k", "<New Post Request kind>"], 75 ["k", "<New Post Request kind>"],
76 ], 76 ],
77 "content": "<New Post Request JSON>" 77 "content": "<New Post Request JSON>"
78} 78}
79``` 79```
80 80
81It's recommended that multiple moderators approve posts to avoid deleting them from the community when a moderator is removed from the owner's list. In case the full list of moderators must be rotated, the new moderator set must sign new approvals for posts in the past or the community will restart. The owner can also periodically copy and re-sign of each moderator's approval events to make sure posts don't dissapear with moderators. 81It's recommended that multiple moderators approve posts to avoid deleting them from the community when a moderator is removed from the owner's list. In case the full list of moderators must be rotated, the new moderator set must sign new approvals for posts in the past or the community will restart. The owner can also periodically copy and re-sign of each moderator's approval events to make sure posts don't dissapear with moderators.
82 82
83Post Approvals of replaceable events can be created in three ways: (i) by tagging the replaceable event as an `e` tag if moderators want to approve each individual change to the repleceable event; (ii) by tagging the replaceable event as an `a` tag if the moderator authorizes the replaceable event author to make changes without additional approvals and (iii) by tagging the replaceable event with both its `e` and `a` tag which empowers clients to display the original and updated versions of the event, with appropriate remarks in the UI. Since relays are instructed to delete old versions of a replaceable event, the `.content` of an `e`-approval MUST have the specific version of the event or Clients might not be able to find that version of the content anywhere. 83Post Approvals of replaceable events can be created in three ways: (i) by tagging the replaceable event as an `e` tag if moderators want to approve each individual change to the repleceable event; (ii) by tagging the replaceable event as an `a` tag if the moderator authorizes the replaceable event author to make changes without additional approvals and (iii) by tagging the replaceable event with both its `e` and `a` tag which empowers clients to display the original and updated versions of the event, with appropriate remarks in the UI. Since relays are instructed to delete old versions of a replaceable event, the `.content` of an `e`-approval MUST have the specific version of the event or Clients might not be able to find that version of the content anywhere.
84 84
85Clients SHOULD evaluate any non-`34550:*` `a` tag as posts to be included in all `34550:*` `a` tags. 85Clients SHOULD evaluate any non-`34550:*` `a` tag as posts to be included in all `34550:*` `a` tags.
86 86
87# Displaying 87# Displaying
88 88
@@ -98,4 +98,4 @@ The following filter displays the approved posts.
98} 98}
99``` 99```
100 100
101Clients MAY hide approvals by blocked moderators at the user's request. \ No newline at end of file 101Clients MAY hide approvals by blocked moderators at the user's request.
diff --git a/README.md b/README.md
index cfee37d..3c35ef3 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
65- [NIP-57: Lightning Zaps](57.md) 65- [NIP-57: Lightning Zaps](57.md)
66- [NIP-58: Badges](58.md) 66- [NIP-58: Badges](58.md)
67- [NIP-65: Relay List Metadata](65.md) 67- [NIP-65: Relay List Metadata](65.md)
68- [NIP-72: Moderated Communities](72.md)
68- [NIP-78: Application-specific data](78.md) 69- [NIP-78: Application-specific data](78.md)
69- [NIP-89: Recommended Application Handlers](89.md) 70- [NIP-89: Recommended Application Handlers](89.md)
70- [NIP-94: File Metadata](94.md) 71- [NIP-94: File Metadata](94.md)
@@ -94,6 +95,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
94| `1311` | Live Chat Message | [53](53.md) | 95| `1311` | Live Chat Message | [53](53.md) |
95| `1984` | Reporting | [56](56.md) | 96| `1984` | Reporting | [56](56.md) |
96| `1985` | Label | [32](32.md) | 97| `1985` | Label | [32](32.md) |
98| `4550` | Community Post Approval | [72](72.md) |
97| `9734` | Zap Request | [57](57.md) | 99| `9734` | Zap Request | [57](57.md) |
98| `9735` | Zap | [57](57.md) | 100| `9735` | Zap | [57](57.md) |
99| `10000` | Mute List | [51](51.md) | 101| `10000` | Mute List | [51](51.md) |
@@ -123,6 +125,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
123| `31925` | Calendar Event RSVP | [52](52.md) | 125| `31925` | Calendar Event RSVP | [52](52.md) |
124| `31989` | Handler recommendation | [89](89.md) | 126| `31989` | Handler recommendation | [89](89.md) |
125| `31990` | Handler information | [89](89.md) | 127| `31990` | Handler information | [89](89.md) |
128| `34550` | Community Definition | [72](72.md) |
129
126 130
127### Event Kind Ranges 131### Event Kind Ranges
128 132
@@ -170,7 +174,7 @@ When experimenting with kinds, keep in mind the classification introduced by [NI
170| `e` | event id (hex) | relay URL, marker | [1](01.md), [10](10.md) | 174| `e` | event id (hex) | relay URL, marker | [1](01.md), [10](10.md) |
171| `g` | geohash | -- | [12](12.md), [52](52.md) | 175| `g` | geohash | -- | [12](12.md), [52](52.md) |
172| `i` | identity | proof | [39](39.md) | 176| `i` | identity | proof | [39](39.md) |
173| `k` | kind number (string) | -- | [18](18.md) | 177| `k` | kind number (string) | -- | [18](18.md), [72](72.md) |
174| `l` | label, label namespace | annotations | [32](32.md) | 178| `l` | label, label namespace | annotations | [32](32.md) |
175| `L` | label namespace | -- | [32](32.md) | 179| `L` | label namespace | -- | [32](32.md) |
176| `p` | pubkey (hex) | relay URL | [1](01.md) | 180| `p` | pubkey (hex) | relay URL | [1](01.md) |