Use CID v1.0 @context in served did:nostr docs so Multikey is defined#569
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the served did:nostr DID document JSON-LD context to use the Controlled Identifiers v1.0 context so that Multikey / publicKeyMultibase are properly defined, aligning served documents with the project’s existing Multikey document shape.
Changes:
- Switch DID document
@contextfromhttps://w3id.org/didtohttps://www.w3.org/ns/cid/v1in thedid:nostrwell-known handler.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
500
to
502
| return { | ||
| '@context': ['https://w3id.org/did', 'https://w3id.org/nostr/context'], | ||
| '@context': ['https://www.w3.org/ns/cid/v1', 'https://w3id.org/nostr/context'], | ||
| 'id': did, |
|
|
melvincarvalho
added a commit
that referenced
this pull request
Jun 16, 2026
Bundles three fixes merged since 0.0.208: - fix(nostr): NIP-98 payload hash verifies the raw request bytes instead of a re-serialization, so binary/whitespace-sensitive bodies validate (#573, closes #565) - feat(idp): served did:nostr documents use the CID v1.0 @context so Multikey / publicKeyMultibase are actually defined (#569) - feat(cli): `jss start` shifts off a busy port (Vite-style) instead of crashing on EADDRINUSE, and prints an openable banner URL (#574, closes #557)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #568.
src/idp/well-known-did-nostr.jsserves DID documents with"type": "Multikey"+publicKeyMultibase, but the@context(https://w3id.org/did+nostr/context) defines neither, andhttps://w3id.org/didreturnstext/htmlrather than a JSON-LD context.Multikey/publicKeyMultibaseare defined only in Controlled Identifiers v1.0 (https://www.w3.org/ns/cid/v1) — which jss already uses insrc/keys/provision.js:141, so this also removes an internal inconsistency. Mirrors nostrcg/did-nostr#91. Safe: nothing asserts the literal@context; auth/resolution match on the verification method, not the context.