Skip to content

getAccount

Retrieves the account of the specified type from the client store based on the provided configuration.

Import

import { getAccount } from "@account-kit/core";

Usage

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

Parameters

params

GetAccountParams<TAccount> The parameters containing the type of the account to retrieve

config

AlchemyAccountsConfig The configuration containing the client store

Returns

GetAccountResult<TAccount> The result which includes the account if found and its status