Skip to content
Alchemy Logo

createSmartWalletClient

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

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

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

import { LocalAccountSigner } from "@aa-sdk/core";
import { alchemy, arbitrumSepolia } from "@account-kit/infra";
import { generatePrivateKey } from "viem/accounts";
import { createSmartWalletClient } from "@account-kit/wallet-client";
 
const signer =
  LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());
const transport = alchemy({
  apiKey: "your-alchemy-api-key",
});
const client = createSmartWalletClient({
  transport,
  chain: arbitrumSepolia,
  signer,
});

Type ParameterDefault type

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

undefined

ParameterTypeDescription

params

SmartWalletClientParams<TAccount>

The parameters for creating the smart wallet client

SmartWalletClient<TAccount>

  • A viem-compatible client
Was this page helpful?