Skip to content
Alchemy Logo

createMultiOwnerLightAccountClient

Creates a multi-owner light account client using the provided parameters. It first creates a multi-owner light account and then creates a smart account client with the provided configurations.

import { createMultiOwnerLightAccountClient } from "@account-kit/smart-contracts";
import { LocalAccountSigner } from "@aa-sdk/core";
import { sepolia } from "viem/chains";
import { http, generatePrivateKey } from "viem";
 
const account = await createMultiOwnerLightAccountClient({
  chain: sepolia,
  transport: http("RPC_URL"),
  signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
});
import { createMultiOwnerLightAccountClient } from "@account-kit/smart-contracts";
import { sepolia, alchemy } from "@account-kit/infra";
import { LocalAccountSigner } from "@aa-sdk/core";
import { generatePrivateKey } from "viem"
 
const lightAccountClient = await createMultiOwnerLightAccountClient({
 transport: alchemy({
   apiKey: "your-api-key",
 }),
 chain: sepolia
 signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
});

the configuration for creating the multi-owner light / alchemy account client with the provided parameters transport

function createMultiOwnerLightAccountClient<TSigner>(
  params,
): Promise<
  AlchemySmartAccountClient<
    undefined | Chain,
    MultiOwnerLightAccount<TSigner>,
    MultiOwnerLightAccountClientActions<TSigner>
  >
>;

Defined in: account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts:55

Type ParameterDefault type

TSigner extends SmartAccountSigner<any>

SmartAccountSigner<any>

ParameterType

params

Omit<CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>, "type" | "transport"> & Omit<AlchemySmartAccountClientConfig<Chain, MultiOwnerLightAccount<TSigner>>, "account"> & object

Promise<AlchemySmartAccountClient<undefined | Chain, MultiOwnerLightAccount<TSigner>, MultiOwnerLightAccountClientActions<TSigner>>>

function createMultiOwnerLightAccountClient<TTransport, TChain, TSigner>(
  args,
): Promise<
  SmartAccountClient<
    CustomTransport,
    Chain,
    MultiOwnerLightAccount<TSigner>,
    SmartAccountClientActions<Chain, SmartContractAccount> &
      MultiOwnerLightAccountClientActions<
        TSigner,
        MultiOwnerLightAccount<TSigner>
      >
  >
>;

Defined in: account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts:69

Type ParameterDefault type

TTransport extends Transport

Transport

TChain extends undefined | Chain

undefined | Chain

TSigner extends SmartAccountSigner<any>

SmartAccountSigner<any>

ParameterType

args

object & Omit<CreateMultiOwnerLightAccountParams<TTransport, TSigner>, "chain" | "transport"> & Omit<{ }, "account" | "chain" | "transport"> & NotType<TTransport, AlchemyTransport>

Promise<SmartAccountClient<CustomTransport, Chain, MultiOwnerLightAccount<TSigner>, SmartAccountClientActions<Chain, SmartContractAccount> & MultiOwnerLightAccountClientActions<TSigner, MultiOwnerLightAccount<TSigner>>>>

Was this page helpful?