watchSmartAccountClient
Watches for changes to the smart account client and triggers the provided callback when a change is detected.
Import
Usage
Parameters
params
GetSmartAccountClientParams<TChain, TAccount>
the parameters needed to get the smart account client
config
AlchemyAccountsConfig
the configuration containing the client store and other settings
Returns
(onChange: (client: GetSmartAccountClientResult<TChain, SupportedAccount<TAccount>>) => void) => (() => void)
a function that accepts a callback to be called when the client changes and returns a function to unsubscribe from the store