createMultiOwnerModularAccountClient

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.

Examples

1import { createMultiOwnerModularAccountClient } from "@account-kit/smart-contracts";
2import { LocalAccountSigner } from "@aa-sdk/core";
3import { sepolia } from "viem/chains";
4import { http } from "viem";
5import { generatePrivateKey } from "viem/accounts";
6
7const accountClient = await createMultiOwnerModularAccountClient({
8 chain: sepolia,
9 transport: http("RPC_URL"),
10 signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
11});
1import { createMultiOwnerModularAccountClient } from "@account-kit/smart-contracts";
2import { sepolia, alchemy } from "@account-kit/infra";
3import { LocalAccountSigner } from "@aa-sdk/core";
4import { generatePrivateKey } from "viem";
5
6const alchemyAccountClient = await createMultiOwnerModularAccountClient({
7 transport: alchemy({ apiKey: "your-api-key" }),
8 chain: sepolia,
9 signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
10});

Param

The parameters for creating the multi-owner modular account client

Call Signature

1function createMultiOwnerModularAccountClient<TSigner>(
2 params,
3): Promise<
4 AlchemySmartAccountClient<
5 undefined | Chain,
6 MultiOwnerModularAccount<TSigner>,
7 ExecutionActions<
8 MultiOwnerModularAccount<TSigner>,
9 undefined,
10 keyof EntryPointRegistryBase<unknown>
11 > &
12 ManagementActions<
13 MultiOwnerModularAccount<TSigner>,
14 undefined,
15 keyof EntryPointRegistryBase<unknown>
16 > &
17 ReadAndEncodeActions<MultiOwnerModularAccount<TSigner>> &
18 object &
19 object &
20 PluginManagerActions<MultiOwnerModularAccount<TSigner>> &
21 AccountLoupeActions<MultiOwnerModularAccount<TSigner>>
22 >
23>;

Defined in: account-kit/smart-contracts/src/msca/client/client.ts:91

Type Parameters

Type ParameterDefault type

TSigner extends SmartAccountSigner<any>

SmartAccountSigner<any>

Parameters

ParameterType

params

Omit<CreateMultiOwnerModularAccountParams<HttpTransport, TSigner>, "transport"> & Omit<AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>>, "account"> & object

Returns

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>>>>

Call Signature

1function createMultiOwnerModularAccountClient<TTransport, TChain, TSigner>(
2 args,
3): Promise<
4 SmartAccountClient<
5 CustomTransport,
6 Chain,
7 MultiOwnerModularAccount<TSigner>,
8 ExecutionActions<
9 MultiOwnerModularAccount<TSigner>,
10 undefined,
11 keyof EntryPointRegistryBase<unknown>
12 > &
13 ManagementActions<
14 MultiOwnerModularAccount<TSigner>,
15 undefined,
16 keyof EntryPointRegistryBase<unknown>
17 > &
18 ReadAndEncodeActions<MultiOwnerModularAccount<TSigner>> &
19 object &
20 object &
21 PluginManagerActions<MultiOwnerModularAccount<TSigner>> &
22 AccountLoupeActions<MultiOwnerModularAccount<TSigner>>
23 >
24>;

Defined in: account-kit/smart-contracts/src/msca/client/client.ts:107

Type Parameters

Type ParameterDefault type

TTransport extends Transport

Transport

TChain extends undefined | Chain

undefined | Chain

TSigner extends SmartAccountSigner<any>

SmartAccountSigner<any>

Parameters

ParameterType

args

CreateMultiOwnerModularAccountClientParams<TTransport, TChain, TSigner> & NotType<TTransport, AlchemyTransport>

Returns

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>>>>