Title: Add NIP-11 relay metadata support · Issue #94 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Add NIP-11 relay metadata support · Issue #94 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Add NIP-11 relay metadata support · Issue #94 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Feature Request: NIP-11 Relay Metadata Support Currently, JSS implements NIP-01 (basic relay), NIP-07 (browser extensions), and NIP-98 (HTTP Auth), but does not implement NIP-11 (Relay Information Document). What is NIP-11? NIP-11 allows...
Open Graph Description: Feature Request: NIP-11 Relay Metadata Support Currently, JSS implements NIP-01 (basic relay), NIP-07 (browser extensions), and NIP-98 (HTTP Auth), but does not implement NIP-11 (Relay Information ...
X Description: Feature Request: NIP-11 Relay Metadata Support Currently, JSS implements NIP-01 (basic relay), NIP-07 (browser extensions), and NIP-98 (HTTP Auth), but does not implement NIP-11 (Relay Information ...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/94
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add NIP-11 relay metadata support","articleBody":"## Feature Request: NIP-11 Relay Metadata Support\n\nCurrently, JSS implements NIP-01 (basic relay), NIP-07 (browser extensions), and NIP-98 (HTTP Auth), but does not implement **NIP-11** (Relay Information Document).\n\n### What is NIP-11?\n\nNIP-11 allows relays to advertise their capabilities, supported NIPs, limitations, and administrative contact information to clients. When a relay receives an HTTP request with `Accept: application/nostr+json` header to the WebSocket URL, it should return a JSON document with relay metadata.\n\n### Current Behavior\n\n```bash\ncurl -H \"Accept: application/nostr+json\" https://example.com/relay\n# Returns 404\n```\n\n### Expected Behavior\n\n```bash\ncurl -H \"Accept: application/nostr+json\" https://example.com/relay\n# Returns JSON metadata:\n{\n \"name\": \"My JSS Relay\",\n \"description\": \"JavaScript Solid Server with Nostr relay\",\n \"pubkey\": \"...\",\n \"supported_nips\": [1, 7, 98],\n \"software\": \"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer\",\n \"version\": \"0.0.76\",\n ...\n}\n```\n\n### Why This Matters\n\n- **Discoverability**: Relay aggregators like nostr.watch, nostr.info, and NIP-66 monitors rely on NIP-11 to discover and list relays\n- **Client compatibility**: Many Nostr clients check NIP-11 to understand relay capabilities before connecting\n- **Standards compliance**: NIP-11 is the standard way relays advertise themselves in the Nostr ecosystem\n\n### Design Concerns\n\n**Note:** The NIP-11 design of using content negotiation to multiplex HTTP and WebSocket on the same URL is arguably suboptimal. It would be cleaner to serve metadata at dedicated endpoints like:\n- `/.well-known/nostr-relay.json` (follows well-known conventions)\n- `/relay.json` or `/nip11.json` (explicit and simple)\n\nHowever, for ecosystem compatibility, implementing the standard NIP-11 conneg approach is necessary. JSS could potentially serve metadata at **both** the standard conneg endpoint and a cleaner alternative endpoint.\n\n### Proposed Implementation\n\n1. Detect HTTP requests with `Accept: application/nostr+json` to `/relay` (or configured `--nostr-path`)\n2. Return JSON metadata instead of attempting WebSocket upgrade\n3. Include relevant fields:\n - `name`, `description`, `pubkey` (admin contact)\n - `supported_nips`: `[1, 7, 98]` (and others JSS implements)\n - `software`: Repository URL\n - `version`: JSS version\n - Limitation fields: `max_message_length`, `max_subscriptions`, etc.\n4. Optionally also serve at `/.well-known/nostr-relay.json` for better DX\n\n### References\n\n- [NIP-11 Specification](https://github.com/nostr-protocol/nips/blob/master/11.md)\n- [nostr.watch](https://nostr.watch/) - Primary relay aggregator\n- [NIP-66](https://github.com/nostr-protocol/nips/blob/master/66.md) - Relay discovery (builds on NIP-11)","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-01-16T23:06:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/94/JavaScriptSolidServer/issues/94"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3061c1e3-bb1e-9a42-5b13-972c620fa50c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D6E6:2D10BB:46074A:600667:69774E17 |
| html-safe-nonce | e42f5499bbdba782f8001fc47878c322c44a505a9f842269edc10b5db6e5da18 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkU2OjJEMTBCQjo0NjA3NEE6NjAwNjY3OjY5Nzc0RTE3IiwidmlzaXRvcl9pZCI6IjQxMjQ5Mjk3MjcyMDQzODAxODMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c550201e0d3b24f5b61a3a0ee63a0f7fde075feee0d52711f5618a3fada8a0a5 |
| hovercard-subject-tag | issue:3823963405 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/94/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9d7ba878adc532b1e352ade720b53e35aa8d8c3d18a0f0f83b6fdc11992132b8/JavaScriptSolidServer/JavaScriptSolidServer/issues/94 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9d7ba878adc532b1e352ade720b53e35aa8d8c3d18a0f0f83b6fdc11992132b8/JavaScriptSolidServer/JavaScriptSolidServer/issues/94 |
| og:image:alt | Feature Request: NIP-11 Relay Metadata Support Currently, JSS implements NIP-01 (basic relay), NIP-07 (browser extensions), and NIP-98 (HTTP Auth), but does not implement NIP-11 (Relay Information ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3310064f35a62c06a4024ba37f41c06836f39376a095c2dfd2c4b693c34965be |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 67d5f8d1d53c3cc4f49fc3bb8029933c3dc219e6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width