Skip to content

createMultiOwnerModularAccount

Creates a multi-owner modular account with the given parameters, including transport, chain, signer, account address, initialization code, entry point, factory address, owners, and salt. Ensures that the owners are unique, ordered, and non-zero.

Import

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

Usage

import { createMultiOwnerModularAccount } from "@account-kit/smart-contracts";
import { LocalAccountSigner } from "@aa-sdk/core";
import { sepolia } from "viem/chains";
import { http, generatePrivateKey } from "viem";
 
const account = await createMultiOwnerModularAccount({
  chain: sepolia,
  transport: http("RPC_URL"),
  signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
});

Parameters

config

CreateMultiOwnerModularAccountParams Configuration parameters for creating a multi-owner modular account

Returns

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