From c7befd4e73f1c52eb2f7bcb6ebabb33cf798f4d3 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Sun, 19 Dec 2021 10:22:09 -0600 Subject: [PATCH] add event deletion NIP --- nips/nn.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 nips/nn.md diff --git a/nips/nn.md b/nips/nn.md new file mode 100644 index 0000000..5dccdd4 --- /dev/null +++ b/nips/nn.md @@ -0,0 +1,43 @@ +NIP-NN +====== + +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 `""`, but is ignored for deletion events. + +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", ""], + ], + content: "these posts were published by accident", + ...other fields +``` + +Relays MAY delete or stop publishing any referenced events that have an identical `pubkey` as the deletion request. + +## Client Usage + +Clients MAY choose to fully hide any events that are referenced by valid deletion events. This includes text notes, direct messages, or other yet-to-be defined event kinds. Alternatively, they MAY show the event along with an icon or other indication that the author has "disowned" the event. The `content` field may also be used to replace the deleted events own content, although a user interface should clearly indicate that this is a deletion reason, not the original content. + +A client MUST validate that each event `pubkey` referenced in the `e` tag of the deletion request is identical to the deletion request `pubkey`, before hiding or deleting any event. Relays can not, in general, perform this validation and should not be treated as authoritative. + +## Relay Usage + +Relays MAY validate that a deletion event only references events that have the same `pubkey` as the deletion itself, however this is not required since relays may not have knowledge of all referenced events. + +## Deleting a Deletion + +Publishing a deletion event against a deletion has no effect. Clients and relays are not obliged to support "undelete" functionality.