Support CLAS trust proof signature union and optional metadata.trace in TypeScript SDK#44
Merged
GsCommand merged 1 commit intoMay 22, 2026
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
metadata.traceand a union forproof.signature(legacy single-signature or multi-signature array), so the SDK must accept and validate both forms while keeping legacy behavior.proof.signature_b64directly, which breaks new CLAS multi-signature receipts unless guarded.Description
SingleProofSignature,MultiProofSignature, andProofSignatureto the TypeScript SDK and exposing three helpers:isSingleProofSignature(),isMultiProofSignature(), andgetPrimaryProofSignature().verifyReceiptto prefer the newproof.signatureprimary signature and fall back to the legacyproof.signature_b64to maintain single-signature compatibility.metadata.trace, multi-signature receipts, primary-signature selection, and malformed multi-signature rejection, and added the new helpers to the test harness.typescript-sdk/src/index.ts,typescript-sdk/scripts/unit-tests.mjs, andtypescript-sdk/package-lock.json; no vendoredschemas.trust-receipt-v1.jsonwas present in this checkout so the schema file was not modified here.Testing
npm installsuccessfully to refresh the lockfile.npm testand unit tests passed with50 passed, 0 failedand template/CLI-smoke checks also passed.npm run buildand generated artifacts and type declarations successfully (DTS build success reported).npm run typecheck(tsc --noEmit) which completed with no errors.Codex Task