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

Method queryValidKey

src/controller/api.controller.js:49–70  ·  view source on GitHub ↗
({keyringId, recipients})

Source from the content-addressed store, hash-verified

47 }
48
49 async queryValidKey({keyringId, recipients}) {
50 const keyMap = await getKeyByAddress(keyringId, recipients);
51 for (const email in keyMap) {
52 if (keyMap[email]) {
53 keyMap[email] = {
54 keys: keyMap[email].map(key => ({
55 fingerprint: key.getFingerprint(),
56 lastModified: getLastModifiedDate(key).toISOString(),
57 source: 'LOC' // local keyring
58 }))
59 };
60 } else {
61 const found = await keyRegistry.lookup({query: {email}, identity: keyringId});
62 if (found) {
63 keyMap[email] = {
64 keys: [found]
65 };
66 }
67 }
68 }
69 return keyMap;
70 }
71
72 async exportOwnPubKey({keyringId, emailAddr}) {
73 const keyring = await keyringById(keyringId);

Callers

nothing calls this directly

Calls 2

getKeyByAddressFunction · 0.90
getLastModifiedDateFunction · 0.90

Tested by

no test coverage detected