@libp2p/floodsub 9.0.2 → 9.0.3-07f3afe2d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.min.js +10 -10
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +2 -2
- package/package.json +8 -8
- package/src/index.ts +2 -2
- package/dist/typedoc-urls.json +0 -11
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Instead please use [gossipsub](https://www.npmjs.com/package/@chainsafe/libp2p-g
|
|
|
17
17
|
|
|
18
18
|
## Example - Configuring libp2p to use floodsub
|
|
19
19
|
|
|
20
|
-
```
|
|
20
|
+
```TypeScript
|
|
21
21
|
import { createLibp2pNode } from 'libp2p'
|
|
22
22
|
import { floodsub } from '@libp2p/floodsub'
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ await node.start()
|
|
|
29
29
|
|
|
30
30
|
node.pubsub.subscribe('fruit')
|
|
31
31
|
node.pubsub.addEventListener('message', (evt) => {
|
|
32
|
-
console.
|
|
32
|
+
console.log(evt)
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
node.pubsub.publish('fruit', new TextEncoder().encode('banana'))
|