File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8787 "uint8arrays" : " ^3.1.0"
8888 },
8989 "devDependencies" : {
90- "@libp2p/daemon-client" : " 2 .0.4 " ,
90+ "@libp2p/daemon-client" : " ^3 .0.1 " ,
9191 "@libp2p/daemon-server" : " ^3.0.0" ,
9292 "@libp2p/interface-connection-encrypter-compliance-tests" : " ^2.0.1" ,
93- "@libp2p/interop" : " ^2.1.0 " ,
93+ "@libp2p/interop" : " ^3.0.1 " ,
9494 "@libp2p/mplex" : " ^5.0.0" ,
9595 "@libp2p/peer-id-factory" : " ^1.0.8" ,
9696 "@libp2p/tcp" : " ^3.0.3" ,
97- "@multiformats/multiaddr" : " ^10.3 .3" ,
97+ "@multiformats/multiaddr" : " ^11.0 .3" ,
9898 "aegir" : " ^37.3.0" ,
9999 "benchmark" : " ^2.1.4" ,
100100 "execa" : " ^6.1.0" ,
101101 "go-libp2p" : " ^0.0.6" ,
102102 "iso-random-stream" : " ^2.0.2" ,
103- "libp2p" : " 0.39.1 " ,
103+ "libp2p" : " 0.39.2 " ,
104104 "mkdirp" : " ^1.0.4" ,
105105 "p-defer" : " ^4.0.0" ,
106106 "protons" : " ^5.1.0" ,
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export class Noise implements INoiseConnection {
5656 * @param {PeerId } remotePeer - PeerId of the remote peer. Used to validate the integrity of the remote peer.
5757 * @returns {Promise<SecuredConnection> }
5858 */
59- public async secureOutbound ( localPeer : PeerId , connection : Duplex < Uint8Array > , remotePeer : PeerId ) : Promise < SecuredConnection > {
59+ public async secureOutbound ( localPeer : PeerId , connection : Duplex < Uint8Array > , remotePeer ? : PeerId ) : Promise < SecuredConnection > {
6060 const wrappedConnection = pbStream (
6161 connection ,
6262 {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { createServer } from '@libp2p/daemon-server'
44import { createClient } from '@libp2p/daemon-client'
55import { createLibp2p , Libp2pOptions } from 'libp2p'
66import { TCP } from '@libp2p/tcp'
7- import { Multiaddr } from '@multiformats/multiaddr'
7+ import { multiaddr } from '@multiformats/multiaddr'
88import { path as p2pd } from 'go-libp2p'
99import { execa } from 'execa'
1010import pDefer from 'p-defer'
@@ -18,7 +18,7 @@ import { Noise } from '../src/index.js'
1818
1919async function createGoPeer ( options : SpawnOptions ) : Promise < Daemon > {
2020 const controlPort = Math . floor ( Math . random ( ) * ( 50000 - 10000 + 1 ) ) + 10000
21- const apiAddr = new Multiaddr ( `/ip4/0.0.0.0/tcp/${ controlPort } ` )
21+ const apiAddr = multiaddr ( `/ip4/0.0.0.0/tcp/${ controlPort } ` )
2222
2323 const log = logger ( `go-libp2p:${ controlPort } ` )
2424
@@ -82,7 +82,7 @@ async function createJsPeer (options: SpawnOptions): Promise<Daemon> {
8282 }
8383
8484 const node = await createLibp2p ( opts )
85- const server = await createServer ( new Multiaddr ( '/ip4/0.0.0.0/tcp/0' ) , node as any )
85+ const server = await createServer ( multiaddr ( '/ip4/0.0.0.0/tcp/0' ) , node as any )
8686 await server . start ( )
8787
8888 return {
You can’t perform that action at this time.
0 commit comments