Skip to content

createSmartAccountClient

Creates a smart account client using the provided configuration. This client handles various Ethereum transactions and message signing operations.

Import

import { createSmartAccountClient } from "@aa-sdk/core";

Usage

import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core";
import { http } from "viem";
import { sepolia } from "viem/chains";
 
const client = createSmartAccountClient({
chain: sepolia,
transport: http("RPC_URL"),
// optionally hoist the account
account: toSmartContractAccount(...),
});

Parameters

config

SmartAccountClientConfig The configuration for creating the smart account client

Returns

SmartAccountClient A smart account client capable of handling transactions, message signing, and other operations on a smart account