Class: LocalStore

keyring/localstore~LocalStore(prefix)

new LocalStore(prefix)

The class that deals with storage of the keyring. Currently the only option is to use HTML5 local storage.

Parameters:
Name Type Description
prefix String

prefix for itemnames in localstore

Source:

Methods

(async) loadPrivate() → {Array.<module:key.Key>}

Load the private keys from HTML5 local storage.

Source:
Returns:

array of keys retrieved from localstore

Type
Array.<module:key.Key>

(async) loadPublic() → {Array.<module:key.Key>}

Load the public keys from HTML5 local storage.

Source:
Returns:

array of keys retrieved from localstore

Type
Array.<module:key.Key>

(async) storePrivate(keys)

Saves the current state of the private keys to HTML5 local storage. The key array gets stringified using JSON

Parameters:
Name Type Description
keys Array.<module:key.Key>

array of keys to save in localstore

Source:

(async) storePublic(keys)

Saves the current state of the public keys to HTML5 local storage. The key array gets stringified using JSON

Parameters:
Name Type Description
keys Array.<module:key.Key>

array of keys to save in localstore

Source: