From bd9caf1b3acec45767c7c3c3f58007a4aeb50935 Mon Sep 17 00:00:00 2001 From: shafemtol Date: Sun, 12 Mar 2023 14:13:55 +0000 Subject: [PATCH] NIP-01: Specify canonical JSON for id derivation --- 01.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/01.md b/01.md index 0e68de5e..a6dc6bad 100644 --- a/01.md +++ b/01.md @@ -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 [