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

Function generatePublicKeyFromPrivate

lib/src/commit.ts:194–202  ·  view source on GitHub ↗
(
  privateKey: string,
)

Source from the content-addressed store, hash-verified

192
193/** From base64 encoded private key */
194export const generatePublicKeyFromPrivate = async (
195 privateKey: string,
196): Promise<string> => {
197 const privateKeyArrayBuffer = decodeB64(privateKey);
198 const privateKeyBytes: Uint8Array = new Uint8Array(privateKeyArrayBuffer);
199 const publickey = await getPublicKey(privateKeyBytes);
200 const publicBase64 = encodeB64(publickey);
201 return publicBase64;
202};
203
204interface KeyPair {
205 publicKey: string;

Callers 1

getPublicKeyMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected