cookieToInitialState

Converts a cookie into an initial state object

Import

1import { cookieToInitialState } from "@account-kit/core";

Parameters

config

AlchemyAccountsConfig the account config containing the client store

string | undefined optional cookie string

Returns

StoredState | undefined the deserialized AlchemyClientState if the cookie exists, otherwise undefined