getSigner

1function getSigner<T>(config): null | T;

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

If there is a signer attached to the client state, it will return it. The signer should always be null on the server, and will be set on the client if the store was properly hydrated.

Example

1import { getSigner } from "@account-kit/core";
2import { config } from "./config";
3
4const signer = getSigner(config);

Type Parameters

Type Parameter

T extends any

Parameters

ParameterTypeDescription

config

AlchemyAccountsConfig

The account config which contains the client store

Returns

null | T

the instance of the signer present in the store if it exists, otherwise null