nips/85.md
2024-10-11 17:33:28 -05:00

1.2 KiB

NIP-85

d Tag References in Addressable Events

draft optional

Addressable events have a d tag whose value is an arbitrary identifier. Usually it's a made-up name such as a blog post slug or a reverse-DNS identifier, but it can also be a reference to another user or event on the network.

When a new addressable kind is defined, it may invoke this NIP by including a third parameter in the d tag: a standardized tag name such as "e", "p", or "a". In addition, exactly one of those tags MUST be included in the tags list, and its value MUST match the d tag value.

For example, an addressable kind that references another event:

[
  ["d", eventId, "e"],
  ["e", eventId, ...rest],
]

Another addressable kind that references a user:

[
  ["d", userId, "p"],
  ["p", userId, ...rest],
]

This NIP does not define any kinds on its own. It's meant to be adopted on a per-kind basis. It is only applicable when the event kind will ONLY ever reference a single other standardized tag in its d tag.

Clients implementing this NIP MUST validate events of applicable kinds by disposing of them if they do not adhere to the above rules.