createSmartWalletClient

1function createSmartWalletClient<TAccount>(params): SmartWalletClient<TAccount>;

Defined in: account-kit/wallet-client/src/client/index.ts:67

Creates a smart wallet client that can be used to interact with a smart account.

Example

1import { LocalAccountSigner } from "@aa-sdk/core";
2import { alchemy, arbitrumSepolia } from "@account-kit/infra";
3import { generatePrivateKey } from "viem/accounts";
4import { createSmartWalletClient } from "@account-kit/wallet-client";
5
6const signer =
7 LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());
8const transport = alchemy({
9 apiKey: "your-alchemy-api-key",
10});
11const client = createSmartWalletClient({
12 transport,
13 chain: arbitrumSepolia,
14 signer,
15});

Type Parameters

Type ParameterDefault type

TAccount extends undefined | `0x${string}`

undefined

Parameters

ParameterTypeDescription

params

SmartWalletClientParams<TAccount>

The parameters for creating the smart wallet client

Returns

SmartWalletClient<TAccount>

  • A viem-compatible client