From 8601706ffcb2bdc7ab022022934e45442bb0b440 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 1 Jan 2022 10:40:19 -0300 Subject: [PATCH] improve json formatting on nips 1 and 9 and remove an unnecessary field. --- nips/01.md | 14 +++++++------- nips/09.md | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/nips/01.md b/nips/01.md index 611e699..127bce9 100644 --- a/nips/01.md +++ b/nips/01.md @@ -16,17 +16,17 @@ The single object type that exists is the `event`, which has the following forma ``` { - id: <32-bytes sha256 of the the serialized event data> - pubkey: <32-bytes hex-encoded public key of the event creator>, - created_at: , - kind: , - tags: [ + "id": <32-bytes sha256 of the the serialized event data> + "pubkey": <32-bytes hex-encoded public key of the event creator>, + "created_at": , + "kind": , + "tags": [ ["e", <32-bytes hex of the id of another event>, ], ["p", <32-bytes hex of the key>, ], ... // other kinds of tags may be included later ] - content: , - sig: <64-bytes signature of the sha256 hash of the serialized event data, which is the same as the "id" field>, + "content": , + "sig": <64-bytes signature of the sha256 hash of the serialized event data, which is the same as the "id" field>, } ``` diff --git a/nips/09.md b/nips/09.md index ce4fd76..0a0d149 100644 --- a/nips/09.md +++ b/nips/09.md @@ -2,27 +2,27 @@ NIP-09 ====== Event Deletion -------------------------- +-------------- `draft` `optional` `author:scsibug` A special event with kind `5`, meaning "deletion" is defined as having a list of one or more `e` tags, each referencing an event the author is requesting to be deleted. -Each tag entry must contain an event id intended for deletion. The `` item SHOULD be set to `""`, it is ignored for deletion events. +Each tag entry must contain an "e" event id intended for deletion. The event's `content` field MAY contain a text note describing the reason for the deletion. For example: -```json +``` { - kind: 5, - pubkey: <32-bytes hex-encoded public key of the event creator>, - tags: [ - ["e", "dcd59..464a2", ""], - ["e", "968c5..ad7a4", ""], + "kind": 5, + "pubkey": <32-bytes hex-encoded public key of the event creator>, + "tags": [ + ["e", "dcd59..464a2"], + ["e", "968c5..ad7a4"], ], - content: "these posts were published by accident", + "content": "these posts were published by accident", ...other fields } ```