Skip to content

[WALLET-87] Update x401-node to spec 0.2.0#5

Merged
frostevent merged 7 commits into
mainfrom
jeremie/wallet-87
Jun 24, 2026
Merged

[WALLET-87] Update x401-node to spec 0.2.0#5
frostevent merged 7 commits into
mainfrom
jeremie/wallet-87

Conversation

@frostevent

Copy link
Copy Markdown
Collaborator

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

  • Flat payload — the proof{} wrapper is gone. The Verifier-composed Digital Credentials request lives at presentation_requirements (carried opaque; the SDK never signs/composes it). oauth is now top-level and REQUIRED.
  • Verifier Challenge removedchallenge.ts and createChallenge/verifyChallenge deleted. Freshness/nonce now live inside the signed OpenID4VP request.
  • VP Artifact — inline response: { protocol, data } or by-reference presentation_uri (exactly one); agent_id is now OPTIONAL.
  • proof.issuers → top-level trust_establishment string.
  • New optional return_uri for relayed delivery to a remote handler.
  • Wire version0.2.0 (npm package version unchanged — publishing is gated/separate).

API surface

  • New: agent.getDigitalCredentialRequest, agent.buildVPArtifact / buildVPArtifactReference, agent.addReturnUri, DC_API_PROTOCOL.
  • Removed: createEncryptor, the challenge helpers, getNonce / getCredentialQuery, DCQLQuery (orphaned or removed-concept symbols).

Spec-conformance harness (spec/, scripts/)

  • Fixtures pinned to the spec at a fixed SHA: vendored Appendix C JSON Schema + extracted examples.
  • sync-spec-fixtures.ts (re-pin/extract) and extract-normative.ts (ledger-diff of MUST/SHALL statements).
  • Tests validate against the spec's own schema + examples (ajv, devDependency only — runtime deps unchanged).
  • spec/conformance.md maps each in-scope requirement to code; spec/UPGRADING.md documents the repeatable upgrade loop.

Verification

yarn check-all green — format, lint, typecheck, 32 tests, publint.

⚠️ Pinned to PR #15's head SHA (58527f14), which is not yet merged. Re-pin spec/SPEC_SOURCE.json to the merged main SHA (one-line edit + sync-spec-fixtures.ts re-run) before release.

🤖 Generated with Claude Code

Jeremie Charrier and others added 7 commits June 23, 2026 12:31
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>
@frostevent frostevent merged commit 020fdf4 into main Jun 24, 2026
6 checks passed
@frostevent frostevent deleted the jeremie/wallet-87 branch June 24, 2026 09:03
@frostevent frostevent mentioned this pull request Jun 24, 2026
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