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--01.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/01.md b/01.md
index 2ff81eb..9258d2f 100644
--- a/01.md
+++ b/01.md
@@ -30,7 +30,7 @@ The only object type that exists is the `event`, which has the following format
30} 30}
31``` 31```
32 32
33To obtain the `event.id`, we `sha256` the serialized event. The serialization is done over the UTF-8 JSON-serialized string (with no white space or line breaks) of the following structure: 33To obtain the `event.id`, we `sha256` the serialized event. The serialization is done over the UTF-8 JSON-serialized string (which is described below) of the following structure:
34 34
35```json 35```json
36[ 36[
@@ -43,6 +43,14 @@ To obtain the `event.id`, we `sha256` the serialized event. The serialization is
43] 43]
44``` 44```
45 45
46To prevent implementation differences from creating a different event ID for the same event, the following rules MUST be followed while serializing:
47- No whitespace, line breaks or other unnecessary formatting should be included in the output JSON.
48- No characters except the following should be escaped, and instead should be included verbatim:
49 - The line break, `0x0A`, as `\n`
50 - A double quote, `0x22`, as `\"`
51 - A backspace, `0x5C`, as `\\`
52- UTF-8 should be used for encoding.
53
46## Communication between clients and relays 54## Communication between clients and relays
47 55
48Relays expose a websocket endpoint to which clients can connect. 56Relays expose a websocket endpoint to which clients can connect.