nostr-watch’s libraries are published to npm under theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sandwichfarm/nostr-watch/llms.txt
Use this file to discover all available pages before exploring further.
@nostrwatch scope and can be used independently of the full monorepo. This guide walks you through checking a single relay with nocap and querying aggregated relay state with route66.
nostr-watch is in alpha. APIs may change between releases. Pin to a specific version in production and review the changelog before upgrading.
Prerequisites
Make sure you have the following installed before continuing:
Optional:
| Requirement | Version | Notes |
|---|---|---|
| Node.js | >= 20 | Managed via Volta or your preferred version manager |
| pnpm | >= 8 | npm install -g pnpm |
| Git | any | Required only if cloning the monorepo |
- Deno >= 1.4 — required for
relaymonandtrawlerservices - Docker + Docker Compose — required for
docker-stacksinfrastructure
Run a relay check
Create a file Run the check:To run every supported check at once (
check.ts and add the following:check.ts
open, read, write, dns, ssl, info, geo), use check('all'):The
ssl check uses Node.js TLS APIs and is not available in browser environments. nocap logs a warning and skips it when running in a browser.Query aggregated relay state with route66
route66 aggregates NIP-66 monitor events and lets you query relay state without running checks yourself. Install it along with its adapters:route66-example.ts
route66 connects to NIP-66 monitoring relays, pulls down existing relay check events, and stores them in the local cache adapter. Queries against the cache answer immediately without hitting the network again.Next steps
nocap
Full API reference: adapters, check keys, custom adapter authoring, and the IResult schema.
route66
RelayService queries, ChronicleService time series, MonitorService subscriptions, and adapter authoring.
auditor
Validate relay NIP conformance against their advertised NIP-11 support.