This commit is contained in:
Vitor Pamplona 2024-01-03 13:16:50 -05:00
parent 99201a0089
commit b6ddf591a5

4
01.md
View File

@ -46,7 +46,7 @@ To obtain the hash `.id`, we `sha256` the UTF-8 byte array of a JSON-serialized
]
```
The JSON serialization MUST follow this rules:
The JSON serialization MUST follow these rules:
- Minified: No whitespace, line breaks, or other unnecessary formatting used
- Escape Set: ONLY the following characters MUST be escaped:
- line break: `0x0A` to `\n`
@ -162,7 +162,7 @@ Relays send 3 types of messages during a subscription:
* `["EOSE", <subscription_id>]`, used to indicate the _end of stored events_ and the beginning of events newly received in real-time.
* `["CLOSED", <subscription_id>, <message>]`, used to indicate that a subscription was ended on the server side.
All messages MUST be sent with the subscription_id initiated by the client (using the `REQ` message above).
All messages MUST be sent with the `subscription_id` initiated by the client (using the `REQ` message above).
`CLOSED` messages MUST be sent in response to a `REQ` when the relay refuses to fulfill it. It can also be sent when a relay decides to kill a subscription on its side before a client has disconnected or sent a `CLOSE`. The message MUST be a string formed by a machine-readable single-word prefix followed by a `:` and then a human-readable message.