simulateUserOperationChanges

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

Import

1import { simulateUserOperationChanges } from "@account-kit/infra";

Usage

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

Parameters

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