nips/109.md
2023-03-21 12:40:57 -05:00

1.6 KiB

NIP-109

Public Key Revocation

draft optional author:alexgleason

Events of kind 5 may contain a "p" tag instead of "e" tags. The "p" tag MUST match the pubkey of the signed event, and this event indicates that the author wishes for relays and clients to stop showing events for this pubkey, and to reject future events from the pubkey.

Client behavior

Clients which recieve a pubkey revocation event SHOULD treat all events from that pubkey as if they were deleted in accordance with NIP-09.

Clients may give users the option to "Revoke your public key" with this type of event. Clients SHOULD display a prominent message explaining that the action is not reversible, SHOULD explain that this does not guarantee their posts are deleted forever, and SHOULD require special confirmation such as requiring the user to type a message.

Clients MUST NOT show the content field in the event for security reasons.

Relay behavior

Relays receiving a pubkey revocation event MUST mark the pubkey as revoked, and MUST stop delivering events from this pubkey to clients, EXCEPT for events of kind 5. Relays MAY delete events by this pubkey from their database, and SHOULD reject future events from the pubkey.

Relays SHOULD preserve events of kind 5 from the pubkey, as well as continue to collect and distribute events of kind 5.

Example event

{
  "kind": 5,
  "pubkey": "6027adac157831dfe9d2f988c1b8b7a75d9296a7d42a0f9ed056a320925b0e13",
  "tags": [
    ["p", "6027adac157831dfe9d2f988c1b8b7a75d9296a7d42a0f9ed056a320925b0e13"],
  ],
  "content": "",
  // ...
}