This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 3 files changed +14
-11
lines changed
3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 68
68
"detect-node" : " ^2.0.3" ,
69
69
"dir-compare" : " ^1.4.0" ,
70
70
"dirty-chai" : " ^2.0.1" ,
71
- "eslint-plugin-react" : " ^7.2.1 " ,
71
+ "eslint-plugin-react" : " ^7.3.0 " ,
72
72
"execa" : " ^0.8.0" ,
73
73
"expose-loader" : " ^0.7.3" ,
74
- "form-data" : " ^2.2.0 " ,
74
+ "form-data" : " ^2.3.1 " ,
75
75
"gulp" : " ^3.9.1" ,
76
76
"interface-ipfs-core" : " ~0.30.1" ,
77
77
"ipfsd-ctl" : " ~0.21.0" ,
93
93
"bl" : " ^1.2.1" ,
94
94
"boom" : " ^5.2.0" ,
95
95
"cids" : " ^0.5.1" ,
96
- "debug" : " ^3.0.0 " ,
96
+ "debug" : " ^3.0.1 " ,
97
97
"fsm-event" : " ^2.1.0" ,
98
98
"glob" : " ^7.1.2" ,
99
99
"hapi" : " ^16.5.2" ,
100
100
"hapi-set-header" : " ^1.0.2" ,
101
101
"hoek" : " ^4.2.0" ,
102
102
"ipfs-api" : " ^14.1.2" ,
103
- "ipfs-bitswap" : " ~0.15 .0" ,
103
+ "ipfs-bitswap" : " ~0.16 .0" ,
104
104
"ipfs-block" : " ~0.6.0" ,
105
105
"ipfs-block-service" : " ~0.12.0" ,
106
106
"ipfs-multipart" : " ~0.1.0" ,
118
118
"libp2p-multiplex" : " ^0.4.4" ,
119
119
"libp2p-railing" : " ^0.6.1" ,
120
120
"libp2p-secio" : " ^0.7.1" ,
121
- "libp2p-swarm" : " ^0.31.0 " ,
121
+ "libp2p-swarm" : " ^0.31.2 " ,
122
122
"libp2p-tcp" : " ^0.10.2" ,
123
123
"libp2p-webrtc-star" : " ^0.12.0" ,
124
124
"libp2p-websockets" : " ^0.10.1" ,
129
129
"mafmt" : " ^2.1.8" ,
130
130
"mkdirp" : " ^0.5.1" ,
131
131
"multiaddr" : " ^2.3.0" ,
132
- "multihashes" : " ~0.4.5 " ,
132
+ "multihashes" : " ~0.4.8 " ,
133
133
"once" : " ^1.4.0" ,
134
134
"path-exists" : " ^3.0.0" ,
135
135
"peer-book" : " ^0.5.0" ,
Original file line number Diff line number Diff line change @@ -5,20 +5,25 @@ const WebRTCStar = require('libp2p-webrtc-star')
5
5
const Multiplex = require ( 'libp2p-multiplex' )
6
6
const SECIO = require ( 'libp2p-secio' )
7
7
const Railing = require ( 'libp2p-railing' )
8
+ const KadDHT = require ( 'libp2p-kad-dht' )
8
9
const libp2p = require ( 'libp2p' )
9
10
10
11
class Node extends libp2p {
11
12
constructor ( peerInfo , peerBook , options ) {
12
13
options = options || { }
13
- const wstar = new WebRTCStar ( )
14
+ const wStar = new WebRTCStar ( )
14
15
15
16
const modules = {
16
- transport : [ new WS ( ) , wstar ] ,
17
+ transport : [ new WS ( ) , wStar ] ,
17
18
connection : {
18
19
muxer : [ Multiplex ] ,
19
20
crypto : [ SECIO ]
20
21
} ,
21
- discovery : [ wstar . discovery ]
22
+ discovery : [ wStar . discovery ]
23
+ }
24
+
25
+ if ( options . dht ) {
26
+ modules . DHT = KadDHT
22
27
}
23
28
24
29
if ( options . bootstrap ) {
Original file line number Diff line number Diff line change 2
2
3
3
'use strict'
4
4
5
- /*
6
5
const test = require ( 'interface-ipfs-core' )
7
6
const IPFSFactory = require ( '../../utils/ipfs-factory-instance' )
8
7
@@ -19,4 +18,3 @@ const common = {
19
18
}
20
19
21
20
test . dht ( common )
22
- */
You can’t perform that action at this time.
0 commit comments