SendUserOperationOptions: {
    calls: Calls<T>;
    idempotencyKey?: string;
    network: EvmUserOperationNetwork;
    paymasterUrl?: string;
    smartAccount: EvmSmartAccount;
}

Options for sending a user operation.

Type Parameters

  • T extends readonly unknown[]

    Array type for the calls parameter.

Type declaration

  • calls: Calls<T>

    Array of contract calls to execute in the user operation. Each call can either be:

    • A direct call with to, value, and data.
    • A contract call with to, abi, functionName, and args.
    const calls = [
    {
    to: "0x1234567890123456789012345678901234567890",
    value: parseEther("0.0000005"),
    data: "0x",
    },
    {
    to: "0x1234567890123456789012345678901234567890",
    abi: erc20Abi,
    functionName: "transfer",
    args: [to, amount],
    },
    ]
  • OptionalidempotencyKey?: string

    The idempotency key.

  • network: EvmUserOperationNetwork

    Chain ID of the network to execute on.

  • OptionalpaymasterUrl?: string

    Optional URL of the paymaster service to use for gas sponsorship. Must be ERC-7677 compliant.

  • smartAccount: EvmSmartAccount

    The smart account.