()
| 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()); |
nothing calls this directly
no test coverage detected