Use this file to discover all available pages before exploring further.
nostr-watch is a pnpm workspace containing 30+ packages organized into three layers. Packages in lower layers have no knowledge of packages above them — internal packages never import from libraries, and neither layer imports from apps. This one-way dependency rule keeps libraries clean for external consumers and prevents circular dependencies across the monorepo.
Three packages — nocap, route66, and publisher — use a pluggable adapter architecture to decouple check orchestration and event publishing from environment-specific implementations.
nocap separates check orchestration (timeouts, result collection, ordering) from check implementation. Adapters supply the actual work: DNS lookups, TLS certificate retrieval, WebSocket connection management. Each adapter declares a static type property ('websocket', 'dns', 'ssl', 'geo', 'info') that tells nocap which check dimensions it handles.Five default adapters ship in libraries/nocap/adapters/default/:
Adapter
Type
What it does
WebsocketAdapterDefault
websocket
Open/read/write WebSocket checks via @nostrwatch/websocket
DnsAdapterDefault
dns
DNS lookup via Cloudflare DNS-over-HTTPS
SslAdapterDefault
ssl
TLS certificate validation (Node.js only)
InfoAdapterDefault
info
NIP-11 relay information document retrieval
GeoAdapterDefault
geo
Geographic IP lookup; depends on DNS result
Custom adapters extend AbstractAdapter and implement the interface for their type. See nocap for the full custom adapter guide.
Cache adapters (ICacheAdapter) — store and query NIP-66 relay check events locally. The reference implementation, NostrSqliteAdapter, uses SQLite via @nostrwatch/worker-relay.
WebSocket adapters (IWebsocketAdapter) — connect to Nostr monitoring relays to receive incoming NIP-66 events. The reference implementation, NostrToolsAdapter, uses nostr-tools and nostr-fetch.
Both dimensions are swappable independently, so route66 works equally well in browser, Node.js, or worker thread environments.
@nostrwatch/publisher abstracts Nostr event signing and broadcasting behind an adapter interface. This allows relaymon and other agents to swap signing libraries (e.g., nostr-tools, hardware signers) without changing event construction logic.
All packages within the monorepo reference each other using @nostrwatch/* scoped names. pnpm workspaces resolve these to local package directories during development:
import { getLogger } from '@nostrwatch/logger'import Nocap from '@nostrwatch/nocap'import { Route66 } from '@nostrwatch/route66'
The same import paths work unchanged when consuming packages from npm.