Skip to content

createMultiOwnerLightAccount

Creates a multi-owner light account using the provided parameters, including transport, chain, signer, initialization code, version, account address, factory address, salt, and owners. Ensures the owners list is deduplicated, ordered, and valid.

Import

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

Usage

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

Parameters

config

CreateMultiOwnerLightAccountParams The parameters for creating a multi-owner light account

Returns

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