Skip to content

Type Definitions

Interface defining Cloudflare Worker environment variables and KV namespace bindings. Configure secure document proof service infrastructure and set up worker environment for handling proof requests.

Interface for proof generation requests with UUID and optional forceRefresh flag:

interface GenerateProofRequest {
uuid: string;
forceRefresh?: boolean;
}

Groth16 zk-SNARK proof components with elliptic curve points a, b, c. This is the industry-standard proof structure for document attestation workflows.

Service response containing success status, integraHash, proof, signals, and timing data. Get proof results with hash, timing, and error information.

Workflow-ready proof response with normalized field names and metadata. Structured proof data with caching status and performance metrics.

Cached proof structure with expiration timestamps and UUID tracking. Cache proof data with expiration for improved performance.

Error response interface with success false, error message, and optional status code. Structured error information for handling failures gracefully.

Enum defining error codes for request validation, proof generation, rate limiting, and internal errors. Standardized error categories for troubleshooting and monitoring.