Skip to content

feat(nip66): publish kind 30166 and 10166 relay health events #696

Closed

Description

@Ferryx349

Summary

After each probe run, publish NIP-66 relay discovery (kind 30166) and monitor announcement (kind 10166) events signed by the monitor identity.
Part of #667.

Problem

Nostream does not publish NIP-66 events. Clients like NDK cannot use this relay's own liveness data to filter dead relays.

Goal

  • Build kind 30166 event from latest probe snapshot (DNS, TLS, RTT, NIP-11 data per NIP-66 spec)
  • Build kind 10166 monitor announcement event
  • Bootstrap monitor identity on first run (NIP-66 SHOULD):
    • kind 0 profile
    • kind 10002 relay list (NIP-65)
  • Monitor signing key from settings (nip66.monitorPrivateKey or env), never expose in admin API
  • Store events via existing NIP-33 parameterized replaceable path (30166 is in 30000–39999 range)
  • Hook into RelayMonitorWorker post-probe callback
  • Unit tests for event shape, tag/content structure, signing
  • Integration test: probe → publish → query via Nostr filter {"kinds":[30166],"authors":["<monitor-pubkey>"]}

Activity

  1. self-assigned this
    on Jul 20, 2026
  2. added a commit that references this issue on Aug 30, 2026
    4b536ab
  3. added a commit that references this issue on Sep 8, 2026
    18b645b
  4. added a commit that references this issue on Sep 20, 2026
    afa8999
  5. added 2 commits that reference this issue on Sep 20, 2026
    7c2875e
    ff43cd3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions