@libp2p/gossipsub 16.0.4 → 16.0.5-02fcf704d
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/dist/index.min.js +1 -1
- package/dist/index.min.js.map +3 -3
- package/dist/src/utils/buildRawMessage.d.ts.map +1 -1
- package/dist/src/utils/buildRawMessage.js +22 -5
- package/dist/src/utils/buildRawMessage.js.map +1 -1
- package/package.json +11 -11
- package/src/utils/buildRawMessage.ts +22 -5
- package/dist/typedoc-urls.json +0 -195
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildRawMessage.d.ts","sourceRoot":"","sources":["../../../src/utils/buildRawMessage.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AACvC,OAAO,EAAqB,aAAa,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG1D,eAAO,MAAM,UAAU,yBAAyC,CAAA;AAgBhE,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAA;IAChB,GAAG,EAAE,OAAO,CAAA;CACb;AAED,wBAAsB,eAAe,CACnC,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,QAAQ,EACf,YAAY,EAAE,UAAU,EACxB,eAAe,EAAE,UAAU,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CAuD/B;AAED,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CAAA;AAEzG,wBAAsB,oBAAoB,CACxC,eAAe,EAAE,OAAO,YAAY,GAAG,OAAO,UAAU,EACxD,GAAG,EAAE,GAAG,CAAC,OAAO,GACf,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"buildRawMessage.d.ts","sourceRoot":"","sources":["../../../src/utils/buildRawMessage.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AACvC,OAAO,EAAqB,aAAa,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG1D,eAAO,MAAM,UAAU,yBAAyC,CAAA;AAgBhE,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAA;IAChB,GAAG,EAAE,OAAO,CAAA;CACb;AAED,wBAAsB,eAAe,CACnC,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,QAAQ,EACf,YAAY,EAAE,UAAU,EACxB,eAAe,EAAE,UAAU,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CAuD/B;AAED,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CAAA;AAEzG,wBAAsB,oBAAoB,CACxC,eAAe,EAAE,OAAO,YAAY,GAAG,OAAO,UAAU,EACxD,GAAG,EAAE,GAAG,CAAC,OAAO,GACf,OAAO,CAAC,gBAAgB,CAAC,CAsG3B"}
|
|
@@ -116,9 +116,16 @@ export async function validateToRawMessage(signaturePolicy, msg) {
|
|
|
116
116
|
// - verify sig
|
|
117
117
|
let publicKey;
|
|
118
118
|
if (msg.key != null) {
|
|
119
|
-
|
|
120
|
-
//
|
|
121
|
-
|
|
119
|
+
// malformed key bytes must reject rather than throw, so an attacker
|
|
120
|
+
// sending them is still scored as delivering an invalid message
|
|
121
|
+
try {
|
|
122
|
+
publicKey = publicKeyFromProtobuf(msg.key);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return { valid: false, error: ValidateError.InvalidPeerId };
|
|
126
|
+
}
|
|
127
|
+
// the message key must derive to the `from` peer id
|
|
128
|
+
if (!fromPeerId.equals(publicKey.toMultihash().bytes)) {
|
|
122
129
|
return { valid: false, error: ValidateError.InvalidPeerId };
|
|
123
130
|
}
|
|
124
131
|
}
|
|
@@ -139,7 +146,17 @@ export async function validateToRawMessage(signaturePolicy, msg) {
|
|
|
139
146
|
// Get the message in bytes, and prepend with the pubsub prefix
|
|
140
147
|
// the signature is over the bytes "libp2p-pubsub:<protobuf-message>"
|
|
141
148
|
const bytes = uint8ArrayConcat([SignPrefix, RPC.Message.encode(rpcMsgPreSign)]);
|
|
142
|
-
|
|
149
|
+
// a malformed signature (e.g. the wrong length) makes verify throw for
|
|
150
|
+
// some key types; treat that as an invalid signature so the peer is still
|
|
151
|
+
// scored rather than the message escaping to the unscored error path
|
|
152
|
+
let validSignature;
|
|
153
|
+
try {
|
|
154
|
+
validSignature = await publicKey.verify(bytes, msg.signature);
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
validSignature = false;
|
|
158
|
+
}
|
|
159
|
+
if (!validSignature) {
|
|
143
160
|
return { valid: false, error: ValidateError.InvalidSignature };
|
|
144
161
|
}
|
|
145
162
|
return {
|
|
@@ -151,7 +168,7 @@ export async function validateToRawMessage(signaturePolicy, msg) {
|
|
|
151
168
|
sequenceNumber: BigInt(`0x${uint8ArrayToString(msg.seqno, 'base16')}`),
|
|
152
169
|
topic: msg.topic,
|
|
153
170
|
signature: msg.signature,
|
|
154
|
-
key:
|
|
171
|
+
key: publicKey
|
|
155
172
|
}
|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AK,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC;oBACtE,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,SAAS,EAAE,GAAG,CAAC,SAAS;oBACxB,GAAG,EAAE,SAAS;iBACf;aACF,CAAA;QACH,CAAC;QAED;YACE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;IAClC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/gossipsub",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.5-02fcf704d",
|
|
4
4
|
"description": "A typescript implementation of gossipsub",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
},
|
|
80
80
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/gossipsub#readme",
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@libp2p/crypto": "
|
|
83
|
-
"@libp2p/interface": "
|
|
84
|
-
"@libp2p/interface-internal": "
|
|
85
|
-
"@libp2p/peer-id": "
|
|
86
|
-
"@libp2p/utils": "
|
|
82
|
+
"@libp2p/crypto": "5.1.21-02fcf704d",
|
|
83
|
+
"@libp2p/interface": "3.2.5-02fcf704d",
|
|
84
|
+
"@libp2p/interface-internal": "3.1.9-02fcf704d",
|
|
85
|
+
"@libp2p/peer-id": "6.0.12-02fcf704d",
|
|
86
|
+
"@libp2p/utils": "7.3.0-02fcf704d",
|
|
87
87
|
"@multiformats/multiaddr": "^13.0.3",
|
|
88
88
|
"denque": "^2.1.0",
|
|
89
89
|
"it-length-prefixed": "^11.0.1",
|
|
@@ -96,11 +96,11 @@
|
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@chainsafe/as-sha256": "^1.2.0",
|
|
99
|
-
"@libp2p/floodsub": "
|
|
100
|
-
"@libp2p/logger": "
|
|
101
|
-
"@libp2p/peer-store": "
|
|
99
|
+
"@libp2p/floodsub": "11.0.26-02fcf704d",
|
|
100
|
+
"@libp2p/logger": "6.2.10-02fcf704d",
|
|
101
|
+
"@libp2p/peer-store": "12.0.24-02fcf704d",
|
|
102
102
|
"@types/benchmark": "^2.1.5",
|
|
103
|
-
"@types/sinon": "^
|
|
103
|
+
"@types/sinon": "^22.0.0",
|
|
104
104
|
"abortable-iterator": "^5.1.0",
|
|
105
105
|
"aegir": "^48.1.1",
|
|
106
106
|
"benchmark": "^2.1.4",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"p-retry": "^8.0.0",
|
|
114
114
|
"p-wait-for": "^6.0.0",
|
|
115
115
|
"protons": "^9.0.1",
|
|
116
|
-
"sinon": "^
|
|
116
|
+
"sinon": "^22.0.0",
|
|
117
117
|
"sinon-ts": "^2.0.0",
|
|
118
118
|
"time-cache": "^0.3.0"
|
|
119
119
|
},
|
|
@@ -138,9 +138,16 @@ export async function validateToRawMessage (
|
|
|
138
138
|
|
|
139
139
|
let publicKey: PublicKey
|
|
140
140
|
if (msg.key != null) {
|
|
141
|
-
|
|
142
|
-
//
|
|
143
|
-
|
|
141
|
+
// malformed key bytes must reject rather than throw, so an attacker
|
|
142
|
+
// sending them is still scored as delivering an invalid message
|
|
143
|
+
try {
|
|
144
|
+
publicKey = publicKeyFromProtobuf(msg.key)
|
|
145
|
+
} catch {
|
|
146
|
+
return { valid: false, error: ValidateError.InvalidPeerId }
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// the message key must derive to the `from` peer id
|
|
150
|
+
if (!fromPeerId.equals(publicKey.toMultihash().bytes)) {
|
|
144
151
|
return { valid: false, error: ValidateError.InvalidPeerId }
|
|
145
152
|
}
|
|
146
153
|
} else {
|
|
@@ -163,7 +170,17 @@ export async function validateToRawMessage (
|
|
|
163
170
|
// the signature is over the bytes "libp2p-pubsub:<protobuf-message>"
|
|
164
171
|
const bytes = uint8ArrayConcat([SignPrefix, RPC.Message.encode(rpcMsgPreSign)])
|
|
165
172
|
|
|
166
|
-
|
|
173
|
+
// a malformed signature (e.g. the wrong length) makes verify throw for
|
|
174
|
+
// some key types; treat that as an invalid signature so the peer is still
|
|
175
|
+
// scored rather than the message escaping to the unscored error path
|
|
176
|
+
let validSignature: boolean
|
|
177
|
+
try {
|
|
178
|
+
validSignature = await publicKey.verify(bytes, msg.signature)
|
|
179
|
+
} catch {
|
|
180
|
+
validSignature = false
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (!validSignature) {
|
|
167
184
|
return { valid: false, error: ValidateError.InvalidSignature }
|
|
168
185
|
}
|
|
169
186
|
|
|
@@ -176,7 +193,7 @@ export async function validateToRawMessage (
|
|
|
176
193
|
sequenceNumber: BigInt(`0x${uint8ArrayToString(msg.seqno, 'base16')}`),
|
|
177
194
|
topic: msg.topic,
|
|
178
195
|
signature: msg.signature,
|
|
179
|
-
key:
|
|
196
|
+
key: publicKey
|
|
180
197
|
}
|
|
181
198
|
}
|
|
182
199
|
}
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"TopicValidatorResult": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub..TopicValidatorResult.html",
|
|
3
|
-
".:TopicValidatorResult": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub..TopicValidatorResult.html",
|
|
4
|
-
"GossipSub": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipSub.html",
|
|
5
|
-
".:GossipSub": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipSub.html",
|
|
6
|
-
"GossipSubComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipSubComponents.html",
|
|
7
|
-
".:GossipSubComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipSubComponents.html",
|
|
8
|
-
"GossipSubEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipSubEvents.html",
|
|
9
|
-
".:GossipSubEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipSubEvents.html",
|
|
10
|
-
"GossipsubMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipsubMessage.html",
|
|
11
|
-
".:GossipsubMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipsubMessage.html",
|
|
12
|
-
"GossipsubOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipsubOpts.html",
|
|
13
|
-
".:GossipsubOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..GossipsubOpts.html",
|
|
14
|
-
"MeshPeer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..MeshPeer.html",
|
|
15
|
-
".:MeshPeer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..MeshPeer.html",
|
|
16
|
-
"PublishResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..PublishResult.html",
|
|
17
|
-
".:PublishResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..PublishResult.html",
|
|
18
|
-
"SignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..SignedMessage.html",
|
|
19
|
-
".:SignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..SignedMessage.html",
|
|
20
|
-
"Subscription": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..Subscription.html",
|
|
21
|
-
".:Subscription": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..Subscription.html",
|
|
22
|
-
"SubscriptionChangeData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..SubscriptionChangeData.html",
|
|
23
|
-
".:SubscriptionChangeData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..SubscriptionChangeData.html",
|
|
24
|
-
"TopicValidatorFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..TopicValidatorFn.html",
|
|
25
|
-
".:TopicValidatorFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..TopicValidatorFn.html",
|
|
26
|
-
"UnsignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..UnsignedMessage.html",
|
|
27
|
-
".:UnsignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub..UnsignedMessage.html",
|
|
28
|
-
"Message": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub..Message.html",
|
|
29
|
-
".:Message": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub..Message.html",
|
|
30
|
-
"SignaturePolicy": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub..SignaturePolicy.html",
|
|
31
|
-
".:SignaturePolicy": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub..SignaturePolicy.html",
|
|
32
|
-
"multicodec": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub..multicodec.html",
|
|
33
|
-
".:multicodec": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub..multicodec.html",
|
|
34
|
-
"StrictNoSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub..StrictNoSign.html",
|
|
35
|
-
".:StrictNoSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub..StrictNoSign.html",
|
|
36
|
-
"StrictSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub..StrictSign.html",
|
|
37
|
-
".:StrictSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub..StrictSign.html",
|
|
38
|
-
"gossipsub": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub..gossipsub.html",
|
|
39
|
-
".:gossipsub": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub..gossipsub.html",
|
|
40
|
-
"ControlGraftTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlGraft.ControlGraftTopicIDFieldEvent.html",
|
|
41
|
-
"codec": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.message.RPC.ControlGraft.codec.html",
|
|
42
|
-
"decode": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.message.RPC.ControlGraft.decode.html",
|
|
43
|
-
"encode": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.message.RPC.ControlGraft.encode.html",
|
|
44
|
-
"stream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.message.RPC.ControlGraft.stream.html",
|
|
45
|
-
"ControlIDontWantMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlIDontWant.ControlIDontWantMessageIDsFieldEvent.html",
|
|
46
|
-
"ControlIHaveMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlIHave.ControlIHaveMessageIDsFieldEvent.html",
|
|
47
|
-
"ControlIHaveTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlIHave.ControlIHaveTopicIDFieldEvent.html",
|
|
48
|
-
"ControlIWantMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlIWant.ControlIWantMessageIDsFieldEvent.html",
|
|
49
|
-
"ControlMessageGraftTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessageGraftTopicIDFieldEvent.html",
|
|
50
|
-
"ControlMessageIdontwantMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessageIdontwantMessageIDsFieldEvent.html",
|
|
51
|
-
"ControlMessageIhaveMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessageIhaveMessageIDsFieldEvent.html",
|
|
52
|
-
"ControlMessageIhaveTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessageIhaveTopicIDFieldEvent.html",
|
|
53
|
-
"ControlMessageIwantMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessageIwantMessageIDsFieldEvent.html",
|
|
54
|
-
"ControlMessagePruneBackoffFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessagePruneBackoffFieldEvent.html",
|
|
55
|
-
"ControlMessagePrunePeersPeerIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessagePrunePeersPeerIDFieldEvent.html",
|
|
56
|
-
"ControlMessagePrunePeersSignedPeerRecordFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessagePrunePeersSignedPeerRecordFieldEvent.html",
|
|
57
|
-
"ControlMessagePruneTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.ControlMessagePruneTopicIDFieldEvent.html",
|
|
58
|
-
"ControlPruneBackoffFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlPrune.ControlPruneBackoffFieldEvent.html",
|
|
59
|
-
"ControlPrunePeersPeerIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlPrune.ControlPrunePeersPeerIDFieldEvent.html",
|
|
60
|
-
"ControlPrunePeersSignedPeerRecordFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlPrune.ControlPrunePeersSignedPeerRecordFieldEvent.html",
|
|
61
|
-
"ControlPruneTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlPrune.ControlPruneTopicIDFieldEvent.html",
|
|
62
|
-
"MessageDataFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.Message.MessageDataFieldEvent.html",
|
|
63
|
-
"MessageFromFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.Message.MessageFromFieldEvent.html",
|
|
64
|
-
"MessageKeyFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.Message.MessageKeyFieldEvent.html",
|
|
65
|
-
"MessageSeqnoFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.Message.MessageSeqnoFieldEvent.html",
|
|
66
|
-
"MessageSignatureFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.Message.MessageSignatureFieldEvent.html",
|
|
67
|
-
"MessageTopicFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.Message.MessageTopicFieldEvent.html",
|
|
68
|
-
"PeerInfoPeerIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.PeerInfo.PeerInfoPeerIDFieldEvent.html",
|
|
69
|
-
"PeerInfoSignedPeerRecordFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.PeerInfo.PeerInfoSignedPeerRecordFieldEvent.html",
|
|
70
|
-
"SubOptsSubscribeFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.SubOpts.SubOptsSubscribeFieldEvent.html",
|
|
71
|
-
"SubOptsTopicFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.SubOpts.SubOptsTopicFieldEvent.html",
|
|
72
|
-
"ControlGraft": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlGraft.html",
|
|
73
|
-
"ControlIDontWant": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlIDontWant.html",
|
|
74
|
-
"ControlIHave": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlIHave.html",
|
|
75
|
-
"ControlIWant": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlIWant.html",
|
|
76
|
-
"ControlMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlMessage.html",
|
|
77
|
-
"ControlPrune": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.ControlPrune.html",
|
|
78
|
-
"PeerInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.PeerInfo.html",
|
|
79
|
-
"RPCControlGraftTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlGraftTopicIDFieldEvent.html",
|
|
80
|
-
"RPCControlIdontwantMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlIdontwantMessageIDsFieldEvent.html",
|
|
81
|
-
"RPCControlIhaveMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlIhaveMessageIDsFieldEvent.html",
|
|
82
|
-
"RPCControlIhaveTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlIhaveTopicIDFieldEvent.html",
|
|
83
|
-
"RPCControlIwantMessageIDsFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlIwantMessageIDsFieldEvent.html",
|
|
84
|
-
"RPCControlPruneBackoffFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlPruneBackoffFieldEvent.html",
|
|
85
|
-
"RPCControlPrunePeersPeerIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlPrunePeersPeerIDFieldEvent.html",
|
|
86
|
-
"RPCControlPrunePeersSignedPeerRecordFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlPrunePeersSignedPeerRecordFieldEvent.html",
|
|
87
|
-
"RPCControlPruneTopicIDFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCControlPruneTopicIDFieldEvent.html",
|
|
88
|
-
"RPCMessagesDataFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCMessagesDataFieldEvent.html",
|
|
89
|
-
"RPCMessagesFromFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCMessagesFromFieldEvent.html",
|
|
90
|
-
"RPCMessagesKeyFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCMessagesKeyFieldEvent.html",
|
|
91
|
-
"RPCMessagesSeqnoFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCMessagesSeqnoFieldEvent.html",
|
|
92
|
-
"RPCMessagesSignatureFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCMessagesSignatureFieldEvent.html",
|
|
93
|
-
"RPCMessagesTopicFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCMessagesTopicFieldEvent.html",
|
|
94
|
-
"RPCSubscriptionsSubscribeFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCSubscriptionsSubscribeFieldEvent.html",
|
|
95
|
-
"RPCSubscriptionsTopicFieldEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.RPCSubscriptionsTopicFieldEvent.html",
|
|
96
|
-
"SubOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.SubOpts.html",
|
|
97
|
-
"RPC": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.message.RPC.html",
|
|
98
|
-
"ChurnReason": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.ChurnReason.html",
|
|
99
|
-
"./metrics:ChurnReason": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.ChurnReason.html",
|
|
100
|
-
"IHaveIgnoreReason": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.IHaveIgnoreReason.html",
|
|
101
|
-
"./metrics:IHaveIgnoreReason": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.IHaveIgnoreReason.html",
|
|
102
|
-
"InclusionReason": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.InclusionReason.html",
|
|
103
|
-
"./metrics:InclusionReason": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.InclusionReason.html",
|
|
104
|
-
"MessageSource": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.MessageSource.html",
|
|
105
|
-
"./metrics:MessageSource": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.MessageSource.html",
|
|
106
|
-
"ScorePenalty": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.ScorePenalty.html",
|
|
107
|
-
"./metrics:ScorePenalty": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.ScorePenalty.html",
|
|
108
|
-
"ScoreThreshold": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.ScoreThreshold.html",
|
|
109
|
-
"./metrics:ScoreThreshold": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.metrics.ScoreThreshold.html",
|
|
110
|
-
"AvgMinMax": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.AvgMinMax.html",
|
|
111
|
-
"./metrics:AvgMinMax": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.AvgMinMax.html",
|
|
112
|
-
"Gauge": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.Gauge.html",
|
|
113
|
-
"./metrics:Gauge": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.Gauge.html",
|
|
114
|
-
"Histogram": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.Histogram.html",
|
|
115
|
-
"./metrics:Histogram": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.Histogram.html",
|
|
116
|
-
"MetricsRegister": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.MetricsRegister.html",
|
|
117
|
-
"./metrics:MetricsRegister": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.MetricsRegister.html",
|
|
118
|
-
"ScoreWeights": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.ScoreWeights.html",
|
|
119
|
-
"./metrics:ScoreWeights": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.ScoreWeights.html",
|
|
120
|
-
"ToAddGroupCount": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.ToAddGroupCount.html",
|
|
121
|
-
"./metrics:ToAddGroupCount": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.ToAddGroupCount.html",
|
|
122
|
-
"TopicScoreWeights": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.TopicScoreWeights.html",
|
|
123
|
-
"./metrics:TopicScoreWeights": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.TopicScoreWeights.html",
|
|
124
|
-
"ToSendGroupCount": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.ToSendGroupCount.html",
|
|
125
|
-
"./metrics:ToSendGroupCount": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.metrics.ToSendGroupCount.html",
|
|
126
|
-
"AvgMinMaxConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.AvgMinMaxConfig.html",
|
|
127
|
-
"./metrics:AvgMinMaxConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.AvgMinMaxConfig.html",
|
|
128
|
-
"GaugeConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.GaugeConfig.html",
|
|
129
|
-
"./metrics:GaugeConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.GaugeConfig.html",
|
|
130
|
-
"HistogramConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.HistogramConfig.html",
|
|
131
|
-
"./metrics:HistogramConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.HistogramConfig.html",
|
|
132
|
-
"Metrics": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.Metrics.html",
|
|
133
|
-
"./metrics:Metrics": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.Metrics.html",
|
|
134
|
-
"PeersByScoreThreshold": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.PeersByScoreThreshold.html",
|
|
135
|
-
"./metrics:PeersByScoreThreshold": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.PeersByScoreThreshold.html",
|
|
136
|
-
"PromiseDeliveredStats": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.PromiseDeliveredStats.html",
|
|
137
|
-
"./metrics:PromiseDeliveredStats": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.PromiseDeliveredStats.html",
|
|
138
|
-
"TopicLabel": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.TopicLabel.html",
|
|
139
|
-
"./metrics:TopicLabel": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.TopicLabel.html",
|
|
140
|
-
"TopicStrToLabel": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.TopicStrToLabel.html",
|
|
141
|
-
"./metrics:TopicStrToLabel": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.metrics.TopicStrToLabel.html",
|
|
142
|
-
"getMetrics": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.metrics.getMetrics.html",
|
|
143
|
-
"./metrics:getMetrics": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.metrics.getMetrics.html",
|
|
144
|
-
"PeerScore": "https://libp2p.github.io/js-libp2p/classes/_libp2p_gossipsub.score.PeerScore.html",
|
|
145
|
-
"PeerScoreParams": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.score.PeerScoreParams.html",
|
|
146
|
-
"PeerScoreThresholds": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.score.PeerScoreThresholds.html",
|
|
147
|
-
"TopicScoreParams": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.score.TopicScoreParams.html",
|
|
148
|
-
"PeerScoreStatsDump": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.score.PeerScoreStatsDump.html",
|
|
149
|
-
"defaultPeerScoreParams": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub.score.defaultPeerScoreParams.html",
|
|
150
|
-
"defaultPeerScoreThresholds": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub.score.defaultPeerScoreThresholds.html",
|
|
151
|
-
"defaultTopicScoreParams": "https://libp2p.github.io/js-libp2p/variables/_libp2p_gossipsub.score.defaultTopicScoreParams.html",
|
|
152
|
-
"createPeerScoreParams": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.score.createPeerScoreParams.html",
|
|
153
|
-
"createPeerScoreThresholds": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.score.createPeerScoreThresholds.html",
|
|
154
|
-
"createTopicScoreParams": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.score.createTopicScoreParams.html",
|
|
155
|
-
"validatePeerScoreParams": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.score.validatePeerScoreParams.html",
|
|
156
|
-
"validatePeerScoreThresholds": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.score.validatePeerScoreThresholds.html",
|
|
157
|
-
"validateTopicScoreParams": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.score.validateTopicScoreParams.html",
|
|
158
|
-
"MessageStatus": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.MessageStatus.html",
|
|
159
|
-
"./types:MessageStatus": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.MessageStatus.html",
|
|
160
|
-
"PublishConfigType": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.PublishConfigType.html",
|
|
161
|
-
"./types:PublishConfigType": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.PublishConfigType.html",
|
|
162
|
-
"RejectReason": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.RejectReason.html",
|
|
163
|
-
"./types:RejectReason": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.RejectReason.html",
|
|
164
|
-
"./types:SignaturePolicy": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.SignaturePolicy.html",
|
|
165
|
-
"ValidateError": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.ValidateError.html",
|
|
166
|
-
"./types:ValidateError": "https://libp2p.github.io/js-libp2p/enums/_libp2p_gossipsub.types.ValidateError.html",
|
|
167
|
-
"AddrInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.AddrInfo.html",
|
|
168
|
-
"./types:AddrInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.AddrInfo.html",
|
|
169
|
-
"DataTransform": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.DataTransform.html",
|
|
170
|
-
"./types:DataTransform": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.DataTransform.html",
|
|
171
|
-
"FastMsgIdFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.FastMsgIdFn.html",
|
|
172
|
-
"./types:FastMsgIdFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.FastMsgIdFn.html",
|
|
173
|
-
"MessageId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.MessageId.html",
|
|
174
|
-
"./types:MessageId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.MessageId.html",
|
|
175
|
-
"MsgIdFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.MsgIdFn.html",
|
|
176
|
-
"./types:MsgIdFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.MsgIdFn.html",
|
|
177
|
-
"MsgIdToStrFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.MsgIdToStrFn.html",
|
|
178
|
-
"./types:MsgIdToStrFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.MsgIdToStrFn.html",
|
|
179
|
-
"PublishOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.PublishOpts.html",
|
|
180
|
-
"./types:PublishOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_gossipsub.types.PublishOpts.html",
|
|
181
|
-
"IPStr": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.IPStr.html",
|
|
182
|
-
"./types:IPStr": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.IPStr.html",
|
|
183
|
-
"MsgIdStr": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.MsgIdStr.html",
|
|
184
|
-
"./types:MsgIdStr": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.MsgIdStr.html",
|
|
185
|
-
"PeerIdStr": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.PeerIdStr.html",
|
|
186
|
-
"./types:PeerIdStr": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.PeerIdStr.html",
|
|
187
|
-
"PublishConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.PublishConfig.html",
|
|
188
|
-
"./types:PublishConfig": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.PublishConfig.html",
|
|
189
|
-
"RejectReasonObj": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.RejectReasonObj.html",
|
|
190
|
-
"./types:RejectReasonObj": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.RejectReasonObj.html",
|
|
191
|
-
"TopicStr": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.TopicStr.html",
|
|
192
|
-
"./types:TopicStr": "https://libp2p.github.io/js-libp2p/types/_libp2p_gossipsub.types.TopicStr.html",
|
|
193
|
-
"rejectReasonFromAcceptance": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.types.rejectReasonFromAcceptance.html",
|
|
194
|
-
"./types:rejectReasonFromAcceptance": "https://libp2p.github.io/js-libp2p/functions/_libp2p_gossipsub.types.rejectReasonFromAcceptance.html"
|
|
195
|
-
}
|