diff --git a/src/index.ts b/src/index.ts index 978991d..4193a1d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,7 @@ import { EventEmitter2 as EventEmitter } from "eventemitter2"; // @ts-ignore import Protomux from "protomux"; import defer, { DeferredPromise } from "p-defer"; +import { concatBytes } from "@lumeweb/libkernel"; const MAX_PEER_LISTENERS = 20; @@ -105,7 +106,7 @@ async function createSwarm(): Promise { const swarmInstance = new Hyperswarm({ keyPair: { publicKey: ed25519.getPublicKey(privateKey), - secretKey: privateKey, + secretKey: concatBytes(privateKey, ed25519.getPublicKey(privateKey)), }, }); const id = getSwarmId();