did:nostr: align DID-document @context to cid/v1 per updated CG spec#581
Open
jjohare wants to merge 1 commit into
Open
did:nostr: align DID-document @context to cid/v1 per updated CG spec#581jjohare wants to merge 1 commit into
jjohare wants to merge 1 commit into
Conversation
The updated did:nostr CG spec (https://nostrcg.github.io/did-nostr/) canonical example uses @context[0] = https://www.w3.org/ns/cid/v1 (Controlled Identifiers v1.0 — the context that defines the Multikey term) rather than the generic https://w3id.org/did. Update buildDidDocument + its conformance test assertion. Multikey/publicKeyMultibase (fe70102) unchanged. Auth refs kept absolute (did:nostr:<hex>#key1): the spec example uses relative #key1 but DID Core permits both, and this indexer deliberately absolutizes auth refs. Co-Authored-By: jjohare <[email protected]>
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.
Summary
Aligns
buildDidDocument's@context[0]to the Controlled Identifiers v1.0 context (https://www.w3.org/ns/cid/v1), matching the current did:nostr Community Group spec example shapes (https://nostrcg.github.io/did-nostr/). The genericw3id.org/didcontext does not define theMultikeyterm used by the document;cid/v1is what the CG spec references.Change
src/idp/well-known-did-nostr.js:buildDidDocument@context→['https://www.w3.org/ns/cid/v1', 'https://w3id.org/nostr/context'].Absolute auth/assertion references are kept as-is (JSS's existing deliberate choice). This is a one-line context reconciliation to keep JSS byte-aligned with the emerging standard.
Context
Part of a cross-ecosystem did:nostr convergence (JSS + a Rust port + agent tooling) tracking the CG spec. Filed as a first-class-collaborator alignment; happy to adjust to maintainer preference.
🤖 Generated by Claude Code