createAccount
Creates an account of a specified type using the provided parameters and configuration. Supports creating LightAccount and MultiOwnerModularAccount types.
Import
import { createAccount } from "@account-kit/core";
Usage
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
);
Parameters
params
CreateAccountParams<TAccount>
The parameters required to create the account, including the type and account parameters
config
AlchemyAccountsConfig
The configuration object for Alchemy accounts
Returns
Promise<SupportedAccounts>
A promise that resolves to the created account object