Skip to content

feat(admin): NIP-86 relay management API with NIP-98 auth and pubkey methods #1411

Todo

Description

@Priyanshubhartistm

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

Activity

  1. added
    enhancement
    on Dec 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions