Skip to content

Kind 30382: Pubkey Record

Overview

Pubkey Record events (kind 30382) provide a way for users to keep editable records and metadata about other users. These records can serve two primary purposes: personal note-taking about other pubkeys, and storing computed Web of Trust metrics from trusted service providers.

This kind enables users to maintain their own categorizations, notes, and metadata about other users in the network, while also supporting standardized metrics from reputation services. The addressable nature of these events means that each pubkey can have only one record per author, which is updated over time.

Specification

PropertyValue
Kind Number30382
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 user's pubkey["d", "<pubkey>"]Yes
nSet name for categorization["n", "<set-name>"]No
summaryBrief description of the user["summary", "This is my boss"]No
rankWeb of Trust rank (0-100)["rank", "89"]No
followersFollower count["followers", "1234"]No
first_created_atFirst post timestamp["first_created_at", "1609459200"]No
post_cntPost count["post_cnt", "567"]No
reply_cntReply count["reply_cnt", "234"]No
reactions_cntReactions count["reactions_cnt", "890"]No
zap_amt_recdZap amount received (sats)["zap_amt_recd", "100000"]No
zap_amt_sentZap amount sent (sats)["zap_amt_sent", "50000"]No
zap_cnt_recdZap number received["zap_cnt_recd", "45"]No
zap_cnt_sentZap number sent["zap_cnt_sent", "30"]No
zap_avg_amt_day_recdAvg zap amount/day received (sats)["zap_avg_amt_day_recd", "500"]No
zap_avg_amt_day_sentAvg zap amount/day sent (sats)["zap_avg_amt_day_sent", "200"]No
reports_cnt_recdReports received["reports_cnt_recd", "2"]No
reports_cnt_sentReports sent["reports_cnt_sent", "5"]No
tCommon topics["t", "bitcoin"]No
active_hours_startGenerally active start (0-24, UTC)["active_hours_start", "14"]No
active_hours_endGenerally active end (0-24, UTC)["active_hours_end", "22"]No
pRelay hint for the target pubkey["p", "<pubkey>", "<relay-url>"]No

Client Behavior

Clients should:

  1. For Personal Records:

    • Allow users to create and update records about other users.
    • Support adding arbitrary tags to record personal notes and categorizations.
    • Support the n tag for organizing users into sets (e.g., "colleague", "friend", "family").
    • Display the most recent version when multiple versions exist.
    • Support NIP-44 encryption of private tags in the content field.
  2. For Trusted Assertions:

    • Query trusted service providers (as declared in kind 10040 events) for assertion data.
    • Display computed metrics like rank, follower count, and activity statistics.
    • 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 pubkey per author).
    • Support filtering and searching records by tags.

Relay Behavior

Relays should:

  1. Store pubkey record events.
  2. Support queries by d tag (target pubkey), 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.

Use Cases

Personal Record Management:

  • Maintaining private notes about other users.
  • Categorizing contacts into groups (colleagues, friends, family).
  • Tracking interaction history with specific users.
  • Recording context about how you know someone.

Web of Trust Metrics:

  • Displaying reputation scores from trusted service providers.
  • Showing user activity statistics (posts, replies, reactions).
  • Presenting zap statistics and economic activity.
  • Highlighting common topics and interests.
  • Displaying typical activity hours.

Set-Based Organization:

  • Adding users to named sets for organization (using n tags).
  • Creating custom categorizations beyond simple follow lists.
  • Managing different relationship types.

Example

Personal Record Example

json
{
  "id": "a1b2c3d4e5f6...",
  "pubkey": "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
  "created_at": 1675642635,
  "kind": 30382,
  "tags": [
    ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"],
    ["n", "colleague"],
    ["summary", "Met at Bitcoin conference 2024"]
  ],
  "content": "",
  "sig": "..."
}

Trusted Assertion Example

json
{
  "id": "b2c3d4e5f6a7...",
  "pubkey": "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe",
  "created_at": 1675642635,
  "kind": 30382,
  "tags": [
    ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"],
    ["rank", "89"],
    ["followers", "1523"],
    ["post_cnt", "892"],
    ["zap_amt_recd", "250000"],
    ["t", "bitcoin"],
    ["t", "nostr"],
    ["active_hours_start", "14"],
    ["active_hours_end", "22"]
  ],
  "content": "",
  "sig": "..."
}

References

Notes

  • This kind serves dual purposes: personal record-keeping and trusted assertions. The same event structure accommodates both use cases.
  • 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 pubkeys 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 a user in multiple sets simultaneously.
  • Clients should distinguish between self-authored records (personal notes) and records from trusted service providers (assertions) in their UI.