Skip to content

useSmartAccountClient

Uses the provided smart account client parameters to create or retrieve an existing smart account client, handling different types of accounts including LightAccount, MultiOwnerLightAccount, and MultiOwnerModularAccount.

Import

import { useSmartAccountClient } from "@account-kit/react";

Usage

import { useSmartAccountClient } from "@account-kit/react";
 
const { client, address, isLoadingClient } = useSmartAccountClient({
type: "LightAccount",
accountParams: {...}, // optional params to further configure the account
});

Parameters

props

UseSmartAccountClientProps The properties required to use the smart account client, including account parameters, type, and additional client parameters.

Returns

UseSmartAccountClientResult An object containing the smart account client, the address, and a loading state.