mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
fixes representation to sustain order in the hex representation.
This commit is contained in:
parent
d2637dc498
commit
337a2149e9
2
01.md
2
01.md
|
@ -42,7 +42,7 @@ To obtain the `event.id`, we `sha256` the serialized event. The serialization is
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Once the `sha256` is computed, replace the first 4 bytes of the hash byte array by the 4-byte, signed, little-endian representation of the `created_at`. When verifying the event, Clients MUST check if the `id` matches the full hash OR the sorted hash.
|
Once the `sha256` is computed, replace the first 4 bytes of the hash byte array by the 4-byte, unsigned, big-endian representation of the `created_at`. When verifying the event, Clients MUST check if the `id` matches the full hash OR the sorted hash.
|
||||||
|
|
||||||
To prevent implementation differences from creating a different event ID for the same event, the following rules MUST be followed while serializing:
|
To prevent implementation differences from creating a different event ID for the same event, the following rules MUST be followed while serializing:
|
||||||
- UTF-8 should be used for encoding.
|
- UTF-8 should be used for encoding.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user