SmartWallet: {
    address: Address;
    owners: Signer[];
    sendUserOperation: (<T>(options) => Promise<SendUserOperationReturnType>);
    type: "smart";
    useNetwork: ((options) => NetworkScopedSmartWallet);
}

Represents a SmartWallet with user operation capabilities

Type declaration

  • address: Address

    The smart wallet's address

  • owners: Signer[]

    Array of signers that own the wallet (currently only supports one owner)

  • sendUserOperation: (<T>(options) => Promise<SendUserOperationReturnType>)

    Sends a user operation to the network

    Returns

    The result of the user operation

    Example

    import { sendUserOperation } from "@coinbase/coinbase-sdk";
    import { parseEther } from "viem";

    const result = await sendUserOperation(wallet, {
    calls: [
    {
    to: "0x1234567890123456789012345678901234567890",
    abi: erc20Abi,
    functionName: "transfer",
    args: [to, amount],
    },
    {
    to: "0x1234567890123456789012345678901234567890",
    data: "0x",
    value: parseEther("0.0000005"),
    },
    ],
    chainId: 1,
    paymasterUrl: "https://api.developer.coinbase.com/rpc/v1/base/someapikey",
    });
  • type: "smart"

    Identifier for the wallet type

  • useNetwork: ((options) => NetworkScopedSmartWallet)

    Configures the wallet for a specific network