MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / getKeyDetails

Method getKeyDetails

src/modules/KeyringBase.js:63–78  ·  view source on GitHub ↗
(fingerprint)

Source from the content-addressed store, hash-verified

61 }
62
63 async getKeyDetails(fingerprint) {
64 const details = {};
65 const keys = this.keystore.getKeysForId(fingerprint);
66 if (keys) {
67 const key = keys[0];
68 // subkeys
69 await mapSubKeys(key.subkeys, details, key);
70 // users
71 await mapUsers(key.users, details, this.keystore, key);
72 // key is valid default key
73 details.validDefaultKey = await this.validateDefaultKey(key);
74 return details;
75 } else {
76 throw new Error('Key with this fingerprint not found: ', fingerprint);
77 }
78 }
79
80 /**
81 * Get the following data for all keys: user id, key id, fingerprint, email and name

Callers

nothing calls this directly

Calls 4

validateDefaultKeyMethod · 0.95
mapSubKeysFunction · 0.90
mapUsersFunction · 0.90
getKeysForIdMethod · 0.80

Tested by

no test coverage detected