Skip to content

getMAInitializationData

Retrieves the initialization data for a multi-owner modular account. Throws an error if the client's chain is not found or if the multi-owner plugin address is not retrievable.

Import

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

Usage

import { getMAInitializationData } from "@account-kit/smart-contracts";
import { createSmartAccountClient } from "@aa-sdk/core";
 
const client = createSmartAccountClient(...);
const initializationData = await getMAInitializationData({
client,
signerAddress: "0x...", // or array of signers
});

Parameters

params

GetMAInitializationDataParams<TTransport, TChain, TAccount> the parameters for getting initialization data

params.client

SmartAccountClient<TTransport, TChain, TAccount> the smart account client

params.signerAddress

Address | Address[] the address of the signer or an array of signer addresses

params.multiOwnerPluginAddress

Address optional address of the multi-owner plugin

Returns

Promise<UpgradeToData> a promise that resolves to the initialization data required for upgrading to a multi-owner modular account