nips/09.md

41 lines
1.2 KiB
Markdown

NIP-09
======
Event Deletion
--------------
`draft` `optional`
Event kind `5` describes a deletion event. It MUST contain a list of one or more `e` or `a` tags, each referencing the events the author is requesting to be deleted.
The `.content` MAY contain the reason for the deletion.
```
{
"kind": 5,
"pubkey": <32-bytes hex-encoded public key of the event creator>,
"tags": [
["e", "dcd59..464a2"],
["e", "968c5..ad7a4"],
["a", "<kind>:<pubkey>:<d-identifier>"]
],
"content": "these posts were published by accident",
...other fields
}
```
Supporters MUST verify if the `pubkey` of the Deletion event is the same as the `pubkey` of the referenced events.
Deletion events referencing an `a` tag delete all the referenced events up Deletion event's `created_at`.
Relays SHOULD delete or stop publishing any referenced events of the deletion request.
Relays SHOULD continue to publish/share the deletion events indefinitely, as clients may already have the event that's intended to be deleted.
Clients SHOULD hide or otherwise indicate a deletion status for referenced events.
Clients SHOULD broadcast deletion events to other relays which don't have it.
## Deleting a Deletion
Publishing a deletion event against a deletion has no effect.