* Encrypts and stores data in the browser using IndexedDB.
*/
export class Database {
- static DB_NAME = 'libnemo'
- static DB_STORES = ['Wallet', 'Account', 'Rolodex']
static #storage: IDBDatabase
+ /**
+ * @returns {'libnemo'}
+ */
+ static get DB_NAME (): 'libnemo' { return 'libnemo' }
+ /**
+ * @returns {['Wallet', 'Account', 'Rolodex']}
+ */
+ static get DB_STORES (): ['Wallet', 'Account', 'Rolodex'] { return ['Wallet', 'Account', 'Rolodex'] }
/**
* Inserts records in a datastore, throwing if they already exist.
* saved under one nickname.
*/
export class Rolodex {
+ /**
+ * @returns {'Rolodex'}
+ */
static get DB_NAME (): 'Rolodex' { return 'Rolodex' }
+
/**
* Adds an address to the rolodex under a specific nickname.
*
* three types of wallets are supported: BIP-44, BLAKE2b, and Ledger.\r
*/\r
export class Wallet {\r
+ /**\r
+ * @returns {'Wallet'}\r
+ */\r
static get DB_NAME (): 'Wallet' { return 'Wallet' }\r
\r
/**\r