function watchSmartAccountClient<TAccount, TChain>(
params,
config,
): (onChange) => any;Defined in: account-kit/core/src/actions/watchSmartAccountClient.ts:33
Watches for changes to the smart account client and triggers the provided callback when a change is detected.
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);| Type Parameter | Default type | Description |
|---|---|---|
| ‐ | extends SupportedAccountTypes |
|
| extends Chain | undefined = Chain | undefined |
| Parameter | Type | Description |
|---|---|---|
|
| the parameters needed to get the smart account client |
|
| the configuration containing the client store and other settings |
a function that accepts a callback to be called when the client changes and returns a function to unsubscribe from the store
(onChange): any;| Parameter | Type |
|---|---|
| ( |
any