Skip to main content

bn.setStorage

setStorage(options): Promise<void>

description To store data in the local cache key In. Will overwrite the original key The corresponding content. Data is always available unless the user actively deletes it or the system cleans it for storage reasons. single key The maximum length of data allowed to be stored is 1 MB, all data storage capped at 10MB.

example

bn.setStorage({  key:"key",  data:"value"})

Parameters

NameType
optionsSetStorageOptions

Returns

Promise<void>


Interface: SetStorageOptions#

NameTypeDescription
keystringSpecified in the local cache key
dataunknownKey corresponds to the content