Ticket generation: QR codes, SVG tickets, and Apple Wallet passes.
- QR codes — SVG-based QR code generation for check-in URLs
- SVG tickets — visual ticket images for email attachments
- Apple Wallet —
.pkpassfile generation with PKCS#7 signing
Build info lines from ticket data (non-PII event and booking details)
Build a complete .pkpass file as a Uint8Array (ZIP archive)
Create manifest.json mapping filenames to SHA-1 hashes
Extract the inner content of an SVG element (strip the outer <svg> wrapper)
Extract the viewBox from an SVG element to compute its coordinate space
Build the pass.json content from pass data and signing credentials
Generate an SVG string for a QR code encoding the given text. Returns a complete <svg> element suitable for inline embedding.
Generate a standalone SVG ticket with QR code and event/booking details. Returns a complete SVG document string.
Validate that a string is a parseable PEM certificate
Validate that a string is a parseable PEM private key
Compute SHA-1 hex digest of a Uint8Array
Sign the manifest with PKCS#7 detached signature
Data needed to generate a pass — maps to existing ticket/event data
Non-PII ticket data for SVG rendering
Decoded icon files for inclusion in .pkpass bundles
Usage
import * as mod from "docs/tickets.ts";