audit
InvokeAudit an EVM wallet for unlimited / stale / risky token approvals and return revoke calldata.
Input Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"wallet": {
"type": "string",
"description": "Owner wallet address to audit (0x…)"
},
"chains": {
"description": "Chain ids to scan. Default [1] (Ethereum mainnet). Multi-chain requires ETHERSCAN_API_KEY.",
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"mode": {
"description": "Data source: 'logs' (no API key needed) or 'etherscan' (full history, needs key).",
"type": "string",
"enum": [
"logs",
"etherscan"
]
}
},
"required": [
"wallet"
],
"additionalProperties": false
}
Output Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"chain_id": {
"type": "number"
},
"wallet": {
"type": "string"
},
"mode": {
"type": "string"
},
"summary": {
"type": "object",
"properties": {
"total_approvals": {
"type": "number"
},
"unlimited_count": {
"type": "number"
},
"stale_count": {
"type": "number"
},
"high_severity_count": {
"type": "number"
}
},
"required": [
"total_approvals",
"unlimited_count",
"stale_count",
"high_severity_count"
],
"additionalProperties": false
},
"approvals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"token_symbol": {
"type": "string"
},
"token_decimals": {
"type": "number"
},
"owner": {
"type": "string"
},
"spender": {
"type": "string"
},
"raw_value": {
"type": "string"
},
"value": {
"type": "string"
},
"unlimited": {
"type": "boolean"
},
"last_approved_at": {
"type": [
"number",
"null"
]
},
"source": {
"type": "string"
}
},
"required": [
"token",
"token_symbol",
"token_decimals",
"owner",
"spender",
"raw_value",
"value",
"unlimited",
"source"
],
"additionalProperties": false
}
},
"risk_flags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"approval_index": {
"type": "number"
},
"token": {
"type": "string"
},
"token_symbol": {
"type": "string"
},
"spender": {
"type": "string"
},
"risk": {
"type": "string"
},
"detail": {
"type": "string"
},
"severity": {
"type": "string"
}
},
"required": [
"approval_index",
"token",
"token_symbol",
"spender",
"risk",
"detail",
"severity"
],
"additionalProperties": false
}
},
"revoke_tx_data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"spender": {
"type": "string"
},
"to": {
"type": "string"
},
"data": {
"type": "string"
},
"human_readable": {
"type": "string"
}
},
"required": [
"token",
"spender",
"to",
"data",
"human_readable"
],
"additionalProperties": false
}
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"chain_id",
"wallet",
"mode",
"summary",
"approvals",
"risk_flags",
"revoke_tx_data",
"notes"
],
"additionalProperties": false
}
Invoke with curl
curl -s -X POST \
'http://agentauditor.highkingflower.com/entrypoints/audit/invoke' \
-H 'Content-Type: application/json' \
-d '
{
"input": {
"wallet": "<Owner wallet address to audit (0x…)>"
}
}
'