{"uid":"cap_4wbQwUMn1XpZSXloGpBxO","slug":"enclave402-eip-712-agent-state-attestation-89450084","name":"enclave402 EIP-712 Agent State Attestation","description":"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.","url":"https://enclave402.com/api/agent/attest","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wAlm5vhRdpw4vdpTstotk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates a non-repudiable, timestamped EIP-712 cryptographic attestation binding an agent ID and a keccak256 state digest, settled via x402 micropayment on Base","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Audit trail for autonomous trading decision","prompt":"My trading agent 'did:web:example.com:agents:trader' just decided to hold rather than sell — create a timestamped EIP-712 attestation of that decision with state '{\"task\":\"rebalance\",\"decision\":\"hold\",\"portfolio\":\"ETH-USDC\"}' so I have a non-repudiable record if there's a dispute later."},{"title":"Agent hand-off with verifiable state snapshot","prompt":"Before my planner agent 'agent-planner-7' hands off to the executor, I need a cryptographic attestation that the current task state is '{\"phase\":\"planning_complete\",\"subtasks\":[\"fetch\",\"analyze\",\"report\"]}' — stamp it now so the receiving agent can verify it wasn't tampered with."},{"title":"Escrow condition proof for smart contract release","prompt":"I need proof that agent 'agent-0x402-escrow' declared the delivery condition met at this exact moment — attest the state '{\"condition\":\"delivered\",\"orderId\":\"ORD-9921\",\"confirmedBy\":\"agent-0x402-escrow\"}' with an EIP-712 signature so we can use it as evidence to release the escrow funds."}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-18T06:44:16.239Z","isFirstParty":false}