diff --git a/package.json b/package.json index c6bdaf7..08aa5da 100644 --- a/package.json +++ b/package.json @@ -87,20 +87,20 @@ "uint8arrays": "^3.1.0" }, "devDependencies": { - "@libp2p/daemon-client": "2.0.4", + "@libp2p/daemon-client": "^3.0.1", "@libp2p/daemon-server": "^3.0.0", "@libp2p/interface-connection-encrypter-compliance-tests": "^2.0.1", - "@libp2p/interop": "^2.1.0", + "@libp2p/interop": "^3.0.1", "@libp2p/mplex": "^5.0.0", "@libp2p/peer-id-factory": "^1.0.8", "@libp2p/tcp": "^3.0.3", - "@multiformats/multiaddr": "^10.3.3", + "@multiformats/multiaddr": "^11.0.3", "aegir": "^37.3.0", "benchmark": "^2.1.4", "execa": "^6.1.0", "go-libp2p": "^0.0.6", "iso-random-stream": "^2.0.2", - "libp2p": "0.39.1", + "libp2p": "0.39.2", "mkdirp": "^1.0.4", "p-defer": "^4.0.0", "protons": "^5.1.0", diff --git a/src/noise.ts b/src/noise.ts index 65e9c94..b2d08c2 100644 --- a/src/noise.ts +++ b/src/noise.ts @@ -56,7 +56,7 @@ export class Noise implements INoiseConnection { * @param {PeerId} remotePeer - PeerId of the remote peer. Used to validate the integrity of the remote peer. * @returns {Promise} */ - public async secureOutbound (localPeer: PeerId, connection: Duplex, remotePeer: PeerId): Promise { + public async secureOutbound (localPeer: PeerId, connection: Duplex, remotePeer?: PeerId): Promise { const wrappedConnection = pbStream( connection, { diff --git a/test/interop.ts b/test/interop.ts index 10a1fd8..65b23a5 100644 --- a/test/interop.ts +++ b/test/interop.ts @@ -4,7 +4,7 @@ import { createServer } from '@libp2p/daemon-server' import { createClient } from '@libp2p/daemon-client' import { createLibp2p, Libp2pOptions } from 'libp2p' import { TCP } from '@libp2p/tcp' -import { Multiaddr } from '@multiformats/multiaddr' +import { multiaddr } from '@multiformats/multiaddr' import { path as p2pd } from 'go-libp2p' import { execa } from 'execa' import pDefer from 'p-defer' @@ -18,7 +18,7 @@ import { Noise } from '../src/index.js' async function createGoPeer (options: SpawnOptions): Promise { const controlPort = Math.floor(Math.random() * (50000 - 10000 + 1)) + 10000 - const apiAddr = new Multiaddr(`/ip4/0.0.0.0/tcp/${controlPort}`) + const apiAddr = multiaddr(`/ip4/0.0.0.0/tcp/${controlPort}`) const log = logger(`go-libp2p:${controlPort}`) @@ -82,7 +82,7 @@ async function createJsPeer (options: SpawnOptions): Promise { } const node = await createLibp2p(opts) - const server = await createServer(new Multiaddr('/ip4/0.0.0.0/tcp/0'), node as any) + const server = await createServer(multiaddr('/ip4/0.0.0.0/tcp/0'), node as any) await server.start() return {