createMultisigModularAccount

Creates a multisig modular account using the provided parameters, including transport, chain, signer, account address, and other account settings. It configures the account with multiple owners and the specified threshold.

Import

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

Usage

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

Parameters

config

CreateMultisigModularAccountParams The parameters for creating a multisig modular account.

Returns

Promise<MultisigModularAccount> A promise that resolves to a MultisigModularAccount object containing the created account information and methods.