CreateSyncStoragePersisterOptions
CreateSyncStoragePersisterOptions:
object
Options for creating a sync storage persister.
Type declaration
deserialize()?
optionaldeserialize: (cachedString) =>SerializableTevmState
How to deserialize the data from storage.
Default
JSON.parse
Parameters
• cachedString: string
Returns
SerializableTevmState
key?
optionalkey:string
The key to use when storing the cache
serialize()?
optionalserialize: (client) =>string
How to serialize the data to storage.
Default
JSON.stringify
Parameters
• client: SerializableTevmState
Returns
string
storage
storage:
Storage
The storage client used for setting and retrieving items from cache.
For SSR pass in undefined. Note that window.localStorage can be
null in Android WebViews depending on how they are configured.
throttleTime?
optionalthrottleTime:number
To avoid spamming, pass a time in ms to throttle saving the cache to disk
Source
CreateSyncStoragePersisterOptions.ts:7