# Interface: PluginLocalStorage

# Table of contents

# Properties

# Methods

# Properties

# keyStore

keyStore: KeyStoreLocalStorage

Manual LocalStorage interface. For advanced use.


# prefix

prefix: string

Prefix with which this plugin instance was created. Keys in the browser's localStorage will be prefixed with this.

# Methods

# changeLocalStorageKey

changeLocalStorageKey(args): Promise<void>

Change the localStorageKey with which the export to LocalStorage is encrypted. Mainly useful if the localStorageKey used is a user password.

# Parameters

Name Type Description
args Object
args.currentLocalStorageKey string The current localStorageKey.
args.newLocalStorageKey string The new localStorageKey
args.userId string The unique ID of the current user inside your app. It will be used to identify this user.

# Returns

Promise<void>


# retrieveIdentity

retrieveIdentity(args): Promise<void>

Retrieve the Seald account previously created with initiateIdentity.

# Parameters

Name Type Description
args Object
args.localStorageKey string The key securing this user's identity. Can be a user password or stored by your app's server.
args.userId string The unique ID of the current user inside your app. It will be used to identify this user.

# Returns

Promise<void>


# saveIdentity

saveIdentity(args): Promise<void>

Save the Seald account to LocalStorage.

# Parameters

Name Type Description
args Object
args.localStorageKey string The key securing this user's identity. Can be a user password or stored by your app's server.
args.userId string The unique ID of the current user inside your app. It will be used to identify this user.

# Returns

Promise<void>