cookieToInitialState

1function cookieToInitialState(config, cookie?): undefined | StoredState;

Defined in: account-kit/core/src/utils/cookies.ts:76

Converts a cookie into an initial state object

Parameters

ParameterTypeDescription

config

AlchemyAccountsConfig

the account config containing the client store

cookie?

string

optional cookie string

Returns

undefined | StoredState

the deserialized AlchemyClientState if the cookie exists, otherwise undefined