NIP-01: Specify canonical JSON for id derivation

This commit is contained in:
shafemtol 2023-03-12 14:13:55 +00:00
parent a9139ee9a4
commit bd9caf1b3a

4
01.md
View File

@ -30,7 +30,9 @@ The only object type that exists is the `event`, which has the following format
} }
``` ```
To 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: The object MUST conform to the I-JSON ([RFC 7493](https://www.rfc-editor.org/rfc/rfc7493.html)) subset of JSON.
To obtain the `event.id`, we `sha256` the serialized event. The event data is structured as follows and serialized according to the JSON Canonicalization Scheme ([RFC 8785](https://www.rfc-editor.org/rfc/rfc8785)):
```json ```json
[ [