Skip to content
Alchemy Logo

watchSigner

function 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.

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

ParameterTypeDescription

config

AlchemyAccountsConfig

the account config containing the client store

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

(onChange): any;

ParameterType

onChange

(signer?) => void

any

Was this page helpful?