Skip to content
Alchemy Logo

isAlchemySmartAccountClient

function isAlchemySmartAccountClient<TChain, TAccount>(
  client,
): client is AlchemySmartAccountClient<TChain, TAccount>;

Defined in: account-kit/infra/src/client/isAlchemySmartAccountClient.ts:20

Checks if a given client is an Alchemy Smart Account Client. The goal of this check is to ensure that the client supports certain RPC methods.

import { isAlchemySmartAccountClient } from "@account-kit/infra";
 
if (isAlchemySmartAccountClient(client)) {
  // do things with the client as an Alchemy Smart Account Client
}

Type ParameterDefault type

TChain extends undefined | Chain

undefined | Chain

TAccount extends undefined | SmartContractAccount

undefined | SmartContractAccount

ParameterTypeDescription

client

Client<Transport, TChain, TAccount>

The client instance to be checked

client is AlchemySmartAccountClient<TChain, TAccount>

true if the client is an Alchemy Smart Account Client, otherwise false

Was this page helpful?