SendUserOperationOptions<T>: {
    calls: Calls<T>;
    chainId: SupportedChainId;
    paymasterUrl?: string;
}

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

    Example

    const calls = [
    {
    to: "0x1234567890123456789012345678901234567890",
    value: parseEther("0.0000005"),
    data: "0x",
    },
    {
    to: "0x1234567890123456789012345678901234567890",
    abi: erc20Abi,
    functionName: "transfer",
    args: [to, amount],
    },
    ]
  • chainId: SupportedChainId

    Chain ID of the network to execute on

  • Optional paymasterUrl?: string

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