Skip to content

Kind 30383: Event Record

Overview

Event Record events (kind 30383) provide a way for users to keep editable records and metadata about specific events. These records can serve two primary purposes: personal note-taking and tracking about events (such as reports, bookmarks, or custom annotations), and storing computed metrics from trusted service providers.

This kind enables users to maintain their own state tracking, categorizations, and metadata about any event in the network, while also supporting standardized metrics like engagement counts and popularity scores from reputation services. The addressable nature ensures that each event can have only one record per author, which is updated over time.

Specification

PropertyValue
Kind Number30383
Event RangeAddressable
Defined inRecord Events Proposal, Trusted Assertions Proposal

Content Format

The content field may be an empty string, or a NIP-44 encrypted tag list containing private tags that the user does not wish to reveal publicly.

Schema

""

or

json
{
  "encrypted": "base64-encoded-nip44-encrypted-data"
}

Tags

Tag NameDescriptionFormatRequired
dTarget event's ID["d", "<event-id>"]Yes
kKind of the referenced event["k", "1"]Yes
pPubkey of the referenced event["p", "<event-pubkey>"]Yes
nSet name for categorization["n", "open"]No
rankEvent rank (0-100)["rank", "85"]No
comment_cntComment count["comment_cnt", "42"]No
quote_cntQuote count["quote_cnt", "15"]No
repost_cntRepost count["repost_cnt", "28"]No
reaction_cntReaction count["reaction_cnt", "156"]No
zap_cntZap count["zap_cnt", "23"]No
zap_amountZap amount (sats)["zap_amount", "50000"]No
eRelay hint for the target event["e", "<event-id>", "<relay-url>"]No

Client Behavior

Clients should:

  1. For Personal Records:

    • Allow users to create and update records about events.
    • Support adding arbitrary tags to record personal notes, state, and categorizations.
    • Support the n tag for organizing events into sets (e.g., "open", "flagged", "reviewed").
    • Display the most recent version when multiple versions exist.
    • Support NIP-44 encryption of private tags in the content field.
    • Common use cases include tracking report status, moderation state, or custom workflows.
  2. For Trusted Assertions:

    • Query trusted service providers (as declared in kind 10040 events) for assertion data.
    • Display computed metrics like engagement counts and popularity scores.
    • Update assertion data as service providers publish new calculations.
    • Allow users to choose which service providers to trust for different metrics.
  3. General:

    • Properly handle the addressable event format (one record per target event per author).
    • Include the required k and p tags for proper event referencing and outbox support.
    • Support filtering and searching records by tags.

Relay Behavior

Relays should:

  1. Store event record events.
  2. Support queries by d tag (target event ID), author, or other tag parameters.
  3. Implement proper handling of addressable events, ensuring only the most recent version per author/target pair is considered current.
  4. Support REQ filters that allow clients to efficiently query records.
  5. Use the p tag for outbox model relay routing.

Use Cases

Personal Record Management:

  • Tracking the status of reports (e.g., "open", "resolved", "spam").
  • Maintaining moderation state for community managers.
  • Bookmarking events with custom categories.
  • Recording private notes about specific events.
  • Implementing custom workflows (e.g., "to-review", "approved", "rejected").

Engagement Metrics:

  • Displaying event popularity scores from trusted service providers.
  • Showing engagement statistics (comments, quotes, reposts, reactions).
  • Presenting zap statistics for events.
  • Ranking events by computed metrics.

Set-Based Organization:

  • Adding events to named sets for organization (using n tags).
  • Creating custom collections beyond simple bookmarks.
  • Managing different event states and categories.

Example

Personal Record Example (Report Tracking)

json
{
  "id": "c1d2e3f4a5b6...",
  "pubkey": "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
  "created_at": 1675642635,
  "kind": 30383,
  "tags": [
    ["d", "a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7"],
    ["k", "1984"],
    ["p", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"],
    ["n", "open"]
  ],
  "content": "",
  "sig": "..."
}

Trusted Assertion Example (Engagement Metrics)

json
{
  "id": "d2e3f4a5b6c7...",
  "pubkey": "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe",
  "created_at": 1675642635,
  "kind": 30383,
  "tags": [
    ["d", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87"],
    ["k", "1"],
    ["p", "a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919"],
    ["rank", "92"],
    ["comment_cnt", "67"],
    ["quote_cnt", "23"],
    ["repost_cnt", "45"],
    ["reaction_cnt", "234"],
    ["zap_cnt", "56"],
    ["zap_amount", "125000"]
  ],
  "content": "",
  "sig": "..."
}

Encrypted Private Notes Example

json
{
  "id": "e3f4a5b6c7d8...",
  "pubkey": "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
  "created_at": 1675642635,
  "kind": 30383,
  "tags": [
    ["d", "c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3"],
    ["k", "1"],
    ["p", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"]
  ],
  "content": "{\"ciphertext\":\"...\",\"nonce\":\"...\"}",
  "sig": "..."
}

References

Notes

  • This kind serves dual purposes: personal record-keeping and trusted assertions. The same event structure accommodates both use cases.
  • The k (kind) and p (pubkey) tags are required to properly reference the target event and support the outbox model for relay routing.
  • Service providers publishing trusted assertions should use their own pubkey to sign these events, allowing users to identify the source of the metrics.
  • Users can maintain their own personal records about events while also consuming assertion data from service providers by querying events from different authors.
  • The n tag from the Event Sets proposal enables flexible categorization and set membership.
  • Multiple n tags can be used to include an event in multiple sets simultaneously.
  • Clients should distinguish between self-authored records (personal notes/state tracking) and records from trusted service providers (assertions) in their UI.
  • This kind is particularly useful for implementing custom moderation workflows, where moderators track the state of reports or flagged content.