From d0812229a5569372a6cd1bdb8d148beb1820585d Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 21 Jan 2024 16:08:45 -0300 Subject: [PATCH] use jsonc in some places. --- 01.md | 11 +++++------ 52.md | 4 ++-- 72.md | 10 +++++----- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/01.md b/01.md index 80ee7924..46316ea5 100644 --- a/01.md +++ b/01.md @@ -14,7 +14,7 @@ Each user has a keypair. Signatures, public key, and encodings are done accordin The only object type that exists is the `event`, which has the following format on the wire: -```json +```jsonc { "id": <32-bytes lowercase hex-encoded sha256 of the serialized event data>, "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, @@ -22,7 +22,7 @@ The only object type that exists is the `event`, which has the following format "kind": , "tags": [ [...], - ... + // ... ], "content": , "sig": <64-bytes lowercase hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field> @@ -58,17 +58,16 @@ To prevent implementation differences from creating a different event ID for the Each tag is an array of strings of arbitrary size, with some conventions around them. Take a look at the example below: -```json +```jsonc { - ..., "tags": [ ["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"], ["p", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca"], ["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"], ["alt", "reply"], - ... + // ... ], - ... + // ... } ``` diff --git a/52.md b/52.md index 5ac116b9..f35d9040 100644 --- a/52.md +++ b/52.md @@ -38,7 +38,7 @@ The list of tags are as follows: The following tags are deprecated: * `name` name of the calendar event. Use only if `title` is not available. -```json +```jsonc { "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, @@ -99,7 +99,7 @@ The list of tags are as follows: The following tags are deprecated: * `name` name of the calendar event. Use only if `title` is not available. -```json +```jsonc { "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, diff --git a/72.md b/72.md index c0fffffc..4bafce06 100644 --- a/72.md +++ b/72.md @@ -12,7 +12,7 @@ The goal of this NIP is to create moderator-approved public communities around a `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. -```json +```jsonc { "created_at": , "kind": 34550, @@ -42,14 +42,14 @@ The goal of this NIP is to create moderator-approved public communities around a Any 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. -```json +```jsonc { "kind": 1, "tags": [ ["a", "34550::", ""], ], "content": "hello world", - ... + // ... } ``` @@ -59,7 +59,7 @@ Community management clients MAY filter all mentions to a given `kind:34550` eve The 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 notifications). 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. -```json +```jsonc { "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", "kind": 4550, @@ -70,7 +70,7 @@ The post-approval event MUST include `a` tags of the communities the moderator i ["k", ""] ], "content": "", - ... + // ... } ```