diff --git a/src/index.ts b/src/index.ts index 3255626..19cc3bd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -81,6 +81,7 @@ addHandler("createProtomuxChannel", createProtomuxChannel, { addHandler("createProtomuxMessage", createProtomuxMessage, { receiveUpdates: true, }); +addHandler("createSwarm", handleCreateSwarm); async function handlePresentSeed(aq: ActiveQuery) { const pubkey = await ed.getPublicKey(aq.callerInput.rootKey); @@ -589,6 +590,10 @@ async function createProtomuxMessage(aq: ActiveQuery) { }); } +async function handleCreateSwarm(aq: ActiveQuery) { + aq.respond(await createSwarm()); +} + function getSwarmToSocketConnectionId(socket: any) { for (const conn of connections) { if (conn[1].conn === socket) {