/** * Result of decoding EVM transaction calldata. * * Uses Sourcify 4byte signature lookup and viem ABI decoding. * `functionName` and `params` are populated so the LLM can generate the intent. */ export interface DecodedCalldata { /** The function name. */ functionName: string | undefined; /** ABI-decoded parameters. Empty if the function doesn't * have params, is unknown or decoding fails. */ params: DecodedParam[]; } /** * A single ABI-decoded parameter from the transaction calldata. */ export interface DecodedParam { /** Parameter name from the ABI signature. */ name: string; /** The Solidity type. */ type: string; /** The parameter value. */ value: string; } /** * Response from the Sourcify 4byte signature database API. */ export interface SourcifySignatureResponse { ok: boolean; result: { function: Record; }; }