createMultisigModularAccountClient

Creates a multisig modular account client using the provided parameters including account details, transport, chain, and additional client configuration. This function constructs the multisig modular account and extends it with various actions to create a comprehensive client.

Import

1import { createMultisigModularAccountClient } from "@account-kit/smart-contracts";

Usage

1import { createMultisigModularAccountClient } from "@account-kit/smart-contracts";
2import { LocalAccountSigner } from "@aa-sdk/core";
3import { sepolia } from "viem/chains";
4import { http } from "viem";
5import { generatePrivateKey } from "viem/accounts";
6
7const accountClient = await createMultisigModularAccountClient({
8 chain: sepolia,
9 transport: http("RPC_URL"),
10 signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
11 owners: [], // other owners on the account
12 threshold: 2, // 2 of N signatures
13});

Parameters

config

CreateMultisigModularAccountClientParams the parameters for configuring the multisig modular account client

Returns

Promise<SmartAccountClient<Transport, Chain, MultisigModularAccount<SmartAccountSigner>, {}, SmartAccountClientRpcSchema, MultisigUserOperationContext>> a promise that resolves to a SmartAccountClient object extended with the multisig modular account and additional actions