feat(nip66): add relay monitor settings schema and defaults - #689
Conversation
Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>
🦋 Changeset detectedLatest commit: bd5e55e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
Adds the foundational configuration surface for a future NIP-66 relay monitor by introducing nip66.* settings defaults, TypeScript settings types, documentation entries, and unit tests to ensure default/override behavior. This aligns with issue #687’s “config only” scope.
Changes:
- Add
nip66settings block (enabled flag, probe interval, timeouts, targets, monitor identity, DNS cache TTL) todefault-settings.yaml. - Add
Nip66Settings/Nip66ProbeTimeoutsto the Settings TypeScript types and a unit test validating defaults + override merge behavior. - Document the new settings and introduce an example env var + changeset entry.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/utils/settings.spec.ts | Adds tests asserting nip66 defaults exist and that user config overrides merge correctly. |
| src/@types/settings.ts | Introduces Nip66Settings / Nip66ProbeTimeouts and wires nip66 into the Settings interface. |
| resources/default-settings.yaml | Adds a new nip66: defaults block (disabled by default). |
| CONFIGURATION.md | Documents the new nip66.* settings (but currently includes duplicated rows and wording that implies implementation exists). |
| .env.example | Adds MONITOR_PRIVATE_KEY to the example environment file. |
| .changeset/nip66-settings-foundation.md | Adds a minor changeset describing the new settings foundation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Remove monitorPrivateKey and monitorPubkey from the nip66 settings schema and document MONITOR_PRIVATE_KEY as an environment variable instead.
Uh oh!
There was an error while loading. Please reload this page.
Description
Add nip66.* settings (probe interval, timeouts, targets, monitor key, DNS cache TTL) to default-settings.yaml and settings types, config only, no worker yet. Disabled by default.
Related Issue
fixes - #687
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: