Skip to content

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

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

Usage

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

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.