Appearance
Tag: e
Overview
The "e" tag is used to refer to another event in the Nostr protocol. It allows events to reference other events, enabling threaded conversations, replies, reactions, and other interactions between events.
Specification
Property | Value |
---|---|
Tag Name | e |
Defined in | NIP-01 |
Required for | General use across event kinds |
Format
["e", "<32-bytes lowercase hex of the id of another event>", "<recommended relay URL, optional>", "<32-bytes lowercase hex of the author's pubkey, optional>"]
Usage Description
The "e" tag is used to reference another event by its event ID. The tag can include optional additional information:
- The event ID (required) - a 32-byte hex string representing the referenced event
- A recommended relay URL (optional) - where the referenced event might be found
- The pubkey of the event author (optional) - a 32-byte hex string
As a convention, all single-letter key tags (including "e") are expected to be indexed by relays, enabling queries and subscriptions that filter for events referencing specific event IDs.
Examples
Basic Example
json
["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"]
Extended Example with Relay URL
json
["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"]
Extended Example with Relay URL and Author's Pubkey
json
["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca"]
Client Behavior
Clients should:
- Interpret "e" tags as references to other events
- When displaying events with "e" tags, potentially show them as replies or references to the original events
- Use the included relay URL (if present) as a hint for where to fetch the referenced event if it's not already available
- Consider the optional author pubkey as additional metadata about the referenced event
Relay Behavior
Relays should:
- Index events by the first value in their "e" tags
- Support filtering queries based on "e" tags using the
#e
filter parameter in subscription requests - For a filter like
{"#e": ["5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"]}
, return all events that reference the specified event ID
References
Related Tags
- p (Pubkey): Used to reference users
- a (Addressable): Used to reference replaceable or addressable events
Notes
The "e" tag is one of the three standard tags defined in NIP-01, alongside the "p" and "a" tags. These three tags form the foundation of referencing in the Nostr protocol, enabling a web of connections between events and users.