You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(admin): NIP-86 relay management API with NIP-98 auth and pubkey methods #1411
Is your feature request related to a problem? Please describe.
Operators can manage nostream only through the HTTP admin console or by editing settings. Generic Nostr relay-admin clients cannot talk to it, because it does not implement NIP-86. #717 asked for this and described a WebSocket transport. NIP-86 itself is an HTTP JSON-RPC API on the relay URL, so this issue is scoped to that.
Describe the solution you'd like
A first, small step that is useful by itself:
Accept POST on the relay root with Content-Type: application/nostr+json+rpc and answer JSON-RPC style ({"result": ...} or {"error": ...}).
Authenticate with the NIP-98 code that already exists (src/utils/nip98.ts, nip98-replay.ts): admin.nip98.enabled and allowedPubkeys, replay protection, and the payload tag bound to the request body. Fail closed when it is not enabled.
Methods: supportedmethods, banpubkey, listbannedpubkeys, allowpubkey, listallowedpubkeys. They map to limits.event.pubkey.blacklist and whitelist, so no migration is needed.
Unknown methods return an error that names the method. Unit tests for auth failures, replay, payload mismatch and each method; docs in CONFIGURATION.md.
Additional context
Out of scope, tracked separately: event methods (banevent, allowevent), kind filters, IP blocking, relay name/description/icon methods and NIP-11 advertisement.
Activity