Skip to content

Commit

Permalink
docs: added identify service to pubsub example (libp2p#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed May 25, 2023
1 parent a8ad048 commit d794df5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ import { yamux } from '@chainsafe/libp2p-yamux'
import { noise } from '@chainsafe/libp2p-noise'
import { gossipsub } from 'libp2p-gossipsub'
import { SignaturePolicy } from '@libp2p/interface-pubsub'
import { identifyService } from 'libp2p/identify'

const node = await createLibp2p({
transports: [
Expand All @@ -356,10 +357,11 @@ const node = await createLibp2p({
noise()
],
services: {
identify: identifyService(),
pubsub: gossipsub({
emitSelf: false, // whether the node should emit to self on publish
globalSignaturePolicy: SignaturePolicy.StrictSign // message signing policy
})
}),
}
})
```
Expand Down

0 comments on commit d794df5

Please sign in to comment.