POST /decode
Decode a call into its clear-signing view drawn from the mirrored ERC-7730 descriptor. The request body is a DecodeRequest: required chainId (number) and contract (0x 20-byte address), plus either raw calldata (0x-hex with a 4-byte selector) or an EIP-712 typedData payload. An optional selector overrides selector derivation for typedData. Responds 404 if no descriptor matches the derived selector.
POST {API_BASE}/decode
Content-Type: application/json
{
"chainId": 1,
"contract": "0x1111111254eeb25477b68fb85ed929f73a960582",
"calldata": "0x12aa3caf..."
}
The DecodeResponse carries a signing summary (including functionSignature when the descriptor is name-bearing), the visible fields and hiddenFields, a human-readable note, and the raw input echoed back. When the input is raw calldata and a function signature is known, each field is additionally resolved to its ABI-decoded value and type (best-effort — labels-only if a field does not resolve).
{
"signing": {
"chainId": 1,
"contract": "0x1111...",
"selector": "0x12aa3caf",
"kind": "calldata",
"decodedFrom": "calldata",
"contractName": "AggregationRouterV5",
"functionName": "swap",
"functionSignature": "swap(address executor, (address,address,...) desc, bytes data)",
"intent": "Swap tokens",
"interpolatedIntent": "Swap 100 USDC for ETH",
"summary": "Swap 100 USDC for ETH"
},
"fields": [
{
"label": "Amount",
"path": "desc.amount",
"format": "tokenAmount",
"hidden": false,
"value": "100000000",
"type": "uint256"
}
],
"hiddenFields": [],
"note": "Labels and intent come from the ERC-7730 descriptor; argument values are ABI-decoded from the calldata.",
"raw": { "calldata": "0x12aa3caf..." },
"functionSignature": "swap(address executor, (address,address,...) desc, bytes data)"
}