{"openapi":"3.1.0","info":{"title":"Pacta on-chain pre-execution checks","version":"0.2.0","description":"Read-only, block-pinned EVM control-plane checks for agents (Ethereum, Base). Pricing mode: free_launch (free, no key)."},"servers":[{"url":"https://pacta-x402.pacta.workers.dev"}],"paths":{"/v1/check/preflight":{"get":{"operationId":"check_preflight","summary":"One-call pre-execution safety check of a contract before an agent interacts with it","description":"One-call pre-execution safety check of a contract before an agent interacts with it: verdict (immutable / timelock / zero-delay timelock / multisig / EOA admin / unclassified / undeployed), 0-100 risk score, proxy + implementation, controller kind, zero-delay upgradeability and pause / blacklist / upgrade capabilities, pinned to a block.","parameters":[{"name":"chain","in":"query","required":false,"description":"EVM chain","schema":{"type":"string","enum":["ethereum","base"],"default":"ethereum"}},{"name":"address","in":"query","required":true,"description":"0x-prefixed 20-byte address (EIP-55 checksum enforced when mixed-case)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"block","in":"query","required":false,"description":"Block to pin: \"latest\" (default), a decimal block number or 0x-hex","schema":{"type":"string","pattern":"^(latest|0x[0-9a-fA-F]{1,14}|0|[1-9][0-9]{0,15})$","default":"latest"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["schema","chain","chainId","address","pinnedBlock","verdict","riskScore","isContract","isProxy","implementation","hasAdminSlot","canUpgradeZeroDelay","capabilities","paused","controller","summary"],"properties":{"schema":{"const":"pacta.preflight_check.v1"},"chain":{"type":"string","enum":["ethereum","base"]},"chainId":{"type":"integer"},"address":{"type":"string"},"pinnedBlock":{"type":"integer"},"pinnedBlockHash":{"type":"string"},"blockTimestamp":{"type":"integer"},"verdict":{"type":"string","enum":["IMMUTABLE_NO_ADMIN","TIMELOCK_PROTECTED","ZERO_DELAY_TIMELOCK_RISK","MULTISIG_NO_TIMELOCK","INSTANT_EOA_ADMIN_RISK","UNDEPLOYED_OR_EOA","UNCLASSIFIED_CONTRACT_CONTROLLER"]},"riskScore":{"type":["integer","null"],"minimum":0,"maximum":100},"isContract":{"type":"boolean"},"isProxy":{"type":"boolean"},"proxyType":{"type":["string","null"],"enum":["eip1967","eip1967_beacon","eip1822",null]},"implementation":{"type":["string","null"]},"beacon":{"type":["string","null"]},"hasAdminSlot":{"type":"boolean"},"canUpgradeZeroDelay":{"type":["boolean","null"]},"capabilities":{"type":"object","properties":{"pause":{"type":"boolean"},"blacklist":{"type":"boolean"},"upgrade":{"type":"boolean"}}},"paused":{"type":["boolean","null"]},"controller":{"type":"object","properties":{"address":{"type":["string","null"]},"kind":{"type":"string","enum":["none","eoa","multisig_safe","timelock","contract","access_control_enumerable","access_control"]},"roleAdminCount":{"type":"integer"},"beacon":{"type":"string"},"proxyAdmin":{"type":"string"},"source":{"type":["string","null"]},"safeThreshold":{"type":["integer","null"]},"timelockDelaySec":{"type":["integer","null"]}}},"summary":{"type":"string"},"activeGovernanceDiscussions":{"type":"array","maxItems":5,"description":"Optional: present only when the address is indexed in the Pacta forum digest (read-only Discourse summary); newest lastPostedAt first","items":{"type":"object","required":["forum","topicId","title","url","lastPostedAt"],"properties":{"forum":{"type":"string"},"topicId":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"},"lastPostedAt":{"type":"string"}}}}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"check_preflight_post","summary":"One-call pre-execution safety check of a contract before an agent interacts with it","description":"One-call pre-execution safety check of a contract before an agent interacts with it: verdict (immutable / timelock / zero-delay timelock / multisig / EOA admin / unclassified / undeployed), 0-100 risk score, proxy + implementation, controller kind, zero-delay upgradeability and pause / blacklist / upgrade capabilities, pinned to a block. Same parameters as a JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["ethereum","base"],"default":"ethereum","description":"EVM chain"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"0x-prefixed 20-byte address (EIP-55 checksum enforced when mixed-case)"},"block":{"type":"string","pattern":"^(latest|0x[0-9a-fA-F]{1,14}|0|[1-9][0-9]{0,15})$","default":"latest","description":"Block to pin: \"latest\" (default), a decimal block number or 0x-hex"}},"required":["address"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["schema","chain","chainId","address","pinnedBlock","verdict","riskScore","isContract","isProxy","implementation","hasAdminSlot","canUpgradeZeroDelay","capabilities","paused","controller","summary"],"properties":{"schema":{"const":"pacta.preflight_check.v1"},"chain":{"type":"string","enum":["ethereum","base"]},"chainId":{"type":"integer"},"address":{"type":"string"},"pinnedBlock":{"type":"integer"},"pinnedBlockHash":{"type":"string"},"blockTimestamp":{"type":"integer"},"verdict":{"type":"string","enum":["IMMUTABLE_NO_ADMIN","TIMELOCK_PROTECTED","ZERO_DELAY_TIMELOCK_RISK","MULTISIG_NO_TIMELOCK","INSTANT_EOA_ADMIN_RISK","UNDEPLOYED_OR_EOA","UNCLASSIFIED_CONTRACT_CONTROLLER"]},"riskScore":{"type":["integer","null"],"minimum":0,"maximum":100},"isContract":{"type":"boolean"},"isProxy":{"type":"boolean"},"proxyType":{"type":["string","null"],"enum":["eip1967","eip1967_beacon","eip1822",null]},"implementation":{"type":["string","null"]},"beacon":{"type":["string","null"]},"hasAdminSlot":{"type":"boolean"},"canUpgradeZeroDelay":{"type":["boolean","null"]},"capabilities":{"type":"object","properties":{"pause":{"type":"boolean"},"blacklist":{"type":"boolean"},"upgrade":{"type":"boolean"}}},"paused":{"type":["boolean","null"]},"controller":{"type":"object","properties":{"address":{"type":["string","null"]},"kind":{"type":"string","enum":["none","eoa","multisig_safe","timelock","contract","access_control_enumerable","access_control"]},"roleAdminCount":{"type":"integer"},"beacon":{"type":"string"},"proxyAdmin":{"type":"string"},"source":{"type":["string","null"]},"safeThreshold":{"type":["integer","null"]},"timelockDelaySec":{"type":["integer","null"]}}},"summary":{"type":"string"},"activeGovernanceDiscussions":{"type":"array","maxItems":5,"description":"Optional: present only when the address is indexed in the Pacta forum digest (read-only Discourse summary); newest lastPostedAt first","items":{"type":"object","required":["forum","topicId","title","url","lastPostedAt"],"properties":{"forum":{"type":"string"},"topicId":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"},"lastPostedAt":{"type":"string"}}}}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scan/control-plane":{"get":{"operationId":"scan_control_plane","summary":"Live control-plane scan of an EVM contract","description":"Live control-plane scan of an EVM contract: EIP-1967 implementation/admin/beacon, owner(), Safe threshold/owners/guard, timelock delay, code size and deterministic risk flags at the latest (or a given) block.","parameters":[{"name":"chain","in":"query","required":false,"description":"EVM chain","schema":{"type":"string","enum":["ethereum","base"],"default":"ethereum"}},{"name":"address","in":"query","required":true,"description":"0x-prefixed 20-byte address (EIP-55 checksum enforced when mixed-case)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"block","in":"query","required":false,"description":"Block to pin: \"latest\" (default), a decimal block number or 0x-hex","schema":{"type":"string","pattern":"^(latest|0x[0-9a-fA-F]{1,14}|0|[1-9][0-9]{0,15})$","default":"latest"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["chain","address","block","codeBytes","eip1967","owner","riskFlags","summary"],"properties":{"chain":{"type":"string"},"address":{"type":"string"},"block":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}},"codeBytes":{"type":"integer"},"eip1967":{"type":"object","properties":{"implementation":{"type":["string","null"]},"admin":{"type":["string","null"]},"beacon":{"type":["string","null"]}}},"owner":{"type":["string","null"]},"safe":{"type":"object"},"proxyAdmin":{"type":"object"},"upgradeAuthority":{"type":["object","null"]},"ownerPrincipal":{"type":["object","null"]},"probedStatus":{"type":"object"},"riskFlags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"scan_control_plane_post","summary":"Live control-plane scan of an EVM contract","description":"Live control-plane scan of an EVM contract: EIP-1967 implementation/admin/beacon, owner(), Safe threshold/owners/guard, timelock delay, code size and deterministic risk flags at the latest (or a given) block. Same parameters as a JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["ethereum","base"],"default":"ethereum","description":"EVM chain"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"0x-prefixed 20-byte address (EIP-55 checksum enforced when mixed-case)"},"block":{"type":"string","pattern":"^(latest|0x[0-9a-fA-F]{1,14}|0|[1-9][0-9]{0,15})$","default":"latest","description":"Block to pin: \"latest\" (default), a decimal block number or 0x-hex"}},"required":["address"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["chain","address","block","codeBytes","eip1967","owner","riskFlags","summary"],"properties":{"chain":{"type":"string"},"address":{"type":"string"},"block":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}},"codeBytes":{"type":"integer"},"eip1967":{"type":"object","properties":{"implementation":{"type":["string","null"]},"admin":{"type":["string","null"]},"beacon":{"type":["string","null"]}}},"owner":{"type":["string","null"]},"safe":{"type":"object"},"proxyAdmin":{"type":"object"},"upgradeAuthority":{"type":["object","null"]},"ownerPrincipal":{"type":["object","null"]},"probedStatus":{"type":"object"},"riskFlags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scan/timelock-op":{"get":{"operationId":"scan_timelock_op","summary":"Live OpenZeppelin TimelockController operation state","description":"Live OpenZeppelin TimelockController operation state: isOperation/Pending/Ready/Done, getTimestamp (ETA), getMinDelay at the latest block.","parameters":[{"name":"chain","in":"query","required":false,"description":"EVM chain","schema":{"type":"string","enum":["ethereum","base"],"default":"ethereum"}},{"name":"timelock","in":"query","required":true,"description":"OpenZeppelin TimelockController address","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"opId","in":"query","required":false,"description":"bytes32 operation id (hashOperation / CallScheduled id); or give target + value + data (+ predecessor + salt)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},{"name":"target","in":"query","required":false,"description":"Scheduled call target (to compute opId)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"value","in":"query","required":false,"description":"Call value in wei (default 0)","schema":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$"}},{"name":"data","in":"query","required":false,"description":"Calldata (default 0x)","schema":{"type":"string","pattern":"^0x([0-9a-fA-F]{2})*$"}},{"name":"predecessor","in":"query","required":false,"description":"bytes32 predecessor (default 0x00..00)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},{"name":"salt","in":"query","required":false,"description":"bytes32 salt (default 0x00..00)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["chain","timelock","opId","block","state","timestamp","status","minDelaySeconds"],"properties":{"chain":{"type":"string"},"timelock":{"type":"string"},"opId":{"type":"string"},"block":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}},"state":{"type":"object","properties":{"isOperation":{"type":["boolean","null"]},"isOperationPending":{"type":["boolean","null"]},"isOperationReady":{"type":["boolean","null"]},"isOperationDone":{"type":["boolean","null"]}}},"timestamp":{"type":"integer"},"etaIso":{"type":["string","null"]},"minDelaySeconds":{"type":"integer"},"status":{"type":"string","enum":["unset","pending","ready","done"]},"secondsUntilReady":{"type":"integer"}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"scan_timelock_op_post","summary":"Live OpenZeppelin TimelockController operation state","description":"Live OpenZeppelin TimelockController operation state: isOperation/Pending/Ready/Done, getTimestamp (ETA), getMinDelay at the latest block. Same parameters as a JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["ethereum","base"],"default":"ethereum","description":"EVM chain"},"timelock":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"OpenZeppelin TimelockController address"},"opId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"bytes32 operation id (hashOperation / CallScheduled id); or give target + value + data (+ predecessor + salt)"},"target":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Scheduled call target (to compute opId)"},"value":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"Call value in wei (default 0)"},"data":{"type":"string","pattern":"^0x([0-9a-fA-F]{2})*$","description":"Calldata (default 0x)"},"predecessor":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"bytes32 predecessor (default 0x00..00)"},"salt":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"bytes32 salt (default 0x00..00)"}},"required":["timelock"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["chain","timelock","opId","block","state","timestamp","status","minDelaySeconds"],"properties":{"chain":{"type":"string"},"timelock":{"type":"string"},"opId":{"type":"string"},"block":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}},"state":{"type":"object","properties":{"isOperation":{"type":["boolean","null"]},"isOperationPending":{"type":["boolean","null"]},"isOperationReady":{"type":["boolean","null"]},"isOperationDone":{"type":["boolean","null"]}}},"timestamp":{"type":"integer"},"etaIso":{"type":["string","null"]},"minDelaySeconds":{"type":"integer"},"status":{"type":"string","enum":["unset","pending","ready","done"]},"secondsUntilReady":{"type":"integer"}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scan/proposal-diff":{"get":{"operationId":"scan_proposal_diff","summary":"Re-runs the pinned contract reads of a Pacta-tracked governance proposal (Aave, Euler, Morpho, Sky) at the live block an","description":"Re-runs the pinned contract reads of a Pacta-tracked governance proposal (Aave, Euler, Morpho, Sky) at the live block and returns pinned-vs-live diffs.","parameters":[{"name":"forum","in":"query","required":true,"description":"Governance forum","schema":{"type":"string","enum":["aave","euler","morpho","sky"]}},{"name":"topicId","in":"query","required":true,"description":"Forum topic id; the proposal must be listed in https://pacta.wtf/api/v1/proposals.json as <forum>-<topicId>","schema":{"type":"string","pattern":"^[1-9][0-9]{0,9}$"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["proposalId","chain","pinnedBlock","liveBlock","reads","summary"],"properties":{"proposalId":{"type":"string"},"forum":{"type":["string","null"]},"topicId":{"type":["integer","null"]},"title":{"type":"string"},"chain":{"type":"string"},"chainId":{"type":"integer"},"pinnedBlock":{"type":"object","properties":{"number":{"type":"integer"},"hash":{"type":"string"},"check":{"type":"string","enum":["canonical","hash_mismatch","block_not_found","ahead_of_live_head"]}}},"liveBlock":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}},"reads":{"type":"array","items":{"type":"object","required":["target","signature","pinned","live","changed"],"properties":{"command":{"type":"string"},"target":{"type":"string"},"signature":{"type":"string"},"args":{"type":"array"},"returns":{"type":"array"},"pinned":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok","reverted","state_unavailable","not_read"]},"raw":{"type":"string"},"decoded":{}}},"live":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok","reverted","state_unavailable","not_read"]},"raw":{"type":"string"},"decoded":{}}},"changed":{"type":["boolean","null"]}}}},"skipped":{"type":"array","items":{"type":"object","properties":{"command":{"type":["string","null"]},"reason":{"type":"string"}}}},"summary":{"type":"object","properties":{"reads":{"type":"integer"},"changed":{"type":"integer"},"unchanged":{"type":"integer"},"unknown":{"type":"integer"},"skipped":{"type":"integer"},"headline":{"type":"string"}}}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"scan_proposal_diff_post","summary":"Re-runs the pinned contract reads of a Pacta-tracked governance proposal (Aave, Euler, Morpho, Sky) at the live block an","description":"Re-runs the pinned contract reads of a Pacta-tracked governance proposal (Aave, Euler, Morpho, Sky) at the live block and returns pinned-vs-live diffs. Same parameters as a JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forum":{"type":"string","enum":["aave","euler","morpho","sky"],"description":"Governance forum"},"topicId":{"type":"string","pattern":"^[1-9][0-9]{0,9}$","description":"Forum topic id; the proposal must be listed in https://pacta.wtf/api/v1/proposals.json as <forum>-<topicId>"}},"required":["forum","topicId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["proposalId","chain","pinnedBlock","liveBlock","reads","summary"],"properties":{"proposalId":{"type":"string"},"forum":{"type":["string","null"]},"topicId":{"type":["integer","null"]},"title":{"type":"string"},"chain":{"type":"string"},"chainId":{"type":"integer"},"pinnedBlock":{"type":"object","properties":{"number":{"type":"integer"},"hash":{"type":"string"},"check":{"type":"string","enum":["canonical","hash_mismatch","block_not_found","ahead_of_live_head"]}}},"liveBlock":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}},"reads":{"type":"array","items":{"type":"object","required":["target","signature","pinned","live","changed"],"properties":{"command":{"type":"string"},"target":{"type":"string"},"signature":{"type":"string"},"args":{"type":"array"},"returns":{"type":"array"},"pinned":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok","reverted","state_unavailable","not_read"]},"raw":{"type":"string"},"decoded":{}}},"live":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok","reverted","state_unavailable","not_read"]},"raw":{"type":"string"},"decoded":{}}},"changed":{"type":["boolean","null"]}}}},"skipped":{"type":"array","items":{"type":"object","properties":{"command":{"type":["string","null"]},"reason":{"type":"string"}}}},"summary":{"type":"object","properties":{"reads":{"type":"integer"},"changed":{"type":"integer"},"unchanged":{"type":"integer"},"unknown":{"type":"integer"},"skipped":{"type":"integer"},"headline":{"type":"string"}}}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/briefs/live-timelocks":{"get":{"operationId":"briefs_live_timelocks","summary":"Live state of the public pending timelock operations tracked in https","description":"Live state of the public pending timelock operations tracked in https://pacta.wtf/api/v1/radar.json, each re-checked at the latest block (getTimestamp, isOperationPending, isOperationDone).","parameters":[{"name":"protocol","in":"query","required":false,"description":"Optional case-insensitive protocol filter (radar.json item protocol)","schema":{"type":"string"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["generatedAt","count","operations"],"properties":{"generatedAt":{"type":"integer"},"count":{"type":"integer"},"truncated":{"type":"boolean"},"radar":{"type":"object"},"skipped":{"type":"array"},"operations":{"type":"array","items":{"type":"object","required":["chain","timelock","opId","live","block"],"properties":{"protocol":{"type":"string"},"title":{"type":"string"},"chain":{"type":"string"},"timelock":{"type":"string"},"opId":{"type":"string"},"feed":{"type":"object"},"live":{"type":"object","properties":{"status":{"type":"string","enum":["unset","pending","ready","done","unprocessable","unknown"]},"timestamp":{"type":["integer","null"]},"etaIso":{"type":["string","null"]},"isOperationPending":{"type":["boolean","null"]},"isOperationDone":{"type":["boolean","null"]},"secondsUntilReady":{"type":"integer"}}},"changedSinceFeed":{"type":["boolean","null"]},"block":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}}}}},"note":{"type":"string"}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"briefs_live_timelocks_post","summary":"Live state of the public pending timelock operations tracked in https","description":"Live state of the public pending timelock operations tracked in https://pacta.wtf/api/v1/radar.json, each re-checked at the latest block (getTimestamp, isOperationPending, isOperationDone). Same parameters as a JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"protocol":{"type":"string","description":"Optional case-insensitive protocol filter (radar.json item protocol)"}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["generatedAt","count","operations"],"properties":{"generatedAt":{"type":"integer"},"count":{"type":"integer"},"truncated":{"type":"boolean"},"radar":{"type":"object"},"skipped":{"type":"array"},"operations":{"type":"array","items":{"type":"object","required":["chain","timelock","opId","live","block"],"properties":{"protocol":{"type":"string"},"title":{"type":"string"},"chain":{"type":"string"},"timelock":{"type":"string"},"opId":{"type":"string"},"feed":{"type":"object"},"live":{"type":"object","properties":{"status":{"type":"string","enum":["unset","pending","ready","done","unprocessable","unknown"]},"timestamp":{"type":["integer","null"]},"etaIso":{"type":["string","null"]},"isOperationPending":{"type":["boolean","null"]},"isOperationDone":{"type":["boolean","null"]},"secondsUntilReady":{"type":"integer"}}},"changedSinceFeed":{"type":["boolean","null"]},"block":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}}}}},"note":{"type":"string"}}}}}},"400":{"description":"Invalid input (with usage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"x402 payment required (only when pricingMode is x402_paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream RPC or feed unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sample/preflight":{"get":{"operationId":"sample_preflight","summary":"Fixed sample preflight response (no RPC)","responses":{"200":{"description":"Sample","content":{"application/json":{"schema":{"type":"object","required":["schema","chain","chainId","address","pinnedBlock","verdict","riskScore","isContract","isProxy","implementation","hasAdminSlot","canUpgradeZeroDelay","capabilities","paused","controller","summary"],"properties":{"schema":{"const":"pacta.preflight_check.v1"},"chain":{"type":"string","enum":["ethereum","base"]},"chainId":{"type":"integer"},"address":{"type":"string"},"pinnedBlock":{"type":"integer"},"pinnedBlockHash":{"type":"string"},"blockTimestamp":{"type":"integer"},"verdict":{"type":"string","enum":["IMMUTABLE_NO_ADMIN","TIMELOCK_PROTECTED","ZERO_DELAY_TIMELOCK_RISK","MULTISIG_NO_TIMELOCK","INSTANT_EOA_ADMIN_RISK","UNDEPLOYED_OR_EOA","UNCLASSIFIED_CONTRACT_CONTROLLER"]},"riskScore":{"type":["integer","null"],"minimum":0,"maximum":100},"isContract":{"type":"boolean"},"isProxy":{"type":"boolean"},"proxyType":{"type":["string","null"],"enum":["eip1967","eip1967_beacon","eip1822",null]},"implementation":{"type":["string","null"]},"beacon":{"type":["string","null"]},"hasAdminSlot":{"type":"boolean"},"canUpgradeZeroDelay":{"type":["boolean","null"]},"capabilities":{"type":"object","properties":{"pause":{"type":"boolean"},"blacklist":{"type":"boolean"},"upgrade":{"type":"boolean"}}},"paused":{"type":["boolean","null"]},"controller":{"type":"object","properties":{"address":{"type":["string","null"]},"kind":{"type":"string","enum":["none","eoa","multisig_safe","timelock","contract","access_control_enumerable","access_control"]},"roleAdminCount":{"type":"integer"},"beacon":{"type":"string"},"proxyAdmin":{"type":"string"},"source":{"type":["string","null"]},"safeThreshold":{"type":["integer","null"]},"timelockDelaySec":{"type":["integer","null"]}}},"summary":{"type":"string"},"activeGovernanceDiscussions":{"type":"array","maxItems":5,"description":"Optional: present only when the address is indexed in the Pacta forum digest (read-only Discourse summary); newest lastPostedAt first","items":{"type":"object","required":["forum","topicId","title","url","lastPostedAt"],"properties":{"forum":{"type":"string"},"topicId":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"},"lastPostedAt":{"type":"string"}}}}}}}}}}}},"/v1/sample/control-plane":{"get":{"operationId":"sample_control_plane","summary":"Live control-plane scan of a fixed public contract","responses":{"200":{"description":"Scan","content":{"application/json":{"schema":{"type":"object","required":["chain","address","block","codeBytes","eip1967","owner","riskFlags","summary"],"properties":{"chain":{"type":"string"},"address":{"type":"string"},"block":{"type":"object","required":["number","hash","timestamp"],"properties":{"number":{"type":"integer"},"hash":{"type":"string"},"timestamp":{"type":"integer"}}},"codeBytes":{"type":"integer"},"eip1967":{"type":"object","properties":{"implementation":{"type":["string","null"]},"admin":{"type":["string","null"]},"beacon":{"type":["string","null"]}}},"owner":{"type":["string","null"]},"safe":{"type":"object"},"proxyAdmin":{"type":"object"},"upgradeAuthority":{"type":["object","null"]},"ownerPrincipal":{"type":["object","null"]},"probedStatus":{"type":"object"},"riskFlags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"}}}}}},"502":{"description":"Upstream unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/telemetry/funnel":{"get":{"operationId":"telemetry_funnel","summary":"Per-isolate, privacy-safe usage counters","responses":{"200":{"description":"Counters","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/telemetry/summary":{"get":{"operationId":"telemetry_summary","summary":"30-day aggregate of observed client metadata (KV-backed when bound); not verified humans, not revenue","responses":{"200":{"description":"Summary (Cache-Control: no-store)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetrySummary"}}}}}}},"/v1/telemetry/beacon":{"post":{"operationId":"telemetry_beacon","summary":"Site analytics beacon (navigator.sendBeacon, text/plain JSON, <= 2048 bytes)","requestBody":{"required":true,"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TelemetryBeacon"}},"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryBeacon"}}}},"responses":{"204":{"description":"Counted (no body, no cookie)"},"400":{"description":"bad_beacon: unknown key, bad value, bad content type or over 2048 bytes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 60 beacons per minute from this caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"operationId":"health","summary":"Service status, pricing mode and prices","responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"detail":{"type":"string"},"usage":{"type":"object"}}},"TelemetrySummary":{"type":"object","required":["schema","generatedAt","pricingMode","scope","kv","totals","actors","crawlers","programmatic","mcp","routes","contracts","cache","latencyMs","callers","beacon","daily","hourly"],"properties":{"schema":{"const":"pacta.telemetry_summary.v1"},"generatedAt":{"type":"string"},"pricingMode":{"type":"string","enum":["free_launch","x402_paid"]},"scope":{"const":"Observed client metadata (User-Agent families, MCP clientInfo, beacon events). Not verified humans, not revenue."},"kv":{"type":"object","required":["bound","lastFlushAt","flushes","flushIntervalSec"],"properties":{"bound":{"type":"boolean"},"lastFlushAt":{"type":["string","null"]},"flushes":{"type":"integer"},"flushIntervalSec":{"type":"integer","minimum":120},"flushErrors":{"type":"integer"},"readOk":{"type":"boolean"}}},"totals":{"type":"object","required":["requests","ok200","rateLimited429"],"properties":{"requests":{"type":"integer","minimum":0},"ok200":{"type":"integer","minimum":0},"rateLimited429":{"type":"integer","minimum":0}}},"actors":{"type":"object","required":["human_browser","ai_search_crawler","mcp_client","programmatic_agent","unknown"],"properties":{"human_browser":{"type":"integer","minimum":0},"ai_search_crawler":{"type":"integer","minimum":0},"mcp_client":{"type":"integer","minimum":0},"programmatic_agent":{"type":"integer","minimum":0},"unknown":{"type":"integer","minimum":0}}},"crawlers":{"type":"object","required":["GPTBot","OAI-SearchBot","ChatGPT-User","ClaudeBot","PerplexityBot","Google-Extended","CCBot"],"properties":{"GPTBot":{"type":"integer","minimum":0},"OAI-SearchBot":{"type":"integer","minimum":0},"ChatGPT-User":{"type":"integer","minimum":0},"ClaudeBot":{"type":"integer","minimum":0},"PerplexityBot":{"type":"integer","minimum":0},"Google-Extended":{"type":"integer","minimum":0},"CCBot":{"type":"integer","minimum":0}}},"programmatic":{"type":"object","required":["x402","viem","ethers","python","node","curl","other"],"properties":{"x402":{"type":"integer","minimum":0},"viem":{"type":"integer","minimum":0},"ethers":{"type":"integer","minimum":0},"python":{"type":"integer","minimum":0},"node":{"type":"integer","minimum":0},"curl":{"type":"integer","minimum":0},"other":{"type":"integer","minimum":0}}},"mcp":{"type":"object","required":["initialize","clients","tools"],"properties":{"initialize":{"type":"integer"},"tools":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256},"clients":{"type":"object","maxProperties":256,"additionalProperties":{"type":"object","properties":{"initialize":{"type":"integer"},"versions":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256}}}}}},"routes":{"type":"object","additionalProperties":{"type":"object","required":["requests","ok200"],"properties":{"requests":{"type":"integer","minimum":0},"ok200":{"type":"integer","minimum":0}}}},"contracts":{"type":"array","maxItems":256,"items":{"type":"object","required":["key","count"],"properties":{"key":{"type":"string"},"count":{"type":"integer"}}}},"cache":{"type":"object","required":["HIT","MISS","BYPASS"],"properties":{"HIT":{"type":"integer","minimum":0},"MISS":{"type":"integer","minimum":0},"BYPASS":{"type":"integer","minimum":0}}},"latencyMs":{"type":"object","required":["lt50","lt250","lt1000","ge1000"],"properties":{"lt50":{"type":"integer","minimum":0},"lt250":{"type":"integer","minimum":0},"lt1000":{"type":"integer","minimum":0},"ge1000":{"type":"integer","minimum":0}}},"callers":{"type":"object","required":["unique","repeat2","repeat10"],"properties":{"unique":{"type":"integer","minimum":0},"repeat2":{"type":"integer","minimum":0},"repeat10":{"type":"integer","minimum":0}}},"beacon":{"type":"object","required":["events","paths","referrers","utm","targets","notFound"],"properties":{"events":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256},"paths":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256},"referrers":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256},"utm":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256},"targets":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256},"notFound":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256}}},"daily":{"type":"object","maxProperties":30,"additionalProperties":{"type":"object","required":["requests","actors","beaconEvents"],"properties":{"requests":{"type":"integer"},"actors":{"type":"object","required":["human_browser","ai_search_crawler","mcp_client","programmatic_agent","unknown"],"properties":{"human_browser":{"type":"integer","minimum":0},"ai_search_crawler":{"type":"integer","minimum":0},"mcp_client":{"type":"integer","minimum":0},"programmatic_agent":{"type":"integer","minimum":0},"unknown":{"type":"integer","minimum":0}}},"beaconEvents":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"maxProperties":256}}}},"hourly":{"type":"array","maxItems":48,"items":{"type":"object","required":["hour","requests"],"properties":{"hour":{"type":"string"},"requests":{"type":"integer"}}}}}},"TelemetryBeacon":{"type":"object","required":["v","e"],"additionalProperties":false,"properties":{"v":{"const":1},"e":{"type":"string","enum":["page_load","scroll_50","scroll_90","copy_mcp_url","copy_curl","copy_skill_md","live_checker_submit","cta_click","protocol_view","not_found_404"]},"p":{"type":"string","pattern":"^/[A-Za-z0-9/_.~%-]{0,119}$","description":"Path without query or hash"},"r":{"type":"string","maxLength":80,"description":"Referrer host (lowercase host only), \"self\", or empty/absent for direct"},"u":{"type":"string","pattern":"^[a-z0-9_.-]{1,40}$","description":"utm_source"},"t":{"type":"string","pattern":"^(?:[a-z0-9-]{1,60}|(?:ethereum|base):0x[0-9a-fA-F]{40})$","description":"Protocol slug or chain:address"}}}}}}