Align CLAS proof & ENS conventions; remove legacy receipt root exports#21
Merged
Merged
Conversation
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.
Motivation
protocol-commons/v1.1.0model is no longer presented as the primary public API.kid, ENS compatibility) to close audit gaps and improve cross-repo compatibility.Description
src/index.tssosignReceipt,verifyReceipt,isSignedLayeredReceipt, and related types are no longer exported at package root. (Files changed:src/index.ts).metadata.proof.hash.alg = "SHA-256"and updated types, signer, signing, and verification code to emit/verify that exact string. (Files changed:src/compat.ts,src/canonicalize.ts).metadata.proof.signature.kidis required, non-empty, and a string duringverifyCommandLayerReceipt()and added schema-level error codes when missing. (Files changed:src/compat.ts,test/compat.test.ts).verifyCommandLayerReceipt()to return the canonical result shape{ ok, status: "VERIFIED" | "INVALID", checks: { schema, canonical_hash, signature, signer }, errors }and to set per-check boolean flags and machine-readable error codes. (Files changed:src/compat.ts,test/compat.test.ts).cl.receipt.signerand optional discovery TXT recordscl.endpoint.runtime,cl.endpoint.verify,cl.endpoint.mcp,cl.endpoint.docs, andcl.endpoint.registry, returning them onresolveSignerFromENS()as typed metadata while keeping endpoints optional and non-critical to crypto verification. (Files changed:src/ens.ts,test/ens.test.ts).CANONICAL_TEST_VECTORSas independently verified and updated the README to show only the canonical CLAS proof envelope, the exactSHA-256string,signature.kidusage, ENS signer records, and optional endpoint discovery metadata. (Files changed:src/canonicalize.ts,README.md).Testing
npm install,npm run build,npm test, andnpm run typecheckand observed all automated steps complete successfully with test suite passing. (Commands:npm install,npm run build,npm test,npm run typecheck).test/compat.test.tsandtest/ens.test.tscover verifier return shape, requiredsignature.kid, invalid-hash and invalid-signature cases, ENS signer parsing, and optional endpoint discovery, and all tests passed locally.0dbaae51c2ad0d355250a7c700bbf95387ecf397and the changes were bundled into a draft PR with the branchfix/runtime-core-contract-and-ens-alignment.Codex Task