[WALLET-87] Update x401-node to spec 0.2.0#5
Merged
Conversation
Rework the SDK for x401 0.2.0: flat payload carrying the Verifier-composed Digital Credentials request at presentation_requirements, VP Artifact with inline result or presentation_uri reference, and removal of the Verifier Challenge (delete challenge.ts; keep createEncryptor as a standalone primitive). Add a spec-conformance harness pinned to the upstream spec: vendored Appendix C JSON Schema + extracted examples, sync/normative-ledger scripts, schema and fixture round-trip tests, a requirement->code map, and an upgrade runbook. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Updates the SDK to x401 spec 0.2.0 (proof/x401 PR #15, branch
dc-ification). Breaking change to the payload, VP Artifact, and Verifier Challenge.Protocol changes
proof{}wrapper is gone. The Verifier-composed Digital Credentials request lives atpresentation_requirements(carried opaque; the SDK never signs/composes it).oauthis now top-level and REQUIRED.challenge.tsandcreateChallenge/verifyChallengedeleted. Freshness/nonce now live inside the signed OpenID4VP request.response: { protocol, data }or by-referencepresentation_uri(exactly one);agent_idis now OPTIONAL.proof.issuers→ top-leveltrust_establishmentstring.return_urifor relayed delivery to a remote handler.version→0.2.0(npm package version unchanged — publishing is gated/separate).API surface
agent.getDigitalCredentialRequest,agent.buildVPArtifact/buildVPArtifactReference,agent.addReturnUri,DC_API_PROTOCOL.createEncryptor, the challenge helpers,getNonce/getCredentialQuery,DCQLQuery(orphaned or removed-concept symbols).Spec-conformance harness (
spec/,scripts/)sync-spec-fixtures.ts(re-pin/extract) andextract-normative.ts(ledger-diff of MUST/SHALL statements).ajv, devDependency only — runtime deps unchanged).spec/conformance.mdmaps each in-scope requirement to code;spec/UPGRADING.mddocuments the repeatable upgrade loop.Verification
yarn check-allgreen — format, lint, typecheck, 32 tests, publint.🤖 Generated with Claude Code