nips/09.md

42 lines
1.3 KiB
Markdown
Raw Normal View History

2022-05-01 06:48:57 -04:00
NIP-09
======
Event Deletion
--------------
2023-11-15 19:42:51 -05:00
`draft` `optional`
2022-05-01 06:48:57 -04:00
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.
2022-05-01 06:48:57 -04:00
2024-03-28 12:39:23 -04:00
The `.content` MAY contain the reason for the deletion. One or more `k` tags MAY be added to describe the kind of the referenced events.
2022-05-01 06:48:57 -04:00
```
{
"kind": 5,
"pubkey": <32-bytes hex-encoded public key of the event creator>,
"tags": [
["e", "dcd59..464a2"],
["e", "968c5..ad7a4"],
2024-03-28 12:31:05 -04:00
["k", "<kind>"],
["a", "<kind>:<pubkey>:<d-identifier>"]
2022-05-01 06:48:57 -04:00
],
"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.
2022-05-01 06:48:57 -04:00
Deletion events referencing an `a` tag delete all the referenced events up Deletion event's `created_at`.
2022-05-01 06:48:57 -04:00
Relays SHOULD delete or stop publishing any referenced events of the deletion request.
2022-05-01 06:48:57 -04:00
Relays SHOULD continue to publish/share the deletion events indefinitely, as clients may already have the event that's intended to be deleted.
2022-05-01 06:48:57 -04:00
2024-03-28 12:35:39 -04:00
Clients SHOULD hide or otherwise indicate a deleted status for referenced events.
2022-05-01 06:48:57 -04:00
Clients SHOULD broadcast deletion events to other relays which don't have it.
2022-05-01 06:48:57 -04:00
## Deleting a Deletion
Publishing a deletion event against a deletion has no effect.