Repository navigation
feat!: signature collection, canonical ExtractedTicket — release 3.0.0 - #45
Merged
Merged
Conversation
New SignatureCollector class and collectSignatures(payloads) helper: feed each scanned QR payload in, signatures are extracted via extractSignedData and grouped automatically by Level 1 key identity (securityProviderNum or securityProviderIA5, plus keyId), with byte-for-byte deduplication of rescans. Groups plug into findKeyInXml and recoverLevel1PublicKey. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMYUez7fcvaL34RUjxKZRJ
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMYUez7fcvaL34RUjxKZRJ
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMYUez7fcvaL34RUjxKZRJ
…ation and collection
Replace extractSignedData/ExtractedSignedData with extractTicket/
ExtractedTicket: the same information restructured per level (signedBytes,
signature, keyAlg, signingAlg, plus level2.publicKey) with the payload and
a new SignatureKey identity (issuer + keyId, canonical id label).
The record is now the lingua franca: verifySignatures, verifyLevel1Signature,
verifyLevel2Signature and recoverLevel1PublicKey accept it in place of raw
bytes so a scan pipeline decodes each payload once; findKeyInXml gains a
SignatureKey overload; Level1KeyProvider.getPublicKey takes a SignatureKey.
SignatureCollector stores full ExtractedTicket records (no lossy copy) and
its add() returns { status: 'added' | 'duplicate' | 'invalid' } instead of
throwing — unreadable scans are expected input in a camera loop. New
collector.group(key | id) lookup and signatureKey() helper.
BREAKING CHANGE: extractSignedData/ExtractedSignedData removed;
Level1KeyProvider.getPublicKey signature changed (and keyId is no longer
defaulted to 0). Migration guide from 2.0.0 in CHANGELOG.md.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMYUez7fcvaL34RUjxKZRJ
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMYUez7fcvaL34RUjxKZRJ
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.
Summary
ExtractedTicketcanonical record (extractTicket): exact signed bytes, signatures, algorithm OIDs and the Level 1 key identity (SignatureKey: issuer + keyId + canonicalidlabel), structured per level. ReplacesextractSignedData/ExtractedSignedData.verifySignatures,verifyLevel1Signature,verifyLevel2SignatureandrecoverLevel1PublicKeyacceptUint8Array | ExtractedTicket;findKeyInXmlgains aSignatureKeyoverload;Level1KeyProvider.getPublicKey(key, keyAlg?)takes aSignatureKey.SignatureCollector(+ one-shotcollectSignatures): classifies scanned QR payloads automatically by issuer + keyId, deduplicates rescans byte-for-byte, and reports unreadable scans as{ status: 'invalid' }instead of throwing. Groups store fullExtractedTicketrecords and feed directly into registry lookup, key recovery and verification.The
website/app depends on the published npmdosipas-ts@^2.0.0and is unaffected; it migrates when it bumps to 3.x.Test plan
npx tsc --noEmitandnpm run buildpassExtractedTicketpass-through, group lookup)🤖 Generated with Claude Code
https://claude.ai/code/session_01BMYUez7fcvaL34RUjxKZRJ
Generated by Claude Code