Skip to content
Alchemy Logo

createAccount

function createAccount<TAccount>(params, config): Promise<SupportedAccounts>;

Defined in: account-kit/core/src/actions/createAccount.ts:78

Creates an account of a specified type using the provided parameters and configuration. Supports creating LightAccount and MultiOwnerModularAccount types.

import { createAccount } from "@account-kit/core";
// see createConfig for more information on how to create a config
import { config } from "./config";
 
const account = createAccount(
  {
    type: "LightAccount",
  },
  config,
);

Type Parameter

TAccount extends SupportedAccountTypes

ParameterTypeDescription

params

CreateAccountParams<TAccount>

The parameters required to create the account, including the type and account parameters

config

AlchemyAccountsConfig

The configuration object for Alchemy accounts

Promise<SupportedAccounts>

A promise that resolves to the created account object

Was this page helpful?