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

Function handleNew

data-browser/src/views/InvitePage.tsx:46–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 // When this happens, a new keypair is made, but the subject of the Agent is not yet known.
45 // It will be created by the server, and will be accessible in the Redirect response.
46 async function handleNew() {
47 const keypair = await generateKeyPair();
48 const newAgent = new Agent(keypair.privateKey);
49 setAgent(newAgent);
50 const publicKey = await newAgent.getPublicKey();
51 handleAccept(publicKey);
52 }
53
54 function handleAccept(publicKey?: string, agent?: string) {
55 const inviteURL = new URL(resource.getSubject());

Callers

nothing calls this directly

Calls 3

getPublicKeyMethod · 0.95
generateKeyPairFunction · 0.90
handleAcceptFunction · 0.85

Tested by

no test coverage detected