()
| 23 | */ |
| 24 | class KeyringAttrMap extends Map { |
| 25 | async init() { |
| 26 | const attributes = await mvelo.storage.get('mvelo.keyring.attributes') || {}; |
| 27 | Object.keys(attributes).forEach(key => super.set(key, attributes[key])); |
| 28 | if (!this.has(MAIN_KEYRING_ID)) { |
| 29 | await this.create(MAIN_KEYRING_ID); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | async initGPG() { |
| 34 | const hasGpgKeyring = this.has(GNUPG_KEYRING_ID); |