upleb.uk

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

summaryrefslogtreecommitdiff
path: root/01.md
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2024-01-21 16:08:45 -0300
committerfiatjaf <fiatjaf@gmail.com>2024-01-21 16:08:45 -0300
commitd0812229a5569372a6cd1bdb8d148beb1820585d (patch)
treebd6f065a735d7b738380813238de697c22c95c36 /01.md
parentc766f8892b46b26a91ac1e570cb605a8074b78b2 (diff)
use jsonc in some places.
Diffstat (limited to '01.md')
-rw-r--r--01.md11
1 files changed, 5 insertions, 6 deletions
diff --git a/01.md b/01.md
index 80ee792..46316ea 100644
--- a/01.md
+++ b/01.md
@@ -14,7 +14,7 @@ Each user has a keypair. Signatures, public key, and encodings are done accordin
14 14
15The only object type that exists is the `event`, which has the following format on the wire: 15The only object type that exists is the `event`, which has the following format on the wire:
16 16
17```json 17```jsonc
18{ 18{
19 "id": <32-bytes lowercase hex-encoded sha256 of the serialized event data>, 19 "id": <32-bytes lowercase hex-encoded sha256 of the serialized event data>,
20 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, 20 "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
22 "kind": <integer between 0 and 65535>, 22 "kind": <integer between 0 and 65535>,
23 "tags": [ 23 "tags": [
24 [<arbitrary string>...], 24 [<arbitrary string>...],
25 ... 25 // ...
26 ], 26 ],
27 "content": <arbitrary string>, 27 "content": <arbitrary string>,
28 "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> 28 "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
58 58
59Each tag is an array of strings of arbitrary size, with some conventions around them. Take a look at the example below: 59Each tag is an array of strings of arbitrary size, with some conventions around them. Take a look at the example below:
60 60
61```json 61```jsonc
62{ 62{
63 ...,
64 "tags": [ 63 "tags": [
65 ["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"], 64 ["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"],
66 ["p", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca"], 65 ["p", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca"],
67 ["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"], 66 ["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"],
68 ["alt", "reply"], 67 ["alt", "reply"],
69 ... 68 // ...
70 ], 69 ],
71 ... 70 // ...
72} 71}
73``` 72```
74 73