Skip to content

NIP-AD web addresses for relay groups, event pages and hosted sites - #22

Merged
FelineStateMachine merged 1 commit into
mainfrom
feat/nip-ad-web-addresses
Sep 4, 2026
Merged

NIP-AD web addresses for relay groups, event pages and hosted sites#22
FelineStateMachine merged 1 commit into
mainfrom
feat/nip-ad-web-addresses

Conversation

@FelineStateMachine

Copy link
Copy Markdown
Owner

Motivation

A URL shared from bind.ws opens in a browser but does not tell a supporting Nostr client which local event it represents. NIP-AD gives relay homepages, event/article pages and hosted sites a Nostr counterpart.

Change

  • Implements /.well-known/nostr.json?path=<original-path> from proposal 2406, pinned to b82a9bf66ec9757149b5aa3b3cd36190dd4e6fed (checked 2026-09-04).
  • Maps the homepage to the exact relay-authored NIP-29 metadata address, /e/<id> to that event version, /a/... to its article address, and mapped NIP-5A site paths to their live manifest or snapshot. Every mapping has an exact filter, limit: 1, and explicit relay hints.
  • Reuses browser event/path resolution and preserves private reads, moderation/deletion/expiry, disabled features, custom-domain targets, site authentication and site-origin isolation. Discovery never fetches external URLs or site file bytes.
  • Preserves NIP-05 name and directory semantics; name takes precedence when both parameters are supplied. Path discovery remains independent of the names feature. GET/HEAD and narrow OPTIONS preflight use CORS and non-storable responses.
  • Documents the pinned proposal, path encoding, HTTP contract and compatibility limits; extends HTTP exposure and site-cookie coverage.

Compatibility and coordination

The upstream proposal is still open. This PR does not change NIP-11 supported_nips; the parallel NIP-9a compatibility PR owns lettered advertisement. Merge this PR before that PR, which will advertise AD. This PR has no dependency on NIP-9a or NIP-86 claims. Site discovery describes manifest mappings without guaranteeing file availability; the browser site door retains its hash checks and file-fetch policy.

Testing Completed

  • npm run typecheck: passes TypeScript, generated artifacts, console, celld configuration and template checks.
  • npm test -- --maxWorkers=4: all 45 files / 229 tests pass on the final implementation. An earlier default-pool run passed 225 tests; the final default-pool attempt stalled without an assertion failure, so the final complete run bounds worker concurrency.
  • Focused coverage includes exact filters and article replacement, private/group admission, hidden/deleted/expired events and manifests, disabled features, custom/stale-host isolation, local relay hints, encoded filenames, NIP-05 coexistence, NIP-98/site cookies, CORS and malformed requests.
  • Independent subagent policy and final source reviews completed; findings were checked and resolved before submission.

Responsible AI disclosure

Implemented and reviewed with Codex and subagents. Maintainers retain final review and merge decisions; no merge or deployment was performed.

…ess rules

Path discovery maps relay groups, public event pages and hosted site manifests to exact filters with explicit relay hints. Shared resolvers preserve browser path matching, NIP-05 behavior and site isolation; docs pin the upstream proposal and tests cover access and routing boundaries.
@FelineStateMachine
FelineStateMachine merged commit 03f39d4 into main Sep 4, 2026
1 check passed
@FelineStateMachine
FelineStateMachine deleted the feat/nip-ad-web-addresses branch September 4, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant