From 2c22c88e30ac0e4779e31ee39b8a847f53fedac7 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 31 Dec 2022 13:28:59 -0500 Subject: [PATCH] *address does not fit the addressinfo type --- src/modules/swarm.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/swarm.ts b/src/modules/swarm.ts index 1e14c31..8ed5f4e 100644 --- a/src/modules/swarm.ts +++ b/src/modules/swarm.ts @@ -13,7 +13,6 @@ import sodium from "sodium-universal"; import b4a from "b4a"; import log from "../log.js"; import { getKeyPair } from "../lib/seed.js"; -import { AddressInfo } from "net"; const LUMEWEB = b4a.from("lumeweb"); export const LUMEWEB_TOPIC_HASH = b4a.allocUnsafe(32); @@ -29,12 +28,12 @@ export async function start() { const bootstrap = DHT.bootstrapper(49737, "0.0.0.0"); await bootstrap.ready(); - const address = bootstrap.address() as AddressInfo; + const address = bootstrap.address(); node = new Hyperswarm({ keyPair, dht: new DHT({ keyPair, - bootstrap: [{ host: address.address, port: address.port }].concat( + bootstrap: [{ host: address.host, port: address.port }].concat( require("@hyperswarm/dht/lib/constants").BOOTSTRAP_NODES ), }),