Type Definitions
Type Definitions
Section titled “Type Definitions”Environment Configuration
Section titled “Environment Configuration”Env Interface
Section titled “Env Interface”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.
Request Types
Section titled “Request Types”GenerateProofRequest
Section titled “GenerateProofRequest”Interface for proof generation requests with UUID and optional forceRefresh flag:
interface GenerateProofRequest { uuid: string; forceRefresh?: boolean;}Proof Types
Section titled “Proof Types”Groth16Proof
Section titled “Groth16Proof”Groth16 zk-SNARK proof components with elliptic curve points a, b, c. This is the industry-standard proof structure for document attestation workflows.
ProofServiceResponse
Section titled “ProofServiceResponse”Service response containing success status, integraHash, proof, signals, and timing data. Get proof results with hash, timing, and error information.
ProofResponse
Section titled “ProofResponse”Workflow-ready proof response with normalized field names and metadata. Structured proof data with caching status and performance metrics.
Cache Types
Section titled “Cache Types”CachedProof
Section titled “CachedProof”Cached proof structure with expiration timestamps and UUID tracking. Cache proof data with expiration for improved performance.
Error Handling
Section titled “Error Handling”ErrorResponse
Section titled “ErrorResponse”Error response interface with success false, error message, and optional status code. Structured error information for handling failures gracefully.
ErrorCode
Section titled “ErrorCode”Enum defining error codes for request validation, proof generation, rate limiting, and internal errors. Standardized error categories for troubleshooting and monitoring.