File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,8 @@ const MPLEX = require('libp2p-mplex')
322
322
const { NOISE } = require (' libp2p-noise' )
323
323
const GossipSub = require (' libp2p-gossipsub' )
324
324
325
+ const { SignaturePolicy } = require (' libp2p-interfaces/src/pubsub/signature-policy' )
326
+
325
327
const node = await Libp2p .create ({
326
328
modules: {
327
329
transport: [TCP ],
@@ -332,9 +334,8 @@ const node = await Libp2p.create({
332
334
config: {
333
335
pubsub: { // The pubsub options (and defaults) can be found in the pubsub router documentation
334
336
enabled: true ,
335
- emitSelf: true , // whether the node should emit to self on publish
336
- signMessages: true , // if messages should be signed
337
- strictSigning: true // if message signing should be required
337
+ emitSelf: false , // whether the node should emit to self on publish
338
+ globalSignaturePolicy: SignaturePolicy .StrictSign // message signing policy
338
339
}
339
340
}
340
341
})
Original file line number Diff line number Diff line change 60
60
"it-pipe" : " ^1.1.0" ,
61
61
"it-protocol-buffers" : " ^0.2.0" ,
62
62
"libp2p-crypto" : " ^0.18.0" ,
63
- "libp2p-interfaces" : " ^0.5.1 " ,
63
+ "libp2p-interfaces" : " ^0.7.2 " ,
64
64
"libp2p-utils" : " ^0.2.1" ,
65
65
"mafmt" : " ^8.0.0" ,
66
66
"merge-options" : " ^2.0.0" ,
99
99
"libp2p-bootstrap" : " ^0.12.0" ,
100
100
"libp2p-delegated-content-routing" : " ^0.7.0" ,
101
101
"libp2p-delegated-peer-routing" : " ^0.7.0" ,
102
- "libp2p-floodsub" : " ^0.23 .0" ,
103
- "libp2p-gossipsub" : " ^0.6 .0" ,
102
+ "libp2p-floodsub" : " ^0.24 .0" ,
103
+ "libp2p-gossipsub" : " ^0.7 .0" ,
104
104
"libp2p-kad-dht" : " ^0.20.0" ,
105
105
"libp2p-mdns" : " ^0.15.0" ,
106
106
"libp2p-mplex" : " ^0.10.1" ,
Original file line number Diff line number Diff line change @@ -54,10 +54,7 @@ const DefaultConfig = {
54
54
autoDial : true
55
55
} ,
56
56
pubsub : {
57
- enabled : true ,
58
- emitSelf : true ,
59
- signMessages : true ,
60
- strictSigning : true
57
+ enabled : true
61
58
} ,
62
59
relay : {
63
60
enabled : true ,
You can’t perform that action at this time.
0 commit comments