upleb.uk

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

summaryrefslogtreecommitdiff
path: root/72.md
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2023-11-18 08:48:49 -0300
committerfiatjaf <fiatjaf@gmail.com>2023-11-18 08:48:49 -0300
commitb0df71824f9967130b54150b64cc70fa94bffec2 (patch)
tree1681a11b7a792d3a06387debca0bc4e8049a1cab /72.md
parent7aa751be46d515d7612998a4da88285cb0957cd3 (diff)
NIP-72: reformat and clarify some things.
Diffstat (limited to '72.md')
-rw-r--r--72.md44
1 files changed, 22 insertions, 22 deletions
diff --git a/72.md b/72.md
index 833336c..74c7f08 100644
--- a/72.md
+++ b/72.md
@@ -10,16 +10,15 @@ 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```json 15```json
16{ 16{
17 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>", 17 ...
18 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
19 "created_at": <Unix timestamp in seconds>, 18 "created_at": <Unix timestamp in seconds>,
20 "kind": 34550, 19 "kind": 34550,
21 "tags": [ 20 "tags": [
22 ["d", "<Community name>"], 21 ["d", "<community-d-identifier>"],
23 ["description", "<Community description>"], 22 ["description", "<Community description>"],
24 ["image", "<Community image url>", "<Width>x<Height>"], 23 ["image", "<Community image url>", "<Width>x<Height>"],
25 24
@@ -41,18 +40,16 @@ The goal of this NIP is to create moderator-approved public communities around a
41 40
42# New Post Request 41# New Post Request
43 42
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. 43Any Nostr event can be submitted to a community by anyone for approval. Clients MUST add the community's `a` tag to the new post event in order to be presented for the moderator's approval.
45 44
46```json 45```json
47{ 46{
48 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>", 47 ...
49 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
50 "created_at": <Unix timestamp in seconds>,
51 "kind": 1, 48 "kind": 1,
52 "tags": [ 49 "tags": [
53 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"], 50 ["a", "34550:<community event author pubkey>:<community-d-identifier>", "<optional-relay-url>"],
54 ], 51 ],
55 "content": "<My content>" 52 "content": "hello world"
56} 53}
57``` 54```
58 55
@@ -64,17 +61,16 @@ The post-approval event MUST include `a` tags of the communities the moderator i
64 61
65```json 62```json
66{ 63{
67 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>", 64 ...
68 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", 65 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
69 "created_at": <Unix timestamp in seconds>,
70 "kind": 4550, 66 "kind": 4550,
71 "tags": [ 67 "tags": [
72 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"], 68 ["a", "34550:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"],
73 ["e", "<Post Request ID>", "<Optional relay url>"], 69 ["e", "<post-id>", "<optional-relay-url>"],
74 ["p", "<Post Request Author ID>", "<Optional relay url>"], 70 ["p", "<port-author-pubkey>", "<optional-relay-url>"],
75 ["k", "<New Post Request kind>"], 71 ["k", "<post-request-kind>"]
76 ], 72 ],
77 "content": "<New Post Request JSON>" 73 "content": "<the full approved event, JSON-encoded>"
78} 74}
79``` 75```
80 76
@@ -91,11 +87,15 @@ Community clients SHOULD display posts that have been approved by at least 1 mod
91The following filter displays the approved posts. 87The following filter displays the approved posts.
92 88
93```js 89```js
94{ 90[
95 "authors": ["<Author pubkey>", "<Moderator1 pubkey>", "<Moderator2 pubkey>", "<Moderator3 pubkey>", ...], 91 "REQ",
96 "kinds": [4550], 92 "_",
97 "#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"], 93 {
98} 94 "authors": ["<owner-pubkey>", "<moderator1-pubkey>", "<moderator2-pubkey>", "<moderator3-pubkey>", ...],
95 "kinds": [4550],
96 "#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"],
97 }
98]
99``` 99```
100 100
101Clients MAY hide approvals by blocked moderators at the user's request. 101Clients MAY hide approvals by blocked moderators at the user's request.