simulateUserOperationChanges

1const simulateUserOperationChanges: <TChain, TAccount>(
2 client,
3 args,
4) => Promise<SimulateUserOperationAssetChangesResponse>;

Defined in: account-kit/infra/src/actions/simulateUserOperationChanges.ts:30

Simulates user operation changes including asset changes for a specified user operation and returns the resulting state changes.

Example

1import { simulateUserOperationChanges, createAlchemyPublicRpcClient } from "@account-kit/infra";
2
3const client = createAlchemyPublicRpcClient(...);
4const response = await simulateUserOperationChanges(client, {
5 uo: ...
6});

Type Parameters

Type ParameterDefault type

TChain extends Chain | undefined

Chain | undefined

TAccount extends SmartContractAccount | undefined

SmartContractAccount | undefined

Parameters

ParameterTypeDescription

client

Client<Transport, TChain, TAccount, AlchemyRpcSchema>

The client instance used to send the simulation request

args

SendUserOperationParameters<TAccount>

The parameters of the user operation including the account and other overrides

Returns

Promise<SimulateUserOperationAssetChangesResponse>

A promise that resolves to the response of the simulation showing the asset changes