Creates a multi-owner modular account client with the provided parameters including account, transport, chain, and additional client configuration. This function uses a modular account and extends it with various plugin actions.
import { createMultiOwnerModularAccountClient } from "@account-kit/smart-contracts";
import { LocalAccountSigner } from "@aa-sdk/core";
import { sepolia } from "viem/chains";
import { http } from "viem";
import { generatePrivateKey } from "viem/accounts";
const accountClient = await createMultiOwnerModularAccountClient({
chain: sepolia,
transport: http("RPC_URL"),
signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
});import { createMultiOwnerModularAccountClient } from "@account-kit/smart-contracts";
import { sepolia, alchemy } from "@account-kit/infra";
import { LocalAccountSigner } from "@aa-sdk/core";
import { generatePrivateKey } from "viem";
const alchemyAccountClient = await createMultiOwnerModularAccountClient({
transport: alchemy({ apiKey: "your-api-key" }),
chain: sepolia,
signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
});The parameters for creating the multi-owner modular account client
function createMultiOwnerModularAccountClient<TSigner>(
params,
): Promise<
AlchemySmartAccountClient<
undefined | Chain,
MultiOwnerModularAccount<TSigner>,
ExecutionActions<
MultiOwnerModularAccount<TSigner>,
undefined,
keyof EntryPointRegistryBase<unknown>
> &
ManagementActions<
MultiOwnerModularAccount<TSigner>,
undefined,
keyof EntryPointRegistryBase<unknown>
> &
ReadAndEncodeActions<MultiOwnerModularAccount<TSigner>> &
object &
object &
PluginManagerActions<MultiOwnerModularAccount<TSigner>> &
AccountLoupeActions<MultiOwnerModularAccount<TSigner>>
>
>;Defined in: account-kit/smart-contracts/src/msca/client/client.ts:91
| Type Parameter | Default type |
|---|---|
|
|
| Parameter | Type |
|---|---|
|
|
Promise<AlchemySmartAccountClient<undefined | Chain, MultiOwnerModularAccount<TSigner>, ExecutionActions<MultiOwnerModularAccount<TSigner>, undefined, keyof EntryPointRegistryBase<unknown>> & ManagementActions<MultiOwnerModularAccount<TSigner>, undefined, keyof EntryPointRegistryBase<unknown>> & ReadAndEncodeActions<MultiOwnerModularAccount<TSigner>> & object & object & PluginManagerActions<MultiOwnerModularAccount<TSigner>> & AccountLoupeActions<MultiOwnerModularAccount<TSigner>>>>
function createMultiOwnerModularAccountClient<TTransport, TChain, TSigner>(
args,
): Promise<
SmartAccountClient<
CustomTransport,
Chain,
MultiOwnerModularAccount<TSigner>,
ExecutionActions<
MultiOwnerModularAccount<TSigner>,
undefined,
keyof EntryPointRegistryBase<unknown>
> &
ManagementActions<
MultiOwnerModularAccount<TSigner>,
undefined,
keyof EntryPointRegistryBase<unknown>
> &
ReadAndEncodeActions<MultiOwnerModularAccount<TSigner>> &
object &
object &
PluginManagerActions<MultiOwnerModularAccount<TSigner>> &
AccountLoupeActions<MultiOwnerModularAccount<TSigner>>
>
>;Defined in: account-kit/smart-contracts/src/msca/client/client.ts:107
| Type Parameter | Default type |
|---|---|
| |
|
|
|
|
| Parameter | Type |
|---|---|
|
|
Promise<SmartAccountClient<CustomTransport, Chain, MultiOwnerModularAccount<TSigner>, ExecutionActions<MultiOwnerModularAccount<TSigner>, undefined, keyof EntryPointRegistryBase<unknown>> & ManagementActions<MultiOwnerModularAccount<TSigner>, undefined, keyof EntryPointRegistryBase<unknown>> & ReadAndEncodeActions<MultiOwnerModularAccount<TSigner>> & object & object & PluginManagerActions<MultiOwnerModularAccount<TSigner>> & AccountLoupeActions<MultiOwnerModularAccount<TSigner>>>>