Skip to content

cookieToInitialState

Converts a cookie into an initial state object

Import

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

Parameters

config

AlchemyAccountsConfig the account config containing the client store

cookie

string | undefined optional cookie string

Returns

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