isAlchemySmartAccountClient

1function isAlchemySmartAccountClient<TChain, TAccount>(
2 client,
3): 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.

Example

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

Type Parameters

Type ParameterDefault type

TChain extends undefined | Chain

undefined | Chain

TAccount extends undefined | SmartContractAccount

undefined | SmartContractAccount

Parameters

ParameterTypeDescription

client

Client<Transport, TChain, TAccount>

The client instance to be checked

Returns

client is AlchemySmartAccountClient<TChain, TAccount>

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