createSMAV2AccountClient
Creates a SMAv2 account client using the provided configuration parameters.
Import
import { createSMAV2AccountClient } from "@account-kit/smart-contracts";
Usage
import { http } from "viem";
import { createSMAV2AccountClient } from "@account-kit/smart-contracts";
import { LocalAccountSigner } from "@aa-sdk/core";
import { sepolia } from "@account-kit/infra";
const MNEMONIC = "...";
const RPC_URL = "...";
const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC);
const chain = sepolia;
const transport = http(RPC_URL);
const SMAV2SignerAccountClient = await createSMAV2AccountClient({
chain,
signer,
transport,
});
Parameters
config
CreateSMAV2AccountClientParams
The configuration parameters required to create the MAv2 account client
Returns
Promise<SmartAccountClient>
A promise that resolves to a SmartAccountClient
instance