@libp2p/gossipsub 15.0.23 → 16.0.0-b7c6dc0f2
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 +5 -6
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +4 -4
- package/dist/src/constants.d.ts +4 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +4 -0
- package/dist/src/constants.js.map +1 -1
- package/dist/src/gossipsub.d.ts +7 -1
- package/dist/src/gossipsub.d.ts.map +1 -1
- package/dist/src/gossipsub.js +65 -31
- package/dist/src/gossipsub.js.map +1 -1
- package/dist/src/message/decodeRpc.d.ts.map +1 -1
- package/dist/src/message/decodeRpc.js +8 -7
- package/dist/src/message/decodeRpc.js.map +1 -1
- package/dist/src/score/message-deliveries.js +1 -1
- package/dist/src/score/peer-score-params.js +1 -1
- package/dist/src/score/peer-score-thresholds.js +1 -1
- package/dist/src/score/peer-score.d.ts +4 -4
- package/dist/src/score/peer-score.js +2 -2
- package/dist/src/score/peer-stats.d.ts +1 -1
- package/dist/src/utils/buildRawMessage.d.ts +4 -4
- package/dist/src/utils/buildRawMessage.d.ts.map +1 -1
- package/dist/src/utils/buildRawMessage.js +2 -2
- package/dist/src/utils/create-gossip-rpc.d.ts +1 -1
- package/dist/src/utils/msgIdFn.d.ts +1 -1
- package/dist/src/utils/publishConfig.d.ts +1 -1
- package/dist/src/utils/publishConfig.js +1 -1
- package/package.json +15 -14
- package/src/constants.ts +5 -0
- package/src/gossipsub.ts +70 -31
- package/src/message/decodeRpc.ts +8 -7
- package/src/score/message-deliveries.ts +1 -1
- package/src/score/peer-score-params.ts +1 -1
- package/src/score/peer-score-thresholds.ts +1 -1
- package/src/score/peer-score.ts +4 -4
- package/src/score/peer-stats.ts +1 -1
- package/src/utils/buildRawMessage.ts +3 -3
- package/src/utils/create-gossip-rpc.ts +1 -1
- package/src/utils/msgIdFn.ts +1 -1
- package/src/utils/publishConfig.ts +2 -2
- package/dist/typedoc-urls.json +0 -195
package/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @libp2p/gossipsub
|
|
2
2
|
|
|
3
|
-
[](https://chainsafe.io/)
|
|
4
3
|

|
|
5
4
|

|
|
6
5
|
|
|
7
6
|
## Table of Contents
|
|
8
7
|
|
|
9
|
-
- [
|
|
8
|
+
- [@libp2p/gossipsub](#libp2pgossipsub)
|
|
10
9
|
- [Lead Maintainer](#lead-maintainer)
|
|
11
10
|
- [Table of Contents](#table-of-contents)
|
|
12
11
|
- [Specs](#specs)
|
|
@@ -21,16 +20,16 @@
|
|
|
21
20
|
|
|
22
21
|
Gossipsub is an implementation of pubsub based on meshsub and floodsub. You can read the specification [here](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub).
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
`@libp2p/gossipsub` currently implements the [`v1.1`](https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md) of the spec.
|
|
25
24
|
|
|
26
25
|
## Install
|
|
27
26
|
|
|
28
|
-
`npm install @
|
|
27
|
+
`npm install @libp2p/gossipsub`
|
|
29
28
|
|
|
30
29
|
## Usage
|
|
31
30
|
|
|
32
31
|
```javascript
|
|
33
|
-
import { gossipsub } from '@
|
|
32
|
+
import { gossipsub } from '@libp2p/gossipsub'
|
|
34
33
|
|
|
35
34
|
|
|
36
35
|
const libp2p = await createLibp2p({
|