Skip to content
docs

PreviewInput

Defined in: index.ts:33

What to preview: the calls (approvals first), who sends them, on which chain, and which addresses and contracts the app already knows.

calls: PreviewCall[]

Defined in: index.ts:37

Executed in order in one simulated block (approve first, then the call).


chainId: number

Defined in: index.ts:34


optional expectedApproval?: bigint

Defined in: index.ts:46

Amount the flow needs approved (base units); larger approvals are flagged.


optional expectedRecipient?: string

Defined in: index.ts:44

Where the funds are meant to arrive (a swap’s destination address).


from: string

Defined in: index.ts:35


optional known?: Record<string, string>

Defined in: index.ts:42

Known contracts: address → label (e.g. a provider’s trusted targets).


optional native?: object

Defined in: index.ts:48

Native coin symbol and decimals for balance changes (default ETH / 18).

decimals: number

symbol: string


own: string[]

Defined in: index.ts:40

Addresses that are “you” (all of the user’s accounts, lower or mixed case).


rpc: Rpc

Defined in: index.ts:38


optional stateOverrides?: Record<string, { balance?: bigint; code?: string; nonce?: number; stateDiff?: Record<string, string>; }>

Defined in: index.ts:55

State overrides applied to the simulated block (eth_simulateV1 stateOverrides, eth_call’s third parameter): e.g. fund the sender with a native balance or an ERC-20 balance via stateDiff on the token’s balance slot, to prove a flow a not-yet-funded account will sign.