import type { Chain } from "viem"; import type { AlchemyAccountsConfig, SupportedAccount, SupportedAccountTypes } from "../types"; import { type GetSmartAccountClientParams, type GetSmartAccountClientResult } from "./getSmartAccountClient.js"; /** * Watches for changes to the smart account client and triggers the provided callback when a change is detected. * * @example * ```ts * import { watchSmartAccountClient } from "@account-kit/core"; * // see createConfig for more information on how to create a config * import { config } from "./config"; * * watchSmartAccountClient({ type: "LightAccount" }, config)(console.log); * ``` * * @template TAccount extends SupportedAccountTypes * @template TTransport extends Transport = Transport * @template TChain extends Chain | undefined = Chain | undefined * * @param {GetSmartAccountClientParams} params the parameters needed to get the smart account client * @param {AlchemyAccountsConfig} config the configuration containing the client store and other settings * @returns {(onChange: (client: GetSmartAccountClientResult>) => void) => (() => void)} a function that accepts a callback to be called when the client changes and returns a function to unsubscribe from the store */ export declare function watchSmartAccountClient(params: GetSmartAccountClientParams, config: AlchemyAccountsConfig): (onChange: (client: GetSmartAccountClientResult>) => void) => () => void;