openapi: 3.1.0 info: title: Colibri Stateless REST API version: 4.1.0 description: | REST API for Colibri Stateless - a highly efficient prover and verifier for Ethereum and Layer-2 solutions. The Colibri server provides: - **Proof Generation** (`/proof`) - Creates cryptographic proofs for blockchain data - **Proof Verification** (`/rpc`) - Verifies proofs and returns verified JSON-RPC responses - **Beacon Chain API** (`/eth/v1/beacon/*`) - Proxied beacon chain endpoints for light client sync - **Health & Metrics** - Monitoring endpoints for operational status **Note:** This server currently supports only single JSON-RPC requests (batch requests are not supported). For detailed specifications on proof formats and request structures, see: - [Ethereum Main Proof Request (C4Request)](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/ethereum/ethereum-main-proof-request) - [Full GitBook Documentation](https://corpus-core.gitbook.io/specification-colibri-stateless/) contact: name: Corpus Core url: https://corpus-core.gitbook.io/specification-colibri-stateless/ license: name: PolyForm-Noncommercial-1.0.0 url: https://polyformproject.org/licenses/noncommercial/1.0.0/ servers: - url: http://{host}:{port} description: Colibri Stateless Server variables: host: default: '127.0.0.1' description: Server host address port: default: '8090' description: Server port tags: - name: Prover description: Endpoints for generating cryptographic proofs - name: Verifier description: Endpoints for verifying proofs and executing JSON-RPC calls - name: Unverified description: Unverified proxy endpoints that forward requests to upstream RPC nodes (no verification) - name: Checkpoints description: Endpoints for external checkpoint signers (pull missing checkpoints, push signatures) - name: Configuration description: Server configuration and management (requires WEB_UI_ENABLED) - name: Health description: Health checks and monitoring - name: Beacon description: Ethereum Beacon Chain light client endpoints - name: PAP description: Pragmatic Adaptive Privacy endpoints for transaction cache paths: /tx_cache: get: tags: - PAP summary: Get transaction cache snapshot operationId: getTxCache description: | Returns an SSZ-encoded snapshot of the server's transaction cache. The snapshot is a list of blocks, each containing the block number and the keccak-256 hashes of all transactions in that block. Clients use this to populate their local tx-hash-to-block mapping for privacy-preserving transaction lookups (PAP mode). responses: '200': description: SSZ-encoded TxCacheSnapshot (may be empty if cache is not populated) content: application/octet-stream: schema: type: string format: binary '405': description: Method not allowed (only GET is supported) '503': description: Transaction cache not available (PROVER_CACHE disabled) /signed_checkpoints: get: tags: - Checkpoints summary: List unsigned checkpoints for a signer description: | Returns a list of checkpoints that should be signed by the given signer address. Intended for external signing services (cronjobs, HSM-backed signers, wallets, etc.) which implement a **pull → verify → sign → push** workflow. Each item includes: - `period`: The period directory identifier in the server period store. - `slot`: Beacon slot of the checkpoint header (for external validation). - `root`: 32-byte checkpoint root (SSZ hash_tree_root of BeaconBlockHeader) to be signed. operationId: listUnsignedCheckpoints parameters: - name: signer in: query required: true schema: type: string pattern: '^0x[a-fA-F0-9]{40}$' description: Ethereum address (20 bytes) of the signer (0x-prefixed hex) example: '0x0123456789abcdef0123456789abcdef01234567' responses: '200': description: List of checkpoints to sign (may be empty) content: application/json: schema: type: array items: $ref: '#/components/schemas/UnsignedCheckpoint' example: - period: 1621 slot: 13292352 root: '0x76fb0f621ff30c53869de9fe9ebd498eb041be04b49b15284a4cc614d37d0971' '400': description: Invalid or missing signer parameter content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: error: 'Invalid or missing signer address as query parameter' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: tags: - Checkpoints summary: Submit checkpoint signatures description: | Submits one or more signatures for previously returned checkpoints. **Signature format (EIP-191 / personal_sign):** The signer signs the 32-byte checkpoint root with the standard personal_sign prefix: `digest = keccak256("\\x19Ethereum Signed Message:\\n32" || checkpoint_root_32bytes)` The submitted `signature` must be a 65-byte recoverable secp256k1 signature (R,S,V) as a hex string. operationId: submitCheckpointSignatures requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/CheckpointSignature' example: - period: 1621 signature: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1b' responses: '200': description: Signatures accepted content: application/json: schema: $ref: '#/components/schemas/CheckpointSignatureResponse' example: success: 'Checkpoints added' '400': description: Invalid payload or no signatures to add content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: invalid_payload: value: error: 'Invalid payload' no_signatures: value: error: 'No signatures to add' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /proof: post: tags: - Prover summary: Generate Proof description: | Generates a cryptographic proof for a JSON-RPC request. This endpoint accepts standard JSON-RPC requests with additional optional properties: - `c4`: Hex-encoded state of the requested client for proof decisions - `include_code`: Include bytecode in eth_call proofs The response is an SSZ-encoded `C4Request` container defined in the [Ethereum Main Proof Request specification](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/ethereum/ethereum-main-proof-request). **Supported Methods with Proofs:** This endpoint only accepts RPC methods that have an associated ProofType. The ProofType determines the structure used in the `C4Request.proof` union. For the complete list of supported methods and their proof types, see the [Supported RPC Methods](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/ethereum/supported-rpc-methods) documentation. **Common Methods:** - `eth_call` → EthCallProof - `eth_getBalance` → EthAccountProof - `eth_getStorageAt` → EthAccountProof - `eth_getCode` → EthAccountProof - `eth_getProof` → EthAccountProof - `eth_getTransactionByHash` → EthTransactionProof - `eth_getTransactionReceipt` → EthReceiptProof - `eth_getLogs` → List[EthLogsBlock] - `eth_getBlockByNumber` → EthBlockProof - `eth_getBlockByHash` → EthBlockProof - `eth_blockNumber` → EthBlockNumberProof - `colibri_simulateTransaction` → EthCallProof **Note:** Methods without a ProofType (like `eth_chainId`, `web3_clientVersion`) are not supported by this endpoint. Use the `/rpc` endpoint instead, which handles all methods. operationId: generateProof requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProofRequest' examples: eth_call: summary: eth_call example value: jsonrpc: '2.0' method: eth_call params: - to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb' data: '0x06fdde03' - latest - '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb': balance: '0x1' stateDiff: '0x0000000000000000000000000000000000000000000000000000000000000000': '0x0000000000000000000000000000000000000000000000000000000000000001' id: 1 include_code: true eth_getBalance: summary: eth_getBalance example value: jsonrpc: '2.0' method: eth_getBalance params: - '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb' - latest id: 1 eth_getStorageAt: summary: eth_getStorageAt example value: jsonrpc: '2.0' method: eth_getStorageAt params: - '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb' - '0x0' - latest id: 1 responses: '200': description: Proof generated successfully content: application/octet-stream: schema: type: string format: binary description: | SSZ-encoded C4Request container. See the [C4Request specification](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/ethereum/ethereum-main-proof-request) for detailed structure. The container includes: - `version`: 4-byte version (domain, major, minor, patch) - `data`: Union of different proof data types - `proof`: Union of different proof types - `sync_data`: Optional light client updates '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /proof/{method}/{block}/{version}/{zk}/{c4}: get: tags: - Prover summary: Generate Block Proof (cache-friendly GET) description: | CDN-cache-friendly GET variant used by clients in **hybrid mode** for the delegated block methods `eth_getBlockHeader` and `eth_getBlockByNumber`. All request parameters are encoded into the path so shared caches / CDNs can serve repeated requests for the same head without hitting the prover. The response is identical to the SSZ-encoded `C4Request` returned by `POST /proof`. A `Cache-Control` header is set based on the block identifier: - concrete block number / hash → `public, max-age=31536000, immutable` - `finalized` → one epoch - `safe` / `justified` → half an epoch - `latest` → half a block time (`public, max-age=, stale-while-revalidate=`) The `includeTx` boolean of `eth_getBlockByNumber` is intentionally not part of the URL, because the full execution payload is always included in the proof. operationId: generateBlockProofGet parameters: - name: method in: path required: true description: The delegated RPC method. schema: type: string enum: [eth_getBlockHeader, eth_getBlockByNumber] - name: block in: path required: true description: Block identifier (tag such as `latest`/`safe`/`finalized`, a `0x`-prefixed block number, or a `0x`-prefixed block hash). schema: type: string example: latest - name: version in: path required: true description: The requesting client version number (so the prover builds a compatible proof). schema: type: integer format: int32 example: 67108864 - name: zk in: path required: true description: Whether a ZK-based sync proof may be embedded (`zk`) or not (`std`). schema: type: string enum: [zk, std] - name: c4 in: path required: true description: Hex-encoded client state snapshot (`0x` when empty). Encodes the synced periods / trusted checkpoint the client already holds. schema: type: string example: '0x' - name: signers in: query required: false description: Optional hex-encoded witness/signer public keys. schema: type: string responses: '200': description: Proof generated successfully content: application/octet-stream: schema: type: string format: binary description: SSZ-encoded C4Request container (identical to `POST /proof`). '400': description: Malformed proof GET path or parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /rpc: post: tags: - Verifier summary: Verify and Execute JSON-RPC Request description: | **Primary Use Case: Local RPC Provider Replacement** This endpoint is designed to serve as a **complete, trustless replacement for traditional RPC providers**. When running the Colibri server locally (using the [installer packages](https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/installer)), you can configure this endpoint as your RPC provider in wallets like MetaMask, enabling fully verified, trustless access to the blockchain without relying on third-party infrastructure. **How It Works:** The endpoint processes JSON-RPC requests through the following flow: 1. **Proof Generation**: Creates or fetches cryptographic proofs for the request (locally or from configured prover nodes) 2. **Verification**: Verifies the proof against the current sync committee state 3. **Response**: Returns the verified JSON-RPC response in standard format **Supported Methods:** This endpoint supports **all** Ethereum JSON-RPC methods, including: - Methods with proofs (see [Supported RPC Methods](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/ethereum/supported-rpc-methods)) - Local methods without proofs (`eth_chainId`, `web3_clientVersion`, etc.) - Filter methods (`eth_newFilter`, `eth_getFilterChanges`, etc.) - Subscription methods (`eth_subscribe`, `eth_unsubscribe`) **Local Setup Example:** ```bash # Install and run locally (macOS/Linux/Windows) # See: https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/installer # Configure in MetaMask: # Network Name: Colibri Verified Ethereum # RPC URL: http://localhost:8090/rpc # Chain ID: 1 (or your configured chain) ``` The `/config` and `/config.html` endpoints complement this use case by providing an easy-to-use configuration interface for non-developers, allowing them to adjust settings like RPC nodes, beacon nodes, and caching without editing configuration files. operationId: verifyAndExecute requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/JsonRpcRequest' examples: eth_call: summary: eth_call example value: jsonrpc: '2.0' method: eth_call params: - to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb' data: '0x06fdde03' - latest - '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb': balance: '0x1' stateDiff: '0x0000000000000000000000000000000000000000000000000000000000000000': '0x0000000000000000000000000000000000000000000000000000000000000001' id: 1 eth_getBalance: summary: eth_getBalance example value: jsonrpc: '2.0' method: eth_getBalance params: - '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb' - latest id: 1 responses: '200': description: Request verified and executed successfully content: application/json: schema: oneOf: - $ref: '#/components/schemas/JsonRpcResponse' - $ref: '#/components/schemas/JsonRpcErrorResponse' examples: success: summary: Successful response value: jsonrpc: '2.0' result: '0x0000000000000000000000000000000000000000000000000de0b6b3a7640000' id: 1 error: summary: JSON-RPC error value: jsonrpc: '2.0' error: code: -32000 message: 'execution reverted' id: 1 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /unverified_rpc: post: tags: - Unverified summary: Unverified JSON-RPC Proxy description: | Forwards JSON-RPC requests directly to configured upstream RPC nodes according to the active `chain_id` without performing any verification. Use cases include: - Fetching contract bytecode via `eth_getCode` after the contract's `codeHash` has been verified by a proof (e.g., during `eth_call` verification), enabling a hash check of the downloaded code. - Performing high-throughput `eth_getLogs` queries for discovery, followed by explicit verification of matched events using `eth_verifyLogs`. This endpoint is intended for performance and convenience; responses are not verified by the Colibri server. operationId: unverifiedRpcProxy requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/JsonRpcRequest' examples: eth_getCode: summary: eth_getCode example value: jsonrpc: '2.0' method: eth_getCode params: - '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb' - latest id: 1 eth_getLogs: summary: eth_getLogs example value: jsonrpc: '2.0' method: eth_getLogs params: - fromBlock: '0x0' toBlock: latest address: '0x0000000000000000000000000000000000000000' topics: [] id: 1 responses: '200': description: Proxied JSON-RPC response (not verified) content: application/json: schema: oneOf: - $ref: '#/components/schemas/JsonRpcResponse' - $ref: '#/components/schemas/JsonRpcErrorResponse' examples: success: summary: Successful proxied response value: jsonrpc: '2.0' result: '0x' id: 1 error: summary: Proxied JSON-RPC error value: jsonrpc: '2.0' error: code: -32000 message: 'execution reverted' id: 1 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /config.html: get: tags: - Configuration summary: Get Configuration Web UI description: | Serves the web-based configuration interface for managing server settings. **Use Case: Local RPC Provider Setup** This endpoint is specifically designed for users running Colibri locally as a trustless RPC provider (see `/rpc` endpoint). The Web UI provides an accessible way for non-developers to configure the server without editing configuration files directly. **Configuration Options:** - RPC node endpoints (upstream Ethereum nodes) - Beacon node endpoints (for light client sync) - Memcached settings (for proof caching) - Network settings (host, port, chain ID) - Prover settings (local vs. remote proof generation) **Security Note:** This endpoint is disabled by default for security reasons. Enable it with `WEB_UI_ENABLED=1` environment variable or the `-u` command-line flag. **Only enable on trusted networks** (typically localhost for local RPC provider setup). operationId: getConfigUI responses: '200': description: Configuration UI HTML page content: text/html: schema: type: string description: HTML page with interactive configuration editor '403': description: Web UI is disabled content: text/html: schema: type: string description: HTML error page explaining how to enable the Web UI /config: get: tags: - Configuration summary: Get Server Configuration description: | Returns the current server configuration as JSON. This endpoint is used by the configuration Web UI (`/config.html`) to display and manage settings. It's part of the local RPC provider setup workflow, allowing programmatic access to server configuration for management tools. **Security Note:** This endpoint is disabled by default. Enable it with `WEB_UI_ENABLED=1` environment variable or the `-u` command-line flag. Only enable on trusted networks. operationId: getConfig responses: '200': description: Current server configuration content: application/json: schema: $ref: '#/components/schemas/ConfigResponse' example: parameters: - name: host env: HOST description: 'Host/IP address to bind to (127.0.0.1=localhost only, 0.0.0.0=all interfaces)' type: string value: '127.0.0.1' - name: port env: PORT description: Port to listen on type: int value: 8090 min: 1 max: 65535 - name: rpc_nodes env: RPC_NODES description: 'Comma-separated list of Ethereum RPC node URLs' type: string value: 'https://eth-mainnet.g.alchemy.com/v2/...' '403': description: Web UI is disabled content: text/html: schema: type: string post: tags: - Configuration summary: Update Server Configuration description: | Updates the server configuration and triggers an automatic restart. **How It Works:** 1. **Validation**: The server validates all parameter values against their definitions (type, range, etc.) 2. **Save**: Valid parameters are written to the configuration file 3. **Restart**: The server executes `exit(0)`, relying on the service manager (systemd, launchd, docker-compose) to restart it with the new configuration **Requirements:** - Server must be started with a config file: `-f ` or `--config ` - `WEB_UI_ENABLED=1` must be set (enabled by default with [installer packages](https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/installer)) - Service manager (systemd/launchd/docker-compose) must be configured to restart on exit **Restrictions:** - **Sensitive parameters** (type: `key`) cannot be updated via this endpoint for security reasons - **Integer parameters** must be within their defined min/max range - Changes take effect after server restart (typically 1-2 seconds) **Use Case:** This endpoint is specifically designed for the local RPC provider setup, allowing non-technical users to adjust settings like RPC endpoints, beacon nodes, or caching options through the Web UI without manually editing configuration files. **Security Note:** This endpoint is disabled by default. Only enable on trusted networks (typically localhost for local installations). operationId: updateConfig requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ConfigUpdateRequest' example: parameters: - env: PORT value: 8091 - env: RPC_NODES value: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY,https://rpc.ankr.com/eth' - env: MEMCACHED_HOST value: 'localhost' responses: '200': description: Configuration updated successfully content: application/json: schema: $ref: '#/components/schemas/ConfigUpdateResponse' example: success: true restart_required: true message: 'Configuration saved. Restart server to apply changes.' updated_count: 3 '400': description: Validation error or invalid request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: validation_failed: summary: Parameter validation failed value: error: 'Validation failed' message: 'Parameter port value 99999 out of range [1, 65535].' no_config_file: summary: Server started without config file value: error: 'No config file' message: 'Server was started without a config file. Cannot save changes.' invalid_json: summary: Invalid JSON format value: error: 'Invalid JSON' message: 'Request body must be valid JSON object' no_updates: summary: No valid parameters found value: error: 'No updates' message: 'No valid parameters found in request' '403': description: Web UI is disabled content: text/html: schema: type: string description: HTML error page explaining how to enable the Web UI '500': description: Failed to save configuration content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: error: 'Save failed' message: 'Could not write config file' /health: get: tags: - Health summary: Health Check description: | Returns the server health status and operational statistics. Use this endpoint for monitoring and health checks in production deployments. operationId: healthCheck responses: '200': description: Server is healthy content: application/json: schema: $ref: '#/components/schemas/HealthResponse' example: status: ok stats: total_requests: 1523 total_errors: 12 last_sync_event: 125705 last_request_time: 1698234567 open_requests: 3 '500': description: Server is unhealthy content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /metrics: get: tags: - Health summary: Prometheus Metrics description: | Returns Prometheus-compatible metrics for monitoring server performance and operations. Configure your Prometheus instance to scrape this endpoint for comprehensive monitoring of proof generation, verification, and RPC operations. operationId: getMetrics responses: '200': description: Prometheus metrics content: text/plain: schema: type: string description: Prometheus text-based exposition format example: | # HELP c4_total_requests Total number of requests processed # TYPE c4_total_requests counter c4_total_requests 1523 # HELP c4_total_errors Total number of errors encountered # TYPE c4_total_errors counter c4_total_errors 12 # HELP c4_open_requests Number of currently open requests # TYPE c4_open_requests gauge c4_open_requests 3 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /eth/v1/beacon/headers/{block_id}: get: tags: - Beacon summary: Get Beacon Block Header description: | Retrieves the beacon block header for a given block identifier. This endpoint is part of the Ethereum Beacon Chain API and is used for light client sync operations. Requests are proxied to configured beacon nodes. operationId: getBlockHeader parameters: - name: block_id in: path required: true schema: type: string description: | Block identifier. Can be one of: - `head` - Canonical head in node's view - `genesis` - Genesis block - `finalized` - Latest finalized block - `` - Specific slot number - `` - Hex-encoded block root with 0x prefix example: head responses: '200': description: Block header retrieved successfully content: application/json: schema: type: object required: - execution_optimistic - finalized - data properties: execution_optimistic: type: boolean description: True if the response references an unverified execution payload finalized: type: boolean description: True if the response references the finalized history data: type: object required: - root - canonical - header properties: root: type: string format: hex pattern: '^0x[a-fA-F0-9]{64}$' canonical: type: boolean header: type: object description: SignedBeaconBlockHeader object '400': $ref: '#/components/responses/BeaconBadRequest' '404': $ref: '#/components/responses/BeaconNotFound' '500': $ref: '#/components/responses/BeaconError' /eth/v1/beacon/light_client/bootstrap/{block_root}: get: tags: - Beacon summary: Get Light Client Bootstrap description: | Requests the LightClientBootstrap structure for a given post-Altair beacon block root. This is used to initialize light clients with the current sync committee. See the [Ethereum Consensus Specs](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/altair/light-client/sync-protocol.md#lightclientbootstrap) for details. operationId: getLightClientBootstrap parameters: - name: block_root in: path required: true schema: type: string format: hex pattern: '^0x[a-fA-F0-9]{64}$' description: Hex-encoded block root with 0x prefix example: '0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2' responses: '200': description: Light client bootstrap data headers: Eth-Consensus-Version: required: true schema: type: string enum: [phase0, altair, bellatrix, capella, deneb, electra, fulu] description: The active consensus version content: application/json: schema: type: object required: - version - data properties: version: type: string enum: [phase0, altair, bellatrix, capella, deneb, electra, fulu] data: type: object description: LightClientBootstrap structure '400': $ref: '#/components/responses/BeaconBadRequest' '404': $ref: '#/components/responses/BeaconNotFound' '500': $ref: '#/components/responses/BeaconError' /eth/v1/beacon/light_client/updates: get: tags: - Beacon summary: Get Light Client Updates description: | Requests LightClientUpdate instances in the sync committee period range [start_period, start_period + count), leading up to the current head. Used for light client sync to track sync committee changes across periods. See the [Ethereum Consensus Specs](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/altair/light-client/sync-protocol.md#lightclientupdate) for details. operationId: getLightClientUpdatesByRange parameters: - name: start_period in: query required: true schema: type: string description: Starting sync committee period example: '1' - name: count in: query required: true schema: type: string description: Number of periods to request example: '1' responses: '200': description: Array of light client updates content: application/json: schema: type: array items: type: object required: - version - data properties: version: type: string enum: [phase0, altair, bellatrix, capella, deneb, electra, fulu] data: type: object description: LightClientUpdate structure '400': $ref: '#/components/responses/BeaconBadRequest' '500': $ref: '#/components/responses/BeaconError' /openapi.yaml: get: tags: - Configuration summary: Get OpenAPI Specification description: Returns this OpenAPI specification document in YAML format operationId: getOpenApiSpec responses: '200': description: OpenAPI specification content: text/yaml: schema: type: string components: schemas: UnsignedCheckpoint: type: object required: - period - slot - root properties: period: type: integer minimum: 0 description: Sync committee period identifier example: 1621 slot: type: integer minimum: 0 description: Beacon slot of the checkpoint header example: 13292352 root: type: string pattern: '^0x[a-fA-F0-9]{64}$' description: 32-byte checkpoint root (0x-prefixed hex) example: '0x76fb0f621ff30c53869de9fe9ebd498eb041be04b49b15284a4cc614d37d0971' CheckpointSignature: type: object required: - period - signature properties: period: type: integer minimum: 0 description: Sync committee period identifier (must match an outstanding checkpoint) example: 1621 signature: type: string pattern: '^0x[a-fA-F0-9]{130}$' description: 65-byte recoverable secp256k1 signature (R,S,V) over the EIP-191 digest of the checkpoint root example: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1b' CheckpointSignatureResponse: type: object required: - success properties: success: type: string description: Status message example: 'Checkpoints added' JsonRpcRequest: type: object required: - jsonrpc - method - params - id properties: jsonrpc: type: string enum: ['2.0'] description: JSON-RPC version method: type: string description: RPC method name example: eth_call params: type: array description: Method parameters items: {} id: oneOf: - type: string - type: number - type: 'null' description: Request identifier example: jsonrpc: '2.0' method: eth_getBalance params: ['0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb', 'latest'] id: 1 ProofRequest: allOf: - $ref: '#/components/schemas/JsonRpcRequest' - type: object properties: c4: type: string format: hex description: | Hex-encoded state of the requested client. Allows the prover to make decisions about required header proofs (e.g., for historic blocks). example: '0x1234567890abcdef' include_code: type: boolean description: | If true, eth_call proofs will include the required contract bytecode in the proof, enabling stateless verification. default: false last_block_hash: type: string format: hex description: | 32-byte hash of the newest execution block header the client has already verified and cached. If the requested proof targets this block, the prover omits the block proof and references the block by hash only, resulting in a much smaller proof. Only advertise hashes the client can still resolve. example: '0x89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567' example: jsonrpc: '2.0' method: eth_call params: - to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb' data: '0x06fdde03' - latest id: 1 include_code: true JsonRpcResponse: type: object required: - jsonrpc - result - id properties: jsonrpc: type: string enum: ['2.0'] result: description: Method result (type varies by method) id: oneOf: - type: string - type: number - type: 'null' example: jsonrpc: '2.0' result: '0x0000000000000000000000000000000000000000000000000de0b6b3a7640000' id: 1 JsonRpcErrorResponse: type: object required: - jsonrpc - error - id properties: jsonrpc: type: string enum: ['2.0'] error: type: object required: - code - message properties: code: type: integer description: JSON-RPC error code example: -32000 message: type: string description: Error message example: 'execution reverted' data: description: Additional error data (optional) id: oneOf: - type: string - type: number - type: 'null' ErrorResponse: type: object required: - error properties: error: type: string description: Error message example: error: 'Internal server error' HealthResponse: type: object required: - status - stats properties: status: type: string enum: [ok, error] description: Overall health status stats: type: object required: - total_requests - total_errors - last_sync_event - last_request_time - open_requests properties: total_requests: type: integer description: Total number of requests processed since server start example: 1523 total_errors: type: integer description: Total number of errors encountered example: 12 last_sync_event: type: integer description: Timestamp of last sync committee event example: 125705 last_request_time: type: integer description: Unix timestamp of last request example: 1698234567 open_requests: type: integer description: Number of currently active requests example: 3 ConfigResponse: type: object required: - parameters properties: parameters: type: array items: $ref: '#/components/schemas/ConfigParameter' ConfigParameter: type: object required: - name - env - description - type properties: name: type: string description: Parameter name example: port env: type: string description: Environment variable name example: PORT description: type: string description: Human-readable parameter description example: Port to listen on type: type: string enum: [int, string, key] description: Parameter type value: description: Current parameter value (not included for 'key' type) min: type: integer description: Minimum value (for 'int' type) max: type: integer description: Maximum value (for 'int' type) ConfigUpdateRequest: type: object required: - parameters properties: parameters: type: array description: Array of parameters to update items: type: object required: - env - value properties: env: type: string description: Environment variable name (must match a valid parameter) example: PORT value: oneOf: - type: string - type: integer description: New value for the parameter (type depends on parameter definition) example: 8091 example: parameters: - env: PORT value: 8091 - env: RPC_NODES value: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY' ConfigUpdateResponse: type: object required: - success - restart_required - message - updated_count properties: success: type: boolean description: Whether the configuration was successfully updated example: true restart_required: type: boolean description: Whether a server restart is required (always true for successful updates) example: true message: type: string description: Human-readable status message example: 'Configuration saved. Restart server to apply changes.' updated_count: type: integer description: Number of parameters that were successfully updated example: 2 BeaconErrorResponse: type: object required: - code - message properties: code: type: integer description: Error code or HTTP status code message: type: string description: Error message stacktraces: type: array description: Optional stack traces (debug mode only) items: type: string responses: BeaconBadRequest: description: Bad request - invalid input content: application/json: schema: $ref: '#/components/schemas/BeaconErrorResponse' example: code: 400 message: 'Invalid block ID: current' BeaconNotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/BeaconErrorResponse' example: code: 404 message: 'Block not found' BeaconError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/BeaconErrorResponse' example: code: 500 message: 'Internal server error' securitySchemes: {} externalDocs: description: Full Colibri Stateless Documentation url: https://corpus-core.gitbook.io/specification-colibri-stateless/