mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-27 02:35:52 -05:00
NIP-01: Specify canonical JSON for id derivation
This commit is contained in:
parent
a9139ee9a4
commit
bd9caf1b3a
4
01.md
4
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
|
```json
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue
Block a user