Skip to content

fix: sync current x401 wire names#7

Merged
frostevent merged 2 commits into
proof:mainfrom
creatornader:fix/current-spec-wire-names
Jun 30, 2026
Merged

fix: sync current x401 wire names#7
frostevent merged 2 commits into
proof:mainfrom
creatornader:fix/current-spec-wire-names

Conversation

@creatornader

Copy link
Copy Markdown
Contributor

Summary

Updates the Node SDK to match the current hosted x401 v0.2.0 wire surface from proof/x401 main.

  • replaces PROOF-REQUIRED / PROOF-PRESENTATION with PROOF-REQUEST / PROOF-RESPONSE and moves verifier diagnostics to PROOF-RESULT
  • replaces presentation_requirements and VP Artifact helpers with credential_requirements.digital and Result Artifact helpers
  • refreshes spec fixtures, the normative ledger, README examples, and conformance mapping from proof/x401 commit 3f73cf912cd05a40bf8de3fe6c1f4bb720341336
  • adds a prepare script so GitHub-pinned installs build dist before a new npm release is published

Checks

  • yarn format:check
  • yarn lint:check
  • yarn typecheck
  • yarn test
  • yarn build
  • yarn publint
  • node scripts/extract-normative.ts

@frostevent frostevent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution 👍

I'm wondering, if you used AI to help you put up this PR, did it leverage https://github.com/proof/x401-node/blob/main/spec/UPGRADING.md and worked seamlessly? Any updates you'd like to see in that file to facilitate future upgrades?

Comment thread spec/conformance.md Outdated
| Token Object `token_type` MUST be `"Bearer"`; `access_token` REQUIRED | `validate.ts` `parseX401TokenObject`; `agent.ts` `buildTokenObject` |
| Error Object `error` REQUIRED | `validate.ts` `parseX401ErrorObject` |
| Token-exchange fixed params (`grant_type`, `subject_token_type`, Bearer) MUST NOT be repeated in the payload | not present in the payload type; set only on the form by `agent.ts` `buildTokenExchangeForm`; verified by `verifier.ts` `parseTokenExchange`. Test: `x401.test.ts` |
| Embedded `<data>`: tag `data`, `value="application/json;x401=proof-required"`, `hidden`, single JSON object that is a valid payload and SHOULD include a `$schema` member = `https://x401.id/spec/schemas/request.json` | `verifier.ts` `embedHtmlData`; `agent.ts` `detectProofRequirement` plus `parseX401Payload`. Test: `x401.test.ts` |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specification reads "MUST include a $schema member" https://x401.proof.com/spec/latest/#embedded-proof-requirements-in-html-content.

@frostevent frostevent merged commit 30a620e into proof:main Jun 30, 2026
6 checks passed
@frostevent frostevent mentioned this pull request Jun 30, 2026
creatornader added a commit to creatornader/atrib that referenced this pull request Jun 30, 2026
Repin the private x401 integration fixture to @proof.com/x401-node@0.3.0 and add a Proof VC Common verifier bridge for caller-owned x401 result evidence.

Refresh D134 and the Proof thread map now that proof/x401-node#7 is merged and #18/#20/#21 are closed upstream.
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.

2 participants