createSmartAccountClient

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

Import

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

Usage

1import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core";
2import { http } from "viem";
3import { sepolia } from "viem/chains";
4
5const client = createSmartAccountClient({
6chain: sepolia,
7transport: http("RPC_URL"),
8// optionally hoist the account
9account: toSmartContractAccount(...),
10});

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