MCPcopy Index your code
hub / github.com/atomicdata-dev/atomic-data-browser / getPublicKey

Method getPublicKey

lib/src/agent.ts:23–29  ·  view source on GitHub ↗

Returns existing public key or generates one using the private key

()

Source from the content-addressed store, hash-verified

21
22 /** Returns existing public key or generates one using the private key */
23 async getPublicKey(): Promise<string> {
24 if (!this.publicKey) {
25 const pubKey = await generatePublicKeyFromPrivate(this.privateKey);
26 this.publicKey = pubKey;
27 }
28 return this.publicKey;
29 }
30
31 /**
32 * Returns a base64 encoded JSON object containing the Subject and the Private

Callers 4

checkPublicKeyMethod · 0.95
handleNewFunction · 0.95
signRequestFunction · 0.80

Calls 1

Tested by

no test coverage detected