watchSignerStatus

1function watchSignerStatus(config): (onChange) => any;

Defined in: account-kit/core/src/actions/watchSignerStatus.ts:20

Watches the signer status in the client store and triggers the provided callback function when the status changes.

Example

1import { watchSignerStatus } from "@account-kit/core";
2// see createConfig for more information on how to create a config
3import { config } from "./config";
4
5watchSignerStatus(config)(console.log);

Parameters

ParameterTypeDescription

config

AlchemyAccountsConfig

The configuration object containing the client store

Returns

A function that accepts a callback to be called when the signer status changes which returns a function to unsubscribe from the store

1(onChange): any;

Parameters

ParameterType

onChange

(status) => void

Returns

any