MCPcopy Create free account
hub / github.com/atomicdata-dev/atomic-data-browser / generateKeyPair

Function generateKeyPair

lib/src/commit.ts:209–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207}
208
209export async function generateKeyPair(): Promise<KeyPair> {
210 const privateBytes = utils.randomPrivateKey();
211 const publicBytes = await getPublicKey(privateBytes);
212 const privateKey = encodeB64(privateBytes);
213 const publicKey = encodeB64(publicBytes);
214 return {
215 publicKey,
216 privateKey,
217 };
218}
219
220/** Parses a JSON-AD Commit, applies it to the store. Does not perform checks */
221export function parseAndApply(jsonAdObjStr: string, store: Store) {

Callers 1

handleNewFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected