@libp2p/floodsub 1.0.2 → 1.0.5
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/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/message/rpc.d.ts +70 -651
- package/dist/src/message/rpc.d.ts.map +1 -0
- package/dist/src/message/rpc.js +120 -1851
- package/dist/src/message/rpc.js.map +1 -0
- package/package.json +23 -24
- package/src/index.ts +2 -2
- package/src/message/rpc.ts +213 -0
- package/src/message/rpc.d.ts +0 -669
- package/src/message/rpc.js +0 -1876
|
@@ -1,669 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** RPC subscriptions */
|
|
6
|
-
subscriptions?: (RPC.ISubOpts[]|null);
|
|
7
|
-
|
|
8
|
-
/** RPC messages */
|
|
9
|
-
messages?: (RPC.IMessage[]|null);
|
|
10
|
-
|
|
11
|
-
/** RPC control */
|
|
12
|
-
control?: (IControlMessage|null);
|
|
1
|
+
export interface RPC {
|
|
2
|
+
subscriptions: RPC.SubOpts[];
|
|
3
|
+
messages: RPC.Message[];
|
|
4
|
+
control?: ControlMessage;
|
|
13
5
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Constructs a new RPC.
|
|
20
|
-
* @param [p] Properties to set
|
|
21
|
-
*/
|
|
22
|
-
constructor(p?: IRPC);
|
|
23
|
-
|
|
24
|
-
/** RPC subscriptions. */
|
|
25
|
-
public subscriptions: RPC.ISubOpts[];
|
|
26
|
-
|
|
27
|
-
/** RPC messages. */
|
|
28
|
-
public messages: RPC.IMessage[];
|
|
29
|
-
|
|
30
|
-
/** RPC control. */
|
|
31
|
-
public control?: (IControlMessage|null);
|
|
32
|
-
|
|
33
|
-
/** RPC _control. */
|
|
34
|
-
public _control?: "control";
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Encodes the specified RPC message. Does not implicitly {@link RPC.verify|verify} messages.
|
|
38
|
-
* @param m RPC message or plain object to encode
|
|
39
|
-
* @param [w] Writer to encode to
|
|
40
|
-
* @returns Writer
|
|
41
|
-
*/
|
|
42
|
-
public static encode(m: IRPC, w?: $protobuf.Writer): $protobuf.Writer;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Decodes a RPC message from the specified reader or buffer.
|
|
46
|
-
* @param r Reader or buffer to decode from
|
|
47
|
-
* @param [l] Message length if known beforehand
|
|
48
|
-
* @returns RPC
|
|
49
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
50
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
51
|
-
*/
|
|
52
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): RPC;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Creates a RPC message from a plain object. Also converts values to their respective internal types.
|
|
56
|
-
* @param d Plain object
|
|
57
|
-
* @returns RPC
|
|
58
|
-
*/
|
|
59
|
-
public static fromObject(d: { [k: string]: any }): RPC;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Creates a plain object from a RPC message. Also converts values to other types if specified.
|
|
63
|
-
* @param m RPC
|
|
64
|
-
* @param [o] Conversion options
|
|
65
|
-
* @returns Plain object
|
|
66
|
-
*/
|
|
67
|
-
public static toObject(m: RPC, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Converts this RPC to JSON.
|
|
71
|
-
* @returns JSON object
|
|
72
|
-
*/
|
|
73
|
-
public toJSON(): { [k: string]: any };
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export namespace RPC {
|
|
77
|
-
|
|
78
|
-
/** Properties of a SubOpts. */
|
|
79
|
-
interface ISubOpts {
|
|
80
|
-
|
|
81
|
-
/** SubOpts subscribe */
|
|
82
|
-
subscribe?: (boolean|null);
|
|
83
|
-
|
|
84
|
-
/** SubOpts topic */
|
|
85
|
-
topic?: (string|null);
|
|
6
|
+
export declare namespace RPC {
|
|
7
|
+
interface SubOpts {
|
|
8
|
+
subscribe?: boolean;
|
|
9
|
+
topic?: string;
|
|
86
10
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Constructs a new SubOpts.
|
|
93
|
-
* @param [p] Properties to set
|
|
94
|
-
*/
|
|
95
|
-
constructor(p?: RPC.ISubOpts);
|
|
96
|
-
|
|
97
|
-
/** SubOpts subscribe. */
|
|
98
|
-
public subscribe?: (boolean|null);
|
|
99
|
-
|
|
100
|
-
/** SubOpts topic. */
|
|
101
|
-
public topic?: (string|null);
|
|
102
|
-
|
|
103
|
-
/** SubOpts _subscribe. */
|
|
104
|
-
public _subscribe?: "subscribe";
|
|
105
|
-
|
|
106
|
-
/** SubOpts _topic. */
|
|
107
|
-
public _topic?: "topic";
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Encodes the specified SubOpts message. Does not implicitly {@link RPC.SubOpts.verify|verify} messages.
|
|
111
|
-
* @param m SubOpts message or plain object to encode
|
|
112
|
-
* @param [w] Writer to encode to
|
|
113
|
-
* @returns Writer
|
|
114
|
-
*/
|
|
115
|
-
public static encode(m: RPC.ISubOpts, w?: $protobuf.Writer): $protobuf.Writer;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Decodes a SubOpts message from the specified reader or buffer.
|
|
119
|
-
* @param r Reader or buffer to decode from
|
|
120
|
-
* @param [l] Message length if known beforehand
|
|
121
|
-
* @returns SubOpts
|
|
122
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
123
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
124
|
-
*/
|
|
125
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): RPC.SubOpts;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Creates a SubOpts message from a plain object. Also converts values to their respective internal types.
|
|
129
|
-
* @param d Plain object
|
|
130
|
-
* @returns SubOpts
|
|
131
|
-
*/
|
|
132
|
-
public static fromObject(d: { [k: string]: any }): RPC.SubOpts;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Creates a plain object from a SubOpts message. Also converts values to other types if specified.
|
|
136
|
-
* @param m SubOpts
|
|
137
|
-
* @param [o] Conversion options
|
|
138
|
-
* @returns Plain object
|
|
139
|
-
*/
|
|
140
|
-
public static toObject(m: RPC.SubOpts, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Converts this SubOpts to JSON.
|
|
144
|
-
* @returns JSON object
|
|
145
|
-
*/
|
|
146
|
-
public toJSON(): { [k: string]: any };
|
|
11
|
+
namespace SubOpts {
|
|
12
|
+
const codec: () => import("protons-runtime").Codec<SubOpts>;
|
|
13
|
+
const encode: (obj: SubOpts) => Uint8Array;
|
|
14
|
+
const decode: (buf: Uint8Array) => SubOpts;
|
|
147
15
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
/** Message data */
|
|
156
|
-
data?: (Uint8Array|null);
|
|
157
|
-
|
|
158
|
-
/** Message sequenceNumber */
|
|
159
|
-
sequenceNumber?: (Uint8Array|null);
|
|
160
|
-
|
|
161
|
-
/** Message topic */
|
|
162
|
-
topic?: (string|null);
|
|
163
|
-
|
|
164
|
-
/** Message signature */
|
|
165
|
-
signature?: (Uint8Array|null);
|
|
166
|
-
|
|
167
|
-
/** Message key */
|
|
168
|
-
key?: (Uint8Array|null);
|
|
16
|
+
interface Message {
|
|
17
|
+
from?: Uint8Array;
|
|
18
|
+
data?: Uint8Array;
|
|
19
|
+
sequenceNumber?: Uint8Array;
|
|
20
|
+
topic?: string;
|
|
21
|
+
signature?: Uint8Array;
|
|
22
|
+
key?: Uint8Array;
|
|
169
23
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Constructs a new Message.
|
|
176
|
-
* @param [p] Properties to set
|
|
177
|
-
*/
|
|
178
|
-
constructor(p?: RPC.IMessage);
|
|
179
|
-
|
|
180
|
-
/** Message from. */
|
|
181
|
-
public from?: (Uint8Array|null);
|
|
182
|
-
|
|
183
|
-
/** Message data. */
|
|
184
|
-
public data?: (Uint8Array|null);
|
|
185
|
-
|
|
186
|
-
/** Message sequenceNumber. */
|
|
187
|
-
public sequenceNumber?: (Uint8Array|null);
|
|
188
|
-
|
|
189
|
-
/** Message topic. */
|
|
190
|
-
public topic?: (string|null);
|
|
191
|
-
|
|
192
|
-
/** Message signature. */
|
|
193
|
-
public signature?: (Uint8Array|null);
|
|
194
|
-
|
|
195
|
-
/** Message key. */
|
|
196
|
-
public key?: (Uint8Array|null);
|
|
197
|
-
|
|
198
|
-
/** Message _from. */
|
|
199
|
-
public _from?: "from";
|
|
200
|
-
|
|
201
|
-
/** Message _data. */
|
|
202
|
-
public _data?: "data";
|
|
203
|
-
|
|
204
|
-
/** Message _sequenceNumber. */
|
|
205
|
-
public _sequenceNumber?: "sequenceNumber";
|
|
206
|
-
|
|
207
|
-
/** Message _topic. */
|
|
208
|
-
public _topic?: "topic";
|
|
209
|
-
|
|
210
|
-
/** Message _signature. */
|
|
211
|
-
public _signature?: "signature";
|
|
212
|
-
|
|
213
|
-
/** Message _key. */
|
|
214
|
-
public _key?: "key";
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Encodes the specified Message message. Does not implicitly {@link RPC.Message.verify|verify} messages.
|
|
218
|
-
* @param m Message message or plain object to encode
|
|
219
|
-
* @param [w] Writer to encode to
|
|
220
|
-
* @returns Writer
|
|
221
|
-
*/
|
|
222
|
-
public static encode(m: RPC.IMessage, w?: $protobuf.Writer): $protobuf.Writer;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Decodes a Message message from the specified reader or buffer.
|
|
226
|
-
* @param r Reader or buffer to decode from
|
|
227
|
-
* @param [l] Message length if known beforehand
|
|
228
|
-
* @returns Message
|
|
229
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
230
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
231
|
-
*/
|
|
232
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): RPC.Message;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Creates a Message message from a plain object. Also converts values to their respective internal types.
|
|
236
|
-
* @param d Plain object
|
|
237
|
-
* @returns Message
|
|
238
|
-
*/
|
|
239
|
-
public static fromObject(d: { [k: string]: any }): RPC.Message;
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Creates a plain object from a Message message. Also converts values to other types if specified.
|
|
243
|
-
* @param m Message
|
|
244
|
-
* @param [o] Conversion options
|
|
245
|
-
* @returns Plain object
|
|
246
|
-
*/
|
|
247
|
-
public static toObject(m: RPC.Message, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Converts this Message to JSON.
|
|
251
|
-
* @returns JSON object
|
|
252
|
-
*/
|
|
253
|
-
public toJSON(): { [k: string]: any };
|
|
24
|
+
namespace Message {
|
|
25
|
+
const codec: () => import("protons-runtime").Codec<Message>;
|
|
26
|
+
const encode: (obj: Message) => Uint8Array;
|
|
27
|
+
const decode: (buf: Uint8Array) => Message;
|
|
254
28
|
}
|
|
29
|
+
const codec: () => import("protons-runtime").Codec<RPC>;
|
|
30
|
+
const encode: (obj: RPC) => Uint8Array;
|
|
31
|
+
const decode: (buf: Uint8Array) => RPC;
|
|
255
32
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
ihave?: (IControlIHave[]|null);
|
|
262
|
-
|
|
263
|
-
/** ControlMessage iwant */
|
|
264
|
-
iwant?: (IControlIWant[]|null);
|
|
265
|
-
|
|
266
|
-
/** ControlMessage graft */
|
|
267
|
-
graft?: (IControlGraft[]|null);
|
|
268
|
-
|
|
269
|
-
/** ControlMessage prune */
|
|
270
|
-
prune?: (IControlPrune[]|null);
|
|
33
|
+
export interface ControlMessage {
|
|
34
|
+
ihave: ControlIHave[];
|
|
35
|
+
iwant: ControlIWant[];
|
|
36
|
+
graft: ControlGraft[];
|
|
37
|
+
prune: ControlPrune[];
|
|
271
38
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* Constructs a new ControlMessage.
|
|
278
|
-
* @param [p] Properties to set
|
|
279
|
-
*/
|
|
280
|
-
constructor(p?: IControlMessage);
|
|
281
|
-
|
|
282
|
-
/** ControlMessage ihave. */
|
|
283
|
-
public ihave: IControlIHave[];
|
|
284
|
-
|
|
285
|
-
/** ControlMessage iwant. */
|
|
286
|
-
public iwant: IControlIWant[];
|
|
287
|
-
|
|
288
|
-
/** ControlMessage graft. */
|
|
289
|
-
public graft: IControlGraft[];
|
|
290
|
-
|
|
291
|
-
/** ControlMessage prune. */
|
|
292
|
-
public prune: IControlPrune[];
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Encodes the specified ControlMessage message. Does not implicitly {@link ControlMessage.verify|verify} messages.
|
|
296
|
-
* @param m ControlMessage message or plain object to encode
|
|
297
|
-
* @param [w] Writer to encode to
|
|
298
|
-
* @returns Writer
|
|
299
|
-
*/
|
|
300
|
-
public static encode(m: IControlMessage, w?: $protobuf.Writer): $protobuf.Writer;
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Decodes a ControlMessage message from the specified reader or buffer.
|
|
304
|
-
* @param r Reader or buffer to decode from
|
|
305
|
-
* @param [l] Message length if known beforehand
|
|
306
|
-
* @returns ControlMessage
|
|
307
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
308
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
309
|
-
*/
|
|
310
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): ControlMessage;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Creates a ControlMessage message from a plain object. Also converts values to their respective internal types.
|
|
314
|
-
* @param d Plain object
|
|
315
|
-
* @returns ControlMessage
|
|
316
|
-
*/
|
|
317
|
-
public static fromObject(d: { [k: string]: any }): ControlMessage;
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Creates a plain object from a ControlMessage message. Also converts values to other types if specified.
|
|
321
|
-
* @param m ControlMessage
|
|
322
|
-
* @param [o] Conversion options
|
|
323
|
-
* @returns Plain object
|
|
324
|
-
*/
|
|
325
|
-
public static toObject(m: ControlMessage, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Converts this ControlMessage to JSON.
|
|
329
|
-
* @returns JSON object
|
|
330
|
-
*/
|
|
331
|
-
public toJSON(): { [k: string]: any };
|
|
39
|
+
export declare namespace ControlMessage {
|
|
40
|
+
const codec: () => import("protons-runtime").Codec<ControlMessage>;
|
|
41
|
+
const encode: (obj: ControlMessage) => Uint8Array;
|
|
42
|
+
const decode: (buf: Uint8Array) => ControlMessage;
|
|
332
43
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
/** ControlIHave topic */
|
|
338
|
-
topic?: (string|null);
|
|
339
|
-
|
|
340
|
-
/** ControlIHave messageIDs */
|
|
341
|
-
messageIDs?: (Uint8Array[]|null);
|
|
44
|
+
export interface ControlIHave {
|
|
45
|
+
topic?: string;
|
|
46
|
+
messageIDs: Uint8Array[];
|
|
342
47
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Constructs a new ControlIHave.
|
|
349
|
-
* @param [p] Properties to set
|
|
350
|
-
*/
|
|
351
|
-
constructor(p?: IControlIHave);
|
|
352
|
-
|
|
353
|
-
/** ControlIHave topic. */
|
|
354
|
-
public topic?: (string|null);
|
|
355
|
-
|
|
356
|
-
/** ControlIHave messageIDs. */
|
|
357
|
-
public messageIDs: Uint8Array[];
|
|
358
|
-
|
|
359
|
-
/** ControlIHave _topic. */
|
|
360
|
-
public _topic?: "topic";
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Encodes the specified ControlIHave message. Does not implicitly {@link ControlIHave.verify|verify} messages.
|
|
364
|
-
* @param m ControlIHave message or plain object to encode
|
|
365
|
-
* @param [w] Writer to encode to
|
|
366
|
-
* @returns Writer
|
|
367
|
-
*/
|
|
368
|
-
public static encode(m: IControlIHave, w?: $protobuf.Writer): $protobuf.Writer;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Decodes a ControlIHave message from the specified reader or buffer.
|
|
372
|
-
* @param r Reader or buffer to decode from
|
|
373
|
-
* @param [l] Message length if known beforehand
|
|
374
|
-
* @returns ControlIHave
|
|
375
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
376
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
377
|
-
*/
|
|
378
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): ControlIHave;
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Creates a ControlIHave message from a plain object. Also converts values to their respective internal types.
|
|
382
|
-
* @param d Plain object
|
|
383
|
-
* @returns ControlIHave
|
|
384
|
-
*/
|
|
385
|
-
public static fromObject(d: { [k: string]: any }): ControlIHave;
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* Creates a plain object from a ControlIHave message. Also converts values to other types if specified.
|
|
389
|
-
* @param m ControlIHave
|
|
390
|
-
* @param [o] Conversion options
|
|
391
|
-
* @returns Plain object
|
|
392
|
-
*/
|
|
393
|
-
public static toObject(m: ControlIHave, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Converts this ControlIHave to JSON.
|
|
397
|
-
* @returns JSON object
|
|
398
|
-
*/
|
|
399
|
-
public toJSON(): { [k: string]: any };
|
|
48
|
+
export declare namespace ControlIHave {
|
|
49
|
+
const codec: () => import("protons-runtime").Codec<ControlIHave>;
|
|
50
|
+
const encode: (obj: ControlIHave) => Uint8Array;
|
|
51
|
+
const decode: (buf: Uint8Array) => ControlIHave;
|
|
400
52
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
export interface IControlIWant {
|
|
404
|
-
|
|
405
|
-
/** ControlIWant messageIDs */
|
|
406
|
-
messageIDs?: (Uint8Array[]|null);
|
|
53
|
+
export interface ControlIWant {
|
|
54
|
+
messageIDs: Uint8Array[];
|
|
407
55
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Constructs a new ControlIWant.
|
|
414
|
-
* @param [p] Properties to set
|
|
415
|
-
*/
|
|
416
|
-
constructor(p?: IControlIWant);
|
|
417
|
-
|
|
418
|
-
/** ControlIWant messageIDs. */
|
|
419
|
-
public messageIDs: Uint8Array[];
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Encodes the specified ControlIWant message. Does not implicitly {@link ControlIWant.verify|verify} messages.
|
|
423
|
-
* @param m ControlIWant message or plain object to encode
|
|
424
|
-
* @param [w] Writer to encode to
|
|
425
|
-
* @returns Writer
|
|
426
|
-
*/
|
|
427
|
-
public static encode(m: IControlIWant, w?: $protobuf.Writer): $protobuf.Writer;
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Decodes a ControlIWant message from the specified reader or buffer.
|
|
431
|
-
* @param r Reader or buffer to decode from
|
|
432
|
-
* @param [l] Message length if known beforehand
|
|
433
|
-
* @returns ControlIWant
|
|
434
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
435
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
436
|
-
*/
|
|
437
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): ControlIWant;
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Creates a ControlIWant message from a plain object. Also converts values to their respective internal types.
|
|
441
|
-
* @param d Plain object
|
|
442
|
-
* @returns ControlIWant
|
|
443
|
-
*/
|
|
444
|
-
public static fromObject(d: { [k: string]: any }): ControlIWant;
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* Creates a plain object from a ControlIWant message. Also converts values to other types if specified.
|
|
448
|
-
* @param m ControlIWant
|
|
449
|
-
* @param [o] Conversion options
|
|
450
|
-
* @returns Plain object
|
|
451
|
-
*/
|
|
452
|
-
public static toObject(m: ControlIWant, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* Converts this ControlIWant to JSON.
|
|
456
|
-
* @returns JSON object
|
|
457
|
-
*/
|
|
458
|
-
public toJSON(): { [k: string]: any };
|
|
56
|
+
export declare namespace ControlIWant {
|
|
57
|
+
const codec: () => import("protons-runtime").Codec<ControlIWant>;
|
|
58
|
+
const encode: (obj: ControlIWant) => Uint8Array;
|
|
59
|
+
const decode: (buf: Uint8Array) => ControlIWant;
|
|
459
60
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
export interface IControlGraft {
|
|
463
|
-
|
|
464
|
-
/** ControlGraft topic */
|
|
465
|
-
topic?: (string|null);
|
|
61
|
+
export interface ControlGraft {
|
|
62
|
+
topic?: string;
|
|
466
63
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Constructs a new ControlGraft.
|
|
473
|
-
* @param [p] Properties to set
|
|
474
|
-
*/
|
|
475
|
-
constructor(p?: IControlGraft);
|
|
476
|
-
|
|
477
|
-
/** ControlGraft topic. */
|
|
478
|
-
public topic?: (string|null);
|
|
479
|
-
|
|
480
|
-
/** ControlGraft _topic. */
|
|
481
|
-
public _topic?: "topic";
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* Encodes the specified ControlGraft message. Does not implicitly {@link ControlGraft.verify|verify} messages.
|
|
485
|
-
* @param m ControlGraft message or plain object to encode
|
|
486
|
-
* @param [w] Writer to encode to
|
|
487
|
-
* @returns Writer
|
|
488
|
-
*/
|
|
489
|
-
public static encode(m: IControlGraft, w?: $protobuf.Writer): $protobuf.Writer;
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* Decodes a ControlGraft message from the specified reader or buffer.
|
|
493
|
-
* @param r Reader or buffer to decode from
|
|
494
|
-
* @param [l] Message length if known beforehand
|
|
495
|
-
* @returns ControlGraft
|
|
496
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
497
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
498
|
-
*/
|
|
499
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): ControlGraft;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Creates a ControlGraft message from a plain object. Also converts values to their respective internal types.
|
|
503
|
-
* @param d Plain object
|
|
504
|
-
* @returns ControlGraft
|
|
505
|
-
*/
|
|
506
|
-
public static fromObject(d: { [k: string]: any }): ControlGraft;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Creates a plain object from a ControlGraft message. Also converts values to other types if specified.
|
|
510
|
-
* @param m ControlGraft
|
|
511
|
-
* @param [o] Conversion options
|
|
512
|
-
* @returns Plain object
|
|
513
|
-
*/
|
|
514
|
-
public static toObject(m: ControlGraft, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* Converts this ControlGraft to JSON.
|
|
518
|
-
* @returns JSON object
|
|
519
|
-
*/
|
|
520
|
-
public toJSON(): { [k: string]: any };
|
|
64
|
+
export declare namespace ControlGraft {
|
|
65
|
+
const codec: () => import("protons-runtime").Codec<ControlGraft>;
|
|
66
|
+
const encode: (obj: ControlGraft) => Uint8Array;
|
|
67
|
+
const decode: (buf: Uint8Array) => ControlGraft;
|
|
521
68
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
/** ControlPrune topic */
|
|
527
|
-
topic?: (string|null);
|
|
528
|
-
|
|
529
|
-
/** ControlPrune peers */
|
|
530
|
-
peers?: (IPeerInfo[]|null);
|
|
531
|
-
|
|
532
|
-
/** ControlPrune backoff */
|
|
533
|
-
backoff?: (number|null);
|
|
69
|
+
export interface ControlPrune {
|
|
70
|
+
topic?: string;
|
|
71
|
+
peers: PeerInfo[];
|
|
72
|
+
backoff?: bigint;
|
|
534
73
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* Constructs a new ControlPrune.
|
|
541
|
-
* @param [p] Properties to set
|
|
542
|
-
*/
|
|
543
|
-
constructor(p?: IControlPrune);
|
|
544
|
-
|
|
545
|
-
/** ControlPrune topic. */
|
|
546
|
-
public topic?: (string|null);
|
|
547
|
-
|
|
548
|
-
/** ControlPrune peers. */
|
|
549
|
-
public peers: IPeerInfo[];
|
|
550
|
-
|
|
551
|
-
/** ControlPrune backoff. */
|
|
552
|
-
public backoff?: (number|null);
|
|
553
|
-
|
|
554
|
-
/** ControlPrune _topic. */
|
|
555
|
-
public _topic?: "topic";
|
|
556
|
-
|
|
557
|
-
/** ControlPrune _backoff. */
|
|
558
|
-
public _backoff?: "backoff";
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Encodes the specified ControlPrune message. Does not implicitly {@link ControlPrune.verify|verify} messages.
|
|
562
|
-
* @param m ControlPrune message or plain object to encode
|
|
563
|
-
* @param [w] Writer to encode to
|
|
564
|
-
* @returns Writer
|
|
565
|
-
*/
|
|
566
|
-
public static encode(m: IControlPrune, w?: $protobuf.Writer): $protobuf.Writer;
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* Decodes a ControlPrune message from the specified reader or buffer.
|
|
570
|
-
* @param r Reader or buffer to decode from
|
|
571
|
-
* @param [l] Message length if known beforehand
|
|
572
|
-
* @returns ControlPrune
|
|
573
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
574
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
575
|
-
*/
|
|
576
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): ControlPrune;
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Creates a ControlPrune message from a plain object. Also converts values to their respective internal types.
|
|
580
|
-
* @param d Plain object
|
|
581
|
-
* @returns ControlPrune
|
|
582
|
-
*/
|
|
583
|
-
public static fromObject(d: { [k: string]: any }): ControlPrune;
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Creates a plain object from a ControlPrune message. Also converts values to other types if specified.
|
|
587
|
-
* @param m ControlPrune
|
|
588
|
-
* @param [o] Conversion options
|
|
589
|
-
* @returns Plain object
|
|
590
|
-
*/
|
|
591
|
-
public static toObject(m: ControlPrune, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Converts this ControlPrune to JSON.
|
|
595
|
-
* @returns JSON object
|
|
596
|
-
*/
|
|
597
|
-
public toJSON(): { [k: string]: any };
|
|
74
|
+
export declare namespace ControlPrune {
|
|
75
|
+
const codec: () => import("protons-runtime").Codec<ControlPrune>;
|
|
76
|
+
const encode: (obj: ControlPrune) => Uint8Array;
|
|
77
|
+
const decode: (buf: Uint8Array) => ControlPrune;
|
|
598
78
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
/** PeerInfo peerID */
|
|
604
|
-
peerID?: (Uint8Array|null);
|
|
605
|
-
|
|
606
|
-
/** PeerInfo signedPeerRecord */
|
|
607
|
-
signedPeerRecord?: (Uint8Array|null);
|
|
79
|
+
export interface PeerInfo {
|
|
80
|
+
peerID?: Uint8Array;
|
|
81
|
+
signedPeerRecord?: Uint8Array;
|
|
608
82
|
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* Constructs a new PeerInfo.
|
|
615
|
-
* @param [p] Properties to set
|
|
616
|
-
*/
|
|
617
|
-
constructor(p?: IPeerInfo);
|
|
618
|
-
|
|
619
|
-
/** PeerInfo peerID. */
|
|
620
|
-
public peerID?: (Uint8Array|null);
|
|
621
|
-
|
|
622
|
-
/** PeerInfo signedPeerRecord. */
|
|
623
|
-
public signedPeerRecord?: (Uint8Array|null);
|
|
624
|
-
|
|
625
|
-
/** PeerInfo _peerID. */
|
|
626
|
-
public _peerID?: "peerID";
|
|
627
|
-
|
|
628
|
-
/** PeerInfo _signedPeerRecord. */
|
|
629
|
-
public _signedPeerRecord?: "signedPeerRecord";
|
|
630
|
-
|
|
631
|
-
/**
|
|
632
|
-
* Encodes the specified PeerInfo message. Does not implicitly {@link PeerInfo.verify|verify} messages.
|
|
633
|
-
* @param m PeerInfo message or plain object to encode
|
|
634
|
-
* @param [w] Writer to encode to
|
|
635
|
-
* @returns Writer
|
|
636
|
-
*/
|
|
637
|
-
public static encode(m: IPeerInfo, w?: $protobuf.Writer): $protobuf.Writer;
|
|
638
|
-
|
|
639
|
-
/**
|
|
640
|
-
* Decodes a PeerInfo message from the specified reader or buffer.
|
|
641
|
-
* @param r Reader or buffer to decode from
|
|
642
|
-
* @param [l] Message length if known beforehand
|
|
643
|
-
* @returns PeerInfo
|
|
644
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
645
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
646
|
-
*/
|
|
647
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): PeerInfo;
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* Creates a PeerInfo message from a plain object. Also converts values to their respective internal types.
|
|
651
|
-
* @param d Plain object
|
|
652
|
-
* @returns PeerInfo
|
|
653
|
-
*/
|
|
654
|
-
public static fromObject(d: { [k: string]: any }): PeerInfo;
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* Creates a plain object from a PeerInfo message. Also converts values to other types if specified.
|
|
658
|
-
* @param m PeerInfo
|
|
659
|
-
* @param [o] Conversion options
|
|
660
|
-
* @returns Plain object
|
|
661
|
-
*/
|
|
662
|
-
public static toObject(m: PeerInfo, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Converts this PeerInfo to JSON.
|
|
666
|
-
* @returns JSON object
|
|
667
|
-
*/
|
|
668
|
-
public toJSON(): { [k: string]: any };
|
|
83
|
+
export declare namespace PeerInfo {
|
|
84
|
+
const codec: () => import("protons-runtime").Codec<PeerInfo>;
|
|
85
|
+
const encode: (obj: PeerInfo) => Uint8Array;
|
|
86
|
+
const decode: (buf: Uint8Array) => PeerInfo;
|
|
669
87
|
}
|
|
88
|
+
//# sourceMappingURL=rpc.d.ts.map
|