watchSigner

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

Defined in: account-kit/core/src/actions/watchSigner.ts:19

Subscribe to changes of the signer instance on the client store.

Example

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

Parameters

ParameterTypeDescription

config

AlchemyAccountsConfig

the account config containing the client store

Returns

a function which accepts an onChange callback that will be fired when the signer changes and returns a function to unsubscribe from the store

1(onChange): any;

Parameters

ParameterType

onChange

(signer?) => void

Returns

any