@account-kit/infra
Version:
adapters for @aa-sdk/core for interacting with alchemy services
20 lines • 756 B
JavaScript
import {} from "@aa-sdk/core";
/**
* 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
* ```ts
* import { isAlchemySmartAccountClient } from "@account-kit/infra";
*
* if (isAlchemySmartAccountClient(client)) {
* // do things with the client as an Alchemy Smart Account Client
* }
* ```
*
* @param {Client<TTransport, TChain, TAccount>} client The client instance to be checked
* @returns {boolean} `true` if the client is an Alchemy Smart Account Client, otherwise `false`
*/
export function isAlchemySmartAccountClient(client) {
return client.transport.type === "alchemy";
}
//# sourceMappingURL=isAlchemySmartAccountClient.js.map