MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / get

Method get

mcp/src/resolve.ts:62–71  ·  view source on GitHub ↗

Return the live (unexpired) resolution for a bearer, or undefined.

(bearer: string)

Source from the content-addressed store, hash-verified

60
61 /** Return the live (unexpired) resolution for a bearer, or undefined. */
62 get(bearer: string): ResolvedPrincipal | undefined {
63 const key = fingerprintBearer(bearer);
64 const entry = this.map.get(key);
65 if (!entry) return undefined;
66 if (entry.expiresAt <= this.opts.now()) {
67 this.map.delete(key);
68 return undefined;
69 }
70 return entry.value;
71 }
72
73 /** Cache a resolution for `ttlMs`. Evicts the oldest entry past the cap. */
74 set(bearer: string, value: ResolvedPrincipal): void {

Callers 15

waitForBrowserLoginFunction · 0.45
handleNotificationFunction · 0.45
forwardMessageFunction · 0.45
login.test.tsFile · 0.45
GetDKIMKeyInternalMethod · 0.45
whoamiMethod · 0.45
getAgentMethod · 0.45
getMessageMethod · 0.45
getConversationMethod · 0.45
getPendingMessageMethod · 0.45
getDomainMethod · 0.45
getWebhookMethod · 0.45

Calls 2

fingerprintBearerFunction · 0.85
deleteMethod · 0.45

Tested by 1

GetDKIMKeyInternalMethod · 0.36