{"endpoint":"/api/demo/chain-verify","method":"POST","description":"Agent-to-Chain verification demo (ECDSA). Submits an EIP-712 meta-transaction to the AgentDemoVerifier contract, which verifies the agent's identity entirely on-chain via ecrecover + isVerifiedAgent(). A gas relayer submits the transaction on behalf of the agent.","authentication":{"required":true,"protocol":"Self Agent ID signed headers","requiredHeaders":{"x-self-agent-signature":"HMAC signature of the request","x-self-agent-timestamp":"ISO 8601 timestamp of the request"},"howToSign":"Use agent.fetch() from @selfxyz/agent-sdk, or manually sign with agent.signRequest() and attach headers."},"bodySchema":{"agentKey":"bytes32 — the agent's public key in the registry","nonce":"string — meta-tx nonce (increments per agent)","deadline":"number — unix timestamp when the meta-tx expires","eip712Signature":"string — EIP-712 typed data signature","networkId?":"'celo-sepolia' (default) or 'celo-mainnet'"},"exampleBody":{"agentKey":"0x000000000000000000000000<your-address>","nonce":"0","deadline":1700000000,"eip712Signature":"0x...","networkId":"celo-sepolia"},"notes":["Requires RELAYER_PRIVATE_KEY server env var (gas relayer pays for the transaction).","Rate limited: 3 verifications per hour per human nullifier.","The contract does its own verification — the relayer only submits the tx.","For ECDSA agents only. Ed25519 agents should use /api/demo/chain-verify-ed25519."],"sdkExample":"const res = await agent.fetch(\"https://app.ai.self.xyz/api/demo/chain-verify?network=celo-sepolia\", { method: \"POST\", headers: { \"Content-Type\": \"application/json\" }, body: JSON.stringify({}) });"}