Appearance
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
| Property | Value |
|---|---|
| Kind Number | 30383 |
| Event Range | Addressable |
| Defined in | Record 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 Name | Description | Format | Required |
|---|---|---|---|
d | Target event's ID | ["d", "<event-id>"] | Yes |
k | Kind of the referenced event | ["k", "1"] | Yes |
p | Pubkey of the referenced event | ["p", "<event-pubkey>"] | Yes |
n | Set name for categorization | ["n", "open"] | No |
rank | Event rank (0-100) | ["rank", "85"] | No |
comment_cnt | Comment count | ["comment_cnt", "42"] | No |
quote_cnt | Quote count | ["quote_cnt", "15"] | No |
repost_cnt | Repost count | ["repost_cnt", "28"] | No |
reaction_cnt | Reaction count | ["reaction_cnt", "156"] | No |
zap_cnt | Zap count | ["zap_cnt", "23"] | No |
zap_amount | Zap amount (sats) | ["zap_amount", "50000"] | No |
e | Relay hint for the target event | ["e", "<event-id>", "<relay-url>"] | No |
Client Behavior
Clients should:
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
ntag 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.
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.
General:
- Properly handle the addressable event format (one record per target event per author).
- Include the required
kandptags for proper event referencing and outbox support. - Support filtering and searching records by tags.
Relay Behavior
Relays should:
- Store event record events.
- Support queries by
dtag (target event ID), author, or other tag parameters. - Implement proper handling of addressable events, ensuring only the most recent version per author/target pair is considered current.
- Support REQ filters that allow clients to efficiently query records.
- Use the
ptag 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
ntags). - 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
- Record Events Proposal (PR #1322)
- Trusted Assertions Proposal (PR #1534)
- Event Sets Proposal (PR #784)
- NIP-01: Basic Protocol
- NIP-44: Encrypted Payloads
Related Kinds
- Kind 30382: Pubkey Record - Records about users
- Kind 30384: Addressable Event Record - Records about addressable events
- Kind 1984: Reporting - Public reports of objectionable content
- Kind 10040: Declaring Trusted Service Providers - Lists authorized assertion providers
- Kind 30061: Custom Sets - Tracks custom set names for organization
Notes
- This kind serves dual purposes: personal record-keeping and trusted assertions. The same event structure accommodates both use cases.
- The
k(kind) andp(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
ntag from the Event Sets proposal enables flexible categorization and set membership. - Multiple
ntags 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.