# enclave402 EIP-712 Agent State Attestation

> enclave402 EIP-712 Agent State Attestation is a paid API for AI agents from enclave402.com, paid per call via x402, $0.04/call, status unknown (last checked 2026-09-18).

Creates a non-repudiable, timestamped EIP-712 cryptographic attestation binding an agent ID and a keccak256 state digest, settled via x402 micropayment on Base

## Facts

- Endpoint: POST https://enclave402.com/api/agent/attest
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/enclave402-eip-712-agent-state-attestation-89450084
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4wbQwUMn1XpZSXloGpBxO

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability enclave402-eip-712-agent-state-attestation-89450084 -d '<json body>'
```

Example prompt: Attest that I — agent 'agent-0x402-1' — decided to hold the rebalance portfolio at this moment; the state is '{"task":"rebalance","decision":"hold","at":1789650000}' and I need a non-repudiable EIP-712 signed proof I can verify offline later.

## When to prefer this

Use this endpoint when you need a lightweight, offline-verifiable, non-repudiable timestamp proof of an agent decision or state — specifically when EIP-712 compatibility and ethers.js verification are required. Prefer it over on-chain EAS when you want to avoid gas costs and block confirmation latency, and over hardware TEE attestations when cryptographic signing suffices. Ideal for audit trails, agent hand-offs, and escrow condition documentation where a signed, timestamped record is the requirement.

## Known failure modes

- Payment failure: x402 settlement rejected — no charge applied, attestation not issued
- Invalid agentId: empty or exceeds 200-character limit returns validation error
- State payload too large: exceeds 8192-character maxLength limit
- Malformed JSON in state field may still be accepted but is hashed as raw UTF-8 string
- Network or signing service unavailability returns 5xx with no charge
- Attempting to use for hardware TEE or zk proofs — this endpoint does not provide those guarantees

## How this service works

Enclave402: x402 pay-per-call gateway on Base. Live Polymarket signals, IPFS pinning, EIP-712 attestations. Receipt-gated settlement, replay protection, no charge on failure.

## Output

Returns a JSON object containing: a Unix millisecond timestamp (ts), the keccak256 hex digest of the submitted state (digest), a fully populated EIP-712 typed-data object (eip712), a verification hint for ethers.verifyTypedData, the attestor wallet address, a hex signature, a unique attestationId, and a settled:true flag confirming the $0.04 USDC x402 micropayment completed. teeQuote and enclaveRpc fields are null (not a hardware TEE attestation).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "state": {
   "type": "string",
   "examples": [
    "{\"task\":\"rebalance\",\"decision\":\"hold\",\"at\":1789650000}"
   ],
   "maxLength": 8192,
   "description": "Serialized state, decision, or payload hash to bind. Hashed with keccak256(utf8); the raw string is never stored."
  },
  "agentId": {
   "type": "string",
   "examples": [
    "agent-0x402-1",
    "did:web:example.com:agents:planner"
   ],
   "maxLength": 200,
   "minLength": 1,
   "description": "Stable identifier or EVM address of the agent being attested."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ts": 1767225600000,
  "digest": "0x3333333333333333333333333333333333333333333333333333333333333333",
  "eip712": {},
  "verify": "ethers.verifyTypedData(...)",
  "settled": true,
  "attestor": "0x2222222222222222222222222222222222222222",
  "teeQuote": null,
  "signature": "0x4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444",
  "enclaveRpc": null,
  "attestation": "SIGNED",
  "teeProvider": null,
  "attestationId": "0x1111111111111111111111111111111111111111111111111111111111111111"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/enclave402-eip-712-agent-state-attestation-89450084/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from enclave402.com](https://www.zero.xyz/host/enclave402.com/llms.txt)
