Title: feat: NIP-05 mapping at /.well-known/nostr.json for provisioned-key pods (#437 follow-up) · Issue #445 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: feat: NIP-05 mapping at /.well-known/nostr.json for provisioned-key pods (#437 follow-up) · Issue #445 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: feat: NIP-05 mapping at /.well-known/nostr.json for provisioned-key pods (#437 follow-up) · Issue #445 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Phase 2.5 / follow-up of #437. Auto-publish a NIP-05 mapping for any pod that ran with --provision-keys, so the pod owner's Nostr-flavoured identity becomes discoverable as name@domain by other Nostr clients. Why Phase 2 wired the provis...
Open Graph Description: Phase 2.5 / follow-up of #437. Auto-publish a NIP-05 mapping for any pod that ran with --provision-keys, so the pod owner's Nostr-flavoured identity becomes discoverable as name@domain by other Nos...
X Description: Phase 2.5 / follow-up of #437. Auto-publish a NIP-05 mapping for any pod that ran with --provision-keys, so the pod owner's Nostr-flavoured identity becomes discoverable as name@domain by other...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/445
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat: NIP-05 mapping at /.well-known/nostr.json for provisioned-key pods (#437 follow-up)","articleBody":"Phase 2.5 / follow-up of [#437](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/437). Auto-publish a [NIP-05](https://github.com/nostr-protocol/nips/blob/master/05.md) mapping for any pod that ran with `--provision-keys`, so the pod owner's Nostr-flavoured identity becomes discoverable as `name@domain` by other Nostr clients.\n\n## Why\n\nPhase 2 wired the provisioned key into the WebID profile and added the `did:nostr:` controller. NIP-05 is the standard \"human-friendly identifier\" layer on top of a Nostr pubkey: clients fetch `https://\u003cdomain>/.well-known/nostr.json?name=\u003cname>` and expect `{ \"names\": { \"\u003cname>\": \"\u003cpubkey hex>\" } }` (optionally with `relays`). JSS now has the pubkey and the domain; serving NIP-05 is one small route handler.\n\n## Shape\n\nA single route handler at `/.well-known/nostr.json`. Returns a `{ names, relays?, nip46? }` document built from whichever pods on this server have an owner key.\n\n### Per-pod vs shared aggregated\n\n- **Subdomain mode** (`--subdomains` + `--base-domain`): pods live at `alice.example.com`, `bob.example.com`. Each subdomain naturally serves its own `.well-known/nostr.json` — \"one per pod\" falls out for free. The handler reads the requesting Host, finds the matching pod, returns just that pod's mapping.\n- **Path mode** (default multi-user): pods live at `example.com/alice/`, `example.com/bob/`. There's only one origin, so only one `.well-known/nostr.json`. The handler aggregates: `{ names: { alice: \"\u003cpubkey-a>\", bob: \"\u003cpubkey-b>\", … } }` for every pod with a provisioned key.\n- **Single-user**: trivially one mapping. Default name from `--single-user-name` (`me` by default), single entry.\n\nThe handler doesn't need separate code paths per mode — read the Host, list local pods, filter by host visibility, emit the mapping.\n\n## Design questions to settle\n\n1. **Default name**. For a pod at `/alice/`, default the NIP-05 `name` to `alice` (matches the pod name)? Or require an explicit `--nip05-name` (or `nip05Name` in pod-creation body) to opt in per-pod?\n2. **Auto-include `relays`** when `--nostr` is on? The pod's own `/relay` is an obvious entry. Could be `[ \"wss://\u003chost>/relay\" ]`. Operators with their own relay infrastructure might want to override.\n3. **Auto-include `nip46` (remote signer)** when applicable, or leave for a follow-up?\n4. **Discovery boundary**. NIP-05 names are public — surfacing every pod's name on `/.well-known/nostr.json` reveals the operator's pod inventory. Should multi-user mode default to opt-in per pod (operator-controlled) rather than auto-listing every pod?\n5. **Source of truth**. Read the pubkey from `\u003cpod>/private/privkey.jsonld` (privileged) or from `\u003cpod>/profile/card.jsonld` `verificationMethod` (public)? The latter is simpler — the public side is already exposed there since #443.\n\nMy defaults if no answer: default name from pod name, opt-out via config (not opt-in — most operators want the discovery), auto-include `wss://\u003chost>/relay` when `--nostr` is on, skip `nip46` for now, source from the WebID profile's VM (no need to read the secret file).\n\n## Acceptance\n\n- [ ] `GET /.well-known/nostr.json?name=\u003cname>` returns `{ names: { \u003cname>: \u003cpubkey-hex> } }` for any pod with a provisioned key visible to the requesting host.\n- [ ] Subdomain mode: per-host filtering — `alice.example.com/.well-known/nostr.json` returns only alice's mapping.\n- [ ] Path mode: aggregated — `example.com/.well-known/nostr.json` returns all pods.\n- [ ] `relays` field auto-populated with the local relay URL when `--nostr` is on.\n- [ ] `?name=` query: when present, return only that name (per NIP-05); when absent, return everything.\n- [ ] Public read (no WAC) — NIP-05 verifiers don't authenticate.\n- [ ] Tests: route returns expected JSON for single-user, multi-user path mode, multi-user subdomain mode; query-filter; relay inclusion when `--nostr` on.\n\n## Out of scope\n\n- NIP-46 remote signer (could land in a follow-up if there's demand).\n- Per-pod overrides for `relays` / extra metadata. Phase 2.5 ships defaults; later iterations can add knobs.\n- Cross-domain proxying / CORS for NIP-05 verification beyond the standard `Access-Control-Allow-Origin: *`.\n\nRefs #437.\n\n\n\n## Phased plan\n\n- **MVP (sub-issue #446)** — single-user only, single name, no extras. Just `GET /.well-known/nostr.json` → `{ names: { \u003csingle-user-name>: \u003chex> } }` from the profile VM. No relays, no `?name=` filter, no aggregation. Multi-user returns 404.\n- **Phase 2** — multi-user aggregation: path mode emits one combined index, subdomain mode filters per host. Adds the `?name=` query filter per NIP-05 §3.\n- **Phase 3** — `relays` field auto-populated when `--nostr` is on; per-pod opt-out / custom name knobs; `nip46` if there's demand.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-14T12:10:34Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/445"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:d40f7493-848a-28ff-87ce-f8881db576ed |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9AE6:25555:12943FF:178A238:6B039157 |
| html-safe-nonce | 58dfa3bc7468ab5eca15c55545e43f8bab173ed8437a859426f46f915123771b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUU2OjI1NTU1OjEyOTQzRkY6MTc4QTIzODo2QjAzOTE1NyIsInZpc2l0b3JfaWQiOiI2MDg0MTk1NzAyMDIyNTc0NDIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d95b9a1295869aae5f7be6b74e1219ba10ba95bf5ba6151059834117a537f4eb |
| hovercard-subject-tag | issue:4445778466 |
| 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/445/issue_layout |
| twitter:image | https://opengraph.githubassets.com/72e787e0acd2b5f9f066edd0e78d7e73f8304808f4c9729fa6c18e1e4d89070f/JavaScriptSolidServer/JavaScriptSolidServer/issues/445 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/72e787e0acd2b5f9f066edd0e78d7e73f8304808f4c9729fa6c18e1e4d89070f/JavaScriptSolidServer/JavaScriptSolidServer/issues/445 |
| og:image:alt | Phase 2.5 / follow-up of #437. Auto-publish a NIP-05 mapping for any pod that ran with --provision-keys, so the pod owner's Nostr-flavoured identity becomes discoverable as name@domain by other Nos... |
| 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 | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width