From 0c8fd4ac33c5437620e75153123b26dc6b0366a2 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Thu, 6 Nov 2025 16:36:43 -0800 Subject: [PATCH] Add META commands --- xx.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 xx.md diff --git a/xx.md b/xx.md new file mode 100644 index 0000000000..21d2dcfc95 --- /dev/null +++ b/xx.md @@ -0,0 +1,35 @@ +NIP-XX +====== + +Event Meta on Relays +-------------------- + +`draft` `optional` + +This NIP defines a command similar to `REQ`, which relays can use to expose additional metadata for events. + +## Message definitions + +Clients may send a `META` message to relays supporting this NIP with a subscription ID and a filter as defined by [NIP 01](./01.md): + +```json +["META", "1", {"ids": ["0dd58e97f6b3a7040e1dca8c3b89a12d002d5fe58191d41019e95e9c9c62f297"]}] +``` + +Relays MAY respond with its own `META` message, for example: + +```json +["META", "1", {"first_seen": 1762475640}] +``` + +If the relay declines to serve metadata to the client, it may return a `META-CLOSED` message instead: + +```json +["META-CLOSED", "1", "blocked: this relay doesn't serve metadata to interlopers"] +``` + +## Metadata fields + +The following fields are defined on the metadata object returned by the relay: + +- `first_seen` - a seconds-granularity unix timestamp for when the event was first seen by this relay