@libp2p/daemon-protocol 1.0.0 → 1.0.3
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 +17 -0
- package/dist/src/index.d.ts +200 -1469
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +391 -4449
- package/dist/src/index.js.map +1 -0
- package/package.json +8 -9
- package/src/index.ts +552 -0
- package/src/index.d.ts +0 -1528
- package/src/index.js +0 -4449
package/dist/src/index.d.ts
CHANGED
|
@@ -1,1528 +1,259 @@
|
|
|
1
|
-
|
|
2
|
-
/** Properties of a Request. */
|
|
3
|
-
export interface IRequest {
|
|
4
|
-
|
|
5
|
-
/** Request type */
|
|
1
|
+
export interface Request {
|
|
6
2
|
type: Request.Type;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/** Request dht */
|
|
18
|
-
dht?: (IDHTRequest|null);
|
|
19
|
-
|
|
20
|
-
/** Request connManager */
|
|
21
|
-
connManager?: (IConnManagerRequest|null);
|
|
22
|
-
|
|
23
|
-
/** Request disconnect */
|
|
24
|
-
disconnect?: (IDisconnectRequest|null);
|
|
25
|
-
|
|
26
|
-
/** Request pubsub */
|
|
27
|
-
pubsub?: (IPSRequest|null);
|
|
28
|
-
|
|
29
|
-
/** Request peerStore */
|
|
30
|
-
peerStore?: (IPeerstoreRequest|null);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** Represents a Request. */
|
|
34
|
-
export class Request implements IRequest {
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Constructs a new Request.
|
|
38
|
-
* @param [p] Properties to set
|
|
39
|
-
*/
|
|
40
|
-
constructor(p?: IRequest);
|
|
41
|
-
|
|
42
|
-
/** Request type. */
|
|
43
|
-
public type: Request.Type;
|
|
44
|
-
|
|
45
|
-
/** Request connect. */
|
|
46
|
-
public connect?: (IConnectRequest|null);
|
|
47
|
-
|
|
48
|
-
/** Request streamOpen. */
|
|
49
|
-
public streamOpen?: (IStreamOpenRequest|null);
|
|
50
|
-
|
|
51
|
-
/** Request streamHandler. */
|
|
52
|
-
public streamHandler?: (IStreamHandlerRequest|null);
|
|
53
|
-
|
|
54
|
-
/** Request dht. */
|
|
55
|
-
public dht?: (IDHTRequest|null);
|
|
56
|
-
|
|
57
|
-
/** Request connManager. */
|
|
58
|
-
public connManager?: (IConnManagerRequest|null);
|
|
59
|
-
|
|
60
|
-
/** Request disconnect. */
|
|
61
|
-
public disconnect?: (IDisconnectRequest|null);
|
|
62
|
-
|
|
63
|
-
/** Request pubsub. */
|
|
64
|
-
public pubsub?: (IPSRequest|null);
|
|
65
|
-
|
|
66
|
-
/** Request peerStore. */
|
|
67
|
-
public peerStore?: (IPeerstoreRequest|null);
|
|
68
|
-
|
|
69
|
-
/** Request _connect. */
|
|
70
|
-
public _connect?: "connect";
|
|
71
|
-
|
|
72
|
-
/** Request _streamOpen. */
|
|
73
|
-
public _streamOpen?: "streamOpen";
|
|
74
|
-
|
|
75
|
-
/** Request _streamHandler. */
|
|
76
|
-
public _streamHandler?: "streamHandler";
|
|
77
|
-
|
|
78
|
-
/** Request _dht. */
|
|
79
|
-
public _dht?: "dht";
|
|
80
|
-
|
|
81
|
-
/** Request _connManager. */
|
|
82
|
-
public _connManager?: "connManager";
|
|
83
|
-
|
|
84
|
-
/** Request _disconnect. */
|
|
85
|
-
public _disconnect?: "disconnect";
|
|
86
|
-
|
|
87
|
-
/** Request _pubsub. */
|
|
88
|
-
public _pubsub?: "pubsub";
|
|
89
|
-
|
|
90
|
-
/** Request _peerStore. */
|
|
91
|
-
public _peerStore?: "peerStore";
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Encodes the specified Request message. Does not implicitly {@link Request.verify|verify} messages.
|
|
95
|
-
* @param m Request message or plain object to encode
|
|
96
|
-
* @param [w] Writer to encode to
|
|
97
|
-
* @returns Writer
|
|
98
|
-
*/
|
|
99
|
-
public static encode(m: IRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Decodes a Request message from the specified reader or buffer.
|
|
103
|
-
* @param r Reader or buffer to decode from
|
|
104
|
-
* @param [l] Message length if known beforehand
|
|
105
|
-
* @returns Request
|
|
106
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
107
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
108
|
-
*/
|
|
109
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): Request;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Creates a Request message from a plain object. Also converts values to their respective internal types.
|
|
113
|
-
* @param d Plain object
|
|
114
|
-
* @returns Request
|
|
115
|
-
*/
|
|
116
|
-
public static fromObject(d: { [k: string]: any }): Request;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Creates a plain object from a Request message. Also converts values to other types if specified.
|
|
120
|
-
* @param m Request
|
|
121
|
-
* @param [o] Conversion options
|
|
122
|
-
* @returns Plain object
|
|
123
|
-
*/
|
|
124
|
-
public static toObject(m: Request, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Converts this Request to JSON.
|
|
128
|
-
* @returns JSON object
|
|
129
|
-
*/
|
|
130
|
-
public toJSON(): { [k: string]: any };
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export namespace Request {
|
|
134
|
-
|
|
135
|
-
/** Type enum. */
|
|
3
|
+
connect?: ConnectRequest;
|
|
4
|
+
streamOpen?: StreamOpenRequest;
|
|
5
|
+
streamHandler?: StreamHandlerRequest;
|
|
6
|
+
dht?: DHTRequest;
|
|
7
|
+
connManager?: ConnManagerRequest;
|
|
8
|
+
disconnect?: DisconnectRequest;
|
|
9
|
+
pubsub?: PSRequest;
|
|
10
|
+
peerStore?: PeerstoreRequest;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace Request {
|
|
136
13
|
enum Type {
|
|
137
|
-
IDENTIFY =
|
|
138
|
-
CONNECT =
|
|
139
|
-
STREAM_OPEN =
|
|
140
|
-
STREAM_HANDLER =
|
|
141
|
-
DHT =
|
|
142
|
-
LIST_PEERS =
|
|
143
|
-
CONNMANAGER =
|
|
144
|
-
DISCONNECT =
|
|
145
|
-
PUBSUB =
|
|
146
|
-
PEERSTORE =
|
|
14
|
+
IDENTIFY = "IDENTIFY",
|
|
15
|
+
CONNECT = "CONNECT",
|
|
16
|
+
STREAM_OPEN = "STREAM_OPEN",
|
|
17
|
+
STREAM_HANDLER = "STREAM_HANDLER",
|
|
18
|
+
DHT = "DHT",
|
|
19
|
+
LIST_PEERS = "LIST_PEERS",
|
|
20
|
+
CONNMANAGER = "CONNMANAGER",
|
|
21
|
+
DISCONNECT = "DISCONNECT",
|
|
22
|
+
PUBSUB = "PUBSUB",
|
|
23
|
+
PEERSTORE = "PEERSTORE"
|
|
24
|
+
}
|
|
25
|
+
namespace Type {
|
|
26
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<typeof Type>;
|
|
147
27
|
}
|
|
28
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<Request>;
|
|
29
|
+
const encode: (obj: Request) => Uint8Array;
|
|
30
|
+
const decode: (buf: Uint8Array) => Request;
|
|
148
31
|
}
|
|
149
|
-
|
|
150
|
-
/** Properties of a Response. */
|
|
151
|
-
export interface IResponse {
|
|
152
|
-
|
|
153
|
-
/** Response type */
|
|
32
|
+
export interface Response {
|
|
154
33
|
type: Response.Type;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
/** Response dht */
|
|
166
|
-
dht?: (IDHTResponse|null);
|
|
167
|
-
|
|
168
|
-
/** Response peers */
|
|
169
|
-
peers?: (IPeerInfo[]|null);
|
|
170
|
-
|
|
171
|
-
/** Response pubsub */
|
|
172
|
-
pubsub?: (IPSResponse|null);
|
|
173
|
-
|
|
174
|
-
/** Response peerStore */
|
|
175
|
-
peerStore?: (IPeerstoreResponse|null);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/** Represents a Response. */
|
|
179
|
-
export class Response implements IResponse {
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Constructs a new Response.
|
|
183
|
-
* @param [p] Properties to set
|
|
184
|
-
*/
|
|
185
|
-
constructor(p?: IResponse);
|
|
186
|
-
|
|
187
|
-
/** Response type. */
|
|
188
|
-
public type: Response.Type;
|
|
189
|
-
|
|
190
|
-
/** Response error. */
|
|
191
|
-
public error?: (IErrorResponse|null);
|
|
192
|
-
|
|
193
|
-
/** Response streamInfo. */
|
|
194
|
-
public streamInfo?: (IStreamInfo|null);
|
|
195
|
-
|
|
196
|
-
/** Response identify. */
|
|
197
|
-
public identify?: (IIdentifyResponse|null);
|
|
198
|
-
|
|
199
|
-
/** Response dht. */
|
|
200
|
-
public dht?: (IDHTResponse|null);
|
|
201
|
-
|
|
202
|
-
/** Response peers. */
|
|
203
|
-
public peers: IPeerInfo[];
|
|
204
|
-
|
|
205
|
-
/** Response pubsub. */
|
|
206
|
-
public pubsub?: (IPSResponse|null);
|
|
207
|
-
|
|
208
|
-
/** Response peerStore. */
|
|
209
|
-
public peerStore?: (IPeerstoreResponse|null);
|
|
210
|
-
|
|
211
|
-
/** Response _error. */
|
|
212
|
-
public _error?: "error";
|
|
213
|
-
|
|
214
|
-
/** Response _streamInfo. */
|
|
215
|
-
public _streamInfo?: "streamInfo";
|
|
216
|
-
|
|
217
|
-
/** Response _identify. */
|
|
218
|
-
public _identify?: "identify";
|
|
219
|
-
|
|
220
|
-
/** Response _dht. */
|
|
221
|
-
public _dht?: "dht";
|
|
222
|
-
|
|
223
|
-
/** Response _pubsub. */
|
|
224
|
-
public _pubsub?: "pubsub";
|
|
225
|
-
|
|
226
|
-
/** Response _peerStore. */
|
|
227
|
-
public _peerStore?: "peerStore";
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Encodes the specified Response message. Does not implicitly {@link Response.verify|verify} messages.
|
|
231
|
-
* @param m Response message or plain object to encode
|
|
232
|
-
* @param [w] Writer to encode to
|
|
233
|
-
* @returns Writer
|
|
234
|
-
*/
|
|
235
|
-
public static encode(m: IResponse, w?: $protobuf.Writer): $protobuf.Writer;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Decodes a Response message from the specified reader or buffer.
|
|
239
|
-
* @param r Reader or buffer to decode from
|
|
240
|
-
* @param [l] Message length if known beforehand
|
|
241
|
-
* @returns Response
|
|
242
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
243
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
244
|
-
*/
|
|
245
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): Response;
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Creates a Response message from a plain object. Also converts values to their respective internal types.
|
|
249
|
-
* @param d Plain object
|
|
250
|
-
* @returns Response
|
|
251
|
-
*/
|
|
252
|
-
public static fromObject(d: { [k: string]: any }): Response;
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Creates a plain object from a Response message. Also converts values to other types if specified.
|
|
256
|
-
* @param m Response
|
|
257
|
-
* @param [o] Conversion options
|
|
258
|
-
* @returns Plain object
|
|
259
|
-
*/
|
|
260
|
-
public static toObject(m: Response, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Converts this Response to JSON.
|
|
264
|
-
* @returns JSON object
|
|
265
|
-
*/
|
|
266
|
-
public toJSON(): { [k: string]: any };
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export namespace Response {
|
|
270
|
-
|
|
271
|
-
/** Type enum. */
|
|
34
|
+
error?: ErrorResponse;
|
|
35
|
+
streamInfo?: StreamInfo;
|
|
36
|
+
identify?: IdentifyResponse;
|
|
37
|
+
dht?: DHTResponse;
|
|
38
|
+
peers: PeerInfo[];
|
|
39
|
+
pubsub?: PSResponse;
|
|
40
|
+
peerStore?: PeerstoreResponse;
|
|
41
|
+
}
|
|
42
|
+
export declare namespace Response {
|
|
272
43
|
enum Type {
|
|
273
|
-
OK =
|
|
274
|
-
ERROR =
|
|
44
|
+
OK = "OK",
|
|
45
|
+
ERROR = "ERROR"
|
|
46
|
+
}
|
|
47
|
+
namespace Type {
|
|
48
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<typeof Type>;
|
|
275
49
|
}
|
|
50
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<Response>;
|
|
51
|
+
const encode: (obj: Response) => Uint8Array;
|
|
52
|
+
const decode: (buf: Uint8Array) => Response;
|
|
276
53
|
}
|
|
277
|
-
|
|
278
|
-
/** Properties of an IdentifyResponse. */
|
|
279
|
-
export interface IIdentifyResponse {
|
|
280
|
-
|
|
281
|
-
/** IdentifyResponse id */
|
|
54
|
+
export interface IdentifyResponse {
|
|
282
55
|
id: Uint8Array;
|
|
283
|
-
|
|
284
|
-
/** IdentifyResponse addrs */
|
|
285
|
-
addrs?: (Uint8Array[]|null);
|
|
56
|
+
addrs: Uint8Array[];
|
|
286
57
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Constructs a new IdentifyResponse.
|
|
293
|
-
* @param [p] Properties to set
|
|
294
|
-
*/
|
|
295
|
-
constructor(p?: IIdentifyResponse);
|
|
296
|
-
|
|
297
|
-
/** IdentifyResponse id. */
|
|
298
|
-
public id: Uint8Array;
|
|
299
|
-
|
|
300
|
-
/** IdentifyResponse addrs. */
|
|
301
|
-
public addrs: Uint8Array[];
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Encodes the specified IdentifyResponse message. Does not implicitly {@link IdentifyResponse.verify|verify} messages.
|
|
305
|
-
* @param m IdentifyResponse message or plain object to encode
|
|
306
|
-
* @param [w] Writer to encode to
|
|
307
|
-
* @returns Writer
|
|
308
|
-
*/
|
|
309
|
-
public static encode(m: IIdentifyResponse, w?: $protobuf.Writer): $protobuf.Writer;
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Decodes an IdentifyResponse message from the specified reader or buffer.
|
|
313
|
-
* @param r Reader or buffer to decode from
|
|
314
|
-
* @param [l] Message length if known beforehand
|
|
315
|
-
* @returns IdentifyResponse
|
|
316
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
317
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
318
|
-
*/
|
|
319
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): IdentifyResponse;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Creates an IdentifyResponse message from a plain object. Also converts values to their respective internal types.
|
|
323
|
-
* @param d Plain object
|
|
324
|
-
* @returns IdentifyResponse
|
|
325
|
-
*/
|
|
326
|
-
public static fromObject(d: { [k: string]: any }): IdentifyResponse;
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Creates a plain object from an IdentifyResponse message. Also converts values to other types if specified.
|
|
330
|
-
* @param m IdentifyResponse
|
|
331
|
-
* @param [o] Conversion options
|
|
332
|
-
* @returns Plain object
|
|
333
|
-
*/
|
|
334
|
-
public static toObject(m: IdentifyResponse, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Converts this IdentifyResponse to JSON.
|
|
338
|
-
* @returns JSON object
|
|
339
|
-
*/
|
|
340
|
-
public toJSON(): { [k: string]: any };
|
|
58
|
+
export declare namespace IdentifyResponse {
|
|
59
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<IdentifyResponse>;
|
|
60
|
+
const encode: (obj: IdentifyResponse) => Uint8Array;
|
|
61
|
+
const decode: (buf: Uint8Array) => IdentifyResponse;
|
|
341
62
|
}
|
|
342
|
-
|
|
343
|
-
/** Properties of a ConnectRequest. */
|
|
344
|
-
export interface IConnectRequest {
|
|
345
|
-
|
|
346
|
-
/** ConnectRequest peer */
|
|
63
|
+
export interface ConnectRequest {
|
|
347
64
|
peer: Uint8Array;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
addrs?: (Uint8Array[]|null);
|
|
351
|
-
|
|
352
|
-
/** ConnectRequest timeout */
|
|
353
|
-
timeout?: (number|null);
|
|
65
|
+
addrs: Uint8Array[];
|
|
66
|
+
timeout?: bigint;
|
|
354
67
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* Constructs a new ConnectRequest.
|
|
361
|
-
* @param [p] Properties to set
|
|
362
|
-
*/
|
|
363
|
-
constructor(p?: IConnectRequest);
|
|
364
|
-
|
|
365
|
-
/** ConnectRequest peer. */
|
|
366
|
-
public peer: Uint8Array;
|
|
367
|
-
|
|
368
|
-
/** ConnectRequest addrs. */
|
|
369
|
-
public addrs: Uint8Array[];
|
|
370
|
-
|
|
371
|
-
/** ConnectRequest timeout. */
|
|
372
|
-
public timeout?: (number|null);
|
|
373
|
-
|
|
374
|
-
/** ConnectRequest _timeout. */
|
|
375
|
-
public _timeout?: "timeout";
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Encodes the specified ConnectRequest message. Does not implicitly {@link ConnectRequest.verify|verify} messages.
|
|
379
|
-
* @param m ConnectRequest message or plain object to encode
|
|
380
|
-
* @param [w] Writer to encode to
|
|
381
|
-
* @returns Writer
|
|
382
|
-
*/
|
|
383
|
-
public static encode(m: IConnectRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Decodes a ConnectRequest message from the specified reader or buffer.
|
|
387
|
-
* @param r Reader or buffer to decode from
|
|
388
|
-
* @param [l] Message length if known beforehand
|
|
389
|
-
* @returns ConnectRequest
|
|
390
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
391
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
392
|
-
*/
|
|
393
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): ConnectRequest;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Creates a ConnectRequest message from a plain object. Also converts values to their respective internal types.
|
|
397
|
-
* @param d Plain object
|
|
398
|
-
* @returns ConnectRequest
|
|
399
|
-
*/
|
|
400
|
-
public static fromObject(d: { [k: string]: any }): ConnectRequest;
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* Creates a plain object from a ConnectRequest message. Also converts values to other types if specified.
|
|
404
|
-
* @param m ConnectRequest
|
|
405
|
-
* @param [o] Conversion options
|
|
406
|
-
* @returns Plain object
|
|
407
|
-
*/
|
|
408
|
-
public static toObject(m: ConnectRequest, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Converts this ConnectRequest to JSON.
|
|
412
|
-
* @returns JSON object
|
|
413
|
-
*/
|
|
414
|
-
public toJSON(): { [k: string]: any };
|
|
68
|
+
export declare namespace ConnectRequest {
|
|
69
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<ConnectRequest>;
|
|
70
|
+
const encode: (obj: ConnectRequest) => Uint8Array;
|
|
71
|
+
const decode: (buf: Uint8Array) => ConnectRequest;
|
|
415
72
|
}
|
|
416
|
-
|
|
417
|
-
/** Properties of a StreamOpenRequest. */
|
|
418
|
-
export interface IStreamOpenRequest {
|
|
419
|
-
|
|
420
|
-
/** StreamOpenRequest peer */
|
|
73
|
+
export interface StreamOpenRequest {
|
|
421
74
|
peer: Uint8Array;
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
proto?: (string[]|null);
|
|
425
|
-
|
|
426
|
-
/** StreamOpenRequest timeout */
|
|
427
|
-
timeout?: (number|null);
|
|
75
|
+
proto: string[];
|
|
76
|
+
timeout?: bigint;
|
|
428
77
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Constructs a new StreamOpenRequest.
|
|
435
|
-
* @param [p] Properties to set
|
|
436
|
-
*/
|
|
437
|
-
constructor(p?: IStreamOpenRequest);
|
|
438
|
-
|
|
439
|
-
/** StreamOpenRequest peer. */
|
|
440
|
-
public peer: Uint8Array;
|
|
441
|
-
|
|
442
|
-
/** StreamOpenRequest proto. */
|
|
443
|
-
public proto: string[];
|
|
444
|
-
|
|
445
|
-
/** StreamOpenRequest timeout. */
|
|
446
|
-
public timeout?: (number|null);
|
|
447
|
-
|
|
448
|
-
/** StreamOpenRequest _timeout. */
|
|
449
|
-
public _timeout?: "timeout";
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* Encodes the specified StreamOpenRequest message. Does not implicitly {@link StreamOpenRequest.verify|verify} messages.
|
|
453
|
-
* @param m StreamOpenRequest message or plain object to encode
|
|
454
|
-
* @param [w] Writer to encode to
|
|
455
|
-
* @returns Writer
|
|
456
|
-
*/
|
|
457
|
-
public static encode(m: IStreamOpenRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Decodes a StreamOpenRequest message from the specified reader or buffer.
|
|
461
|
-
* @param r Reader or buffer to decode from
|
|
462
|
-
* @param [l] Message length if known beforehand
|
|
463
|
-
* @returns StreamOpenRequest
|
|
464
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
465
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
466
|
-
*/
|
|
467
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): StreamOpenRequest;
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* Creates a StreamOpenRequest message from a plain object. Also converts values to their respective internal types.
|
|
471
|
-
* @param d Plain object
|
|
472
|
-
* @returns StreamOpenRequest
|
|
473
|
-
*/
|
|
474
|
-
public static fromObject(d: { [k: string]: any }): StreamOpenRequest;
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* Creates a plain object from a StreamOpenRequest message. Also converts values to other types if specified.
|
|
478
|
-
* @param m StreamOpenRequest
|
|
479
|
-
* @param [o] Conversion options
|
|
480
|
-
* @returns Plain object
|
|
481
|
-
*/
|
|
482
|
-
public static toObject(m: StreamOpenRequest, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* Converts this StreamOpenRequest to JSON.
|
|
486
|
-
* @returns JSON object
|
|
487
|
-
*/
|
|
488
|
-
public toJSON(): { [k: string]: any };
|
|
78
|
+
export declare namespace StreamOpenRequest {
|
|
79
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<StreamOpenRequest>;
|
|
80
|
+
const encode: (obj: StreamOpenRequest) => Uint8Array;
|
|
81
|
+
const decode: (buf: Uint8Array) => StreamOpenRequest;
|
|
489
82
|
}
|
|
490
|
-
|
|
491
|
-
/** Properties of a StreamHandlerRequest. */
|
|
492
|
-
export interface IStreamHandlerRequest {
|
|
493
|
-
|
|
494
|
-
/** StreamHandlerRequest addr */
|
|
83
|
+
export interface StreamHandlerRequest {
|
|
495
84
|
addr: Uint8Array;
|
|
496
|
-
|
|
497
|
-
/** StreamHandlerRequest proto */
|
|
498
|
-
proto?: (string[]|null);
|
|
85
|
+
proto: string[];
|
|
499
86
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
/**
|
|
505
|
-
* Constructs a new StreamHandlerRequest.
|
|
506
|
-
* @param [p] Properties to set
|
|
507
|
-
*/
|
|
508
|
-
constructor(p?: IStreamHandlerRequest);
|
|
509
|
-
|
|
510
|
-
/** StreamHandlerRequest addr. */
|
|
511
|
-
public addr: Uint8Array;
|
|
512
|
-
|
|
513
|
-
/** StreamHandlerRequest proto. */
|
|
514
|
-
public proto: string[];
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* Encodes the specified StreamHandlerRequest message. Does not implicitly {@link StreamHandlerRequest.verify|verify} messages.
|
|
518
|
-
* @param m StreamHandlerRequest message or plain object to encode
|
|
519
|
-
* @param [w] Writer to encode to
|
|
520
|
-
* @returns Writer
|
|
521
|
-
*/
|
|
522
|
-
public static encode(m: IStreamHandlerRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Decodes a StreamHandlerRequest message from the specified reader or buffer.
|
|
526
|
-
* @param r Reader or buffer to decode from
|
|
527
|
-
* @param [l] Message length if known beforehand
|
|
528
|
-
* @returns StreamHandlerRequest
|
|
529
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
530
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
531
|
-
*/
|
|
532
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): StreamHandlerRequest;
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Creates a StreamHandlerRequest message from a plain object. Also converts values to their respective internal types.
|
|
536
|
-
* @param d Plain object
|
|
537
|
-
* @returns StreamHandlerRequest
|
|
538
|
-
*/
|
|
539
|
-
public static fromObject(d: { [k: string]: any }): StreamHandlerRequest;
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Creates a plain object from a StreamHandlerRequest message. Also converts values to other types if specified.
|
|
543
|
-
* @param m StreamHandlerRequest
|
|
544
|
-
* @param [o] Conversion options
|
|
545
|
-
* @returns Plain object
|
|
546
|
-
*/
|
|
547
|
-
public static toObject(m: StreamHandlerRequest, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Converts this StreamHandlerRequest to JSON.
|
|
551
|
-
* @returns JSON object
|
|
552
|
-
*/
|
|
553
|
-
public toJSON(): { [k: string]: any };
|
|
87
|
+
export declare namespace StreamHandlerRequest {
|
|
88
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<StreamHandlerRequest>;
|
|
89
|
+
const encode: (obj: StreamHandlerRequest) => Uint8Array;
|
|
90
|
+
const decode: (buf: Uint8Array) => StreamHandlerRequest;
|
|
554
91
|
}
|
|
555
|
-
|
|
556
|
-
/** Properties of an ErrorResponse. */
|
|
557
|
-
export interface IErrorResponse {
|
|
558
|
-
|
|
559
|
-
/** ErrorResponse msg */
|
|
92
|
+
export interface ErrorResponse {
|
|
560
93
|
msg: string;
|
|
561
94
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* Constructs a new ErrorResponse.
|
|
568
|
-
* @param [p] Properties to set
|
|
569
|
-
*/
|
|
570
|
-
constructor(p?: IErrorResponse);
|
|
571
|
-
|
|
572
|
-
/** ErrorResponse msg. */
|
|
573
|
-
public msg: string;
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Encodes the specified ErrorResponse message. Does not implicitly {@link ErrorResponse.verify|verify} messages.
|
|
577
|
-
* @param m ErrorResponse message or plain object to encode
|
|
578
|
-
* @param [w] Writer to encode to
|
|
579
|
-
* @returns Writer
|
|
580
|
-
*/
|
|
581
|
-
public static encode(m: IErrorResponse, w?: $protobuf.Writer): $protobuf.Writer;
|
|
582
|
-
|
|
583
|
-
/**
|
|
584
|
-
* Decodes an ErrorResponse message from the specified reader or buffer.
|
|
585
|
-
* @param r Reader or buffer to decode from
|
|
586
|
-
* @param [l] Message length if known beforehand
|
|
587
|
-
* @returns ErrorResponse
|
|
588
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
589
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
590
|
-
*/
|
|
591
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): ErrorResponse;
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Creates an ErrorResponse message from a plain object. Also converts values to their respective internal types.
|
|
595
|
-
* @param d Plain object
|
|
596
|
-
* @returns ErrorResponse
|
|
597
|
-
*/
|
|
598
|
-
public static fromObject(d: { [k: string]: any }): ErrorResponse;
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* Creates a plain object from an ErrorResponse message. Also converts values to other types if specified.
|
|
602
|
-
* @param m ErrorResponse
|
|
603
|
-
* @param [o] Conversion options
|
|
604
|
-
* @returns Plain object
|
|
605
|
-
*/
|
|
606
|
-
public static toObject(m: ErrorResponse, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Converts this ErrorResponse to JSON.
|
|
610
|
-
* @returns JSON object
|
|
611
|
-
*/
|
|
612
|
-
public toJSON(): { [k: string]: any };
|
|
95
|
+
export declare namespace ErrorResponse {
|
|
96
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<ErrorResponse>;
|
|
97
|
+
const encode: (obj: ErrorResponse) => Uint8Array;
|
|
98
|
+
const decode: (buf: Uint8Array) => ErrorResponse;
|
|
613
99
|
}
|
|
614
|
-
|
|
615
|
-
/** Properties of a StreamInfo. */
|
|
616
|
-
export interface IStreamInfo {
|
|
617
|
-
|
|
618
|
-
/** StreamInfo peer */
|
|
100
|
+
export interface StreamInfo {
|
|
619
101
|
peer: Uint8Array;
|
|
620
|
-
|
|
621
|
-
/** StreamInfo addr */
|
|
622
102
|
addr: Uint8Array;
|
|
623
|
-
|
|
624
|
-
/** StreamInfo proto */
|
|
625
103
|
proto: string;
|
|
626
104
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
/**
|
|
632
|
-
* Constructs a new StreamInfo.
|
|
633
|
-
* @param [p] Properties to set
|
|
634
|
-
*/
|
|
635
|
-
constructor(p?: IStreamInfo);
|
|
636
|
-
|
|
637
|
-
/** StreamInfo peer. */
|
|
638
|
-
public peer: Uint8Array;
|
|
639
|
-
|
|
640
|
-
/** StreamInfo addr. */
|
|
641
|
-
public addr: Uint8Array;
|
|
642
|
-
|
|
643
|
-
/** StreamInfo proto. */
|
|
644
|
-
public proto: string;
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* Encodes the specified StreamInfo message. Does not implicitly {@link StreamInfo.verify|verify} messages.
|
|
648
|
-
* @param m StreamInfo message or plain object to encode
|
|
649
|
-
* @param [w] Writer to encode to
|
|
650
|
-
* @returns Writer
|
|
651
|
-
*/
|
|
652
|
-
public static encode(m: IStreamInfo, w?: $protobuf.Writer): $protobuf.Writer;
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* Decodes a StreamInfo message from the specified reader or buffer.
|
|
656
|
-
* @param r Reader or buffer to decode from
|
|
657
|
-
* @param [l] Message length if known beforehand
|
|
658
|
-
* @returns StreamInfo
|
|
659
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
660
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
661
|
-
*/
|
|
662
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): StreamInfo;
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Creates a StreamInfo message from a plain object. Also converts values to their respective internal types.
|
|
666
|
-
* @param d Plain object
|
|
667
|
-
* @returns StreamInfo
|
|
668
|
-
*/
|
|
669
|
-
public static fromObject(d: { [k: string]: any }): StreamInfo;
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* Creates a plain object from a StreamInfo message. Also converts values to other types if specified.
|
|
673
|
-
* @param m StreamInfo
|
|
674
|
-
* @param [o] Conversion options
|
|
675
|
-
* @returns Plain object
|
|
676
|
-
*/
|
|
677
|
-
public static toObject(m: StreamInfo, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* Converts this StreamInfo to JSON.
|
|
681
|
-
* @returns JSON object
|
|
682
|
-
*/
|
|
683
|
-
public toJSON(): { [k: string]: any };
|
|
105
|
+
export declare namespace StreamInfo {
|
|
106
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<StreamInfo>;
|
|
107
|
+
const encode: (obj: StreamInfo) => Uint8Array;
|
|
108
|
+
const decode: (buf: Uint8Array) => StreamInfo;
|
|
684
109
|
}
|
|
685
|
-
|
|
686
|
-
/** Properties of a DHTRequest. */
|
|
687
|
-
export interface IDHTRequest {
|
|
688
|
-
|
|
689
|
-
/** DHTRequest type */
|
|
110
|
+
export interface DHTRequest {
|
|
690
111
|
type: DHTRequest.Type;
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
key?: (Uint8Array|null);
|
|
700
|
-
|
|
701
|
-
/** DHTRequest value */
|
|
702
|
-
value?: (Uint8Array|null);
|
|
703
|
-
|
|
704
|
-
/** DHTRequest count */
|
|
705
|
-
count?: (number|null);
|
|
706
|
-
|
|
707
|
-
/** DHTRequest timeout */
|
|
708
|
-
timeout?: (number|null);
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
/** Represents a DHTRequest. */
|
|
712
|
-
export class DHTRequest implements IDHTRequest {
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* Constructs a new DHTRequest.
|
|
716
|
-
* @param [p] Properties to set
|
|
717
|
-
*/
|
|
718
|
-
constructor(p?: IDHTRequest);
|
|
719
|
-
|
|
720
|
-
/** DHTRequest type. */
|
|
721
|
-
public type: DHTRequest.Type;
|
|
722
|
-
|
|
723
|
-
/** DHTRequest peer. */
|
|
724
|
-
public peer?: (Uint8Array|null);
|
|
725
|
-
|
|
726
|
-
/** DHTRequest cid. */
|
|
727
|
-
public cid?: (Uint8Array|null);
|
|
728
|
-
|
|
729
|
-
/** DHTRequest key. */
|
|
730
|
-
public key?: (Uint8Array|null);
|
|
731
|
-
|
|
732
|
-
/** DHTRequest value. */
|
|
733
|
-
public value?: (Uint8Array|null);
|
|
734
|
-
|
|
735
|
-
/** DHTRequest count. */
|
|
736
|
-
public count?: (number|null);
|
|
737
|
-
|
|
738
|
-
/** DHTRequest timeout. */
|
|
739
|
-
public timeout?: (number|null);
|
|
740
|
-
|
|
741
|
-
/** DHTRequest _peer. */
|
|
742
|
-
public _peer?: "peer";
|
|
743
|
-
|
|
744
|
-
/** DHTRequest _cid. */
|
|
745
|
-
public _cid?: "cid";
|
|
746
|
-
|
|
747
|
-
/** DHTRequest _key. */
|
|
748
|
-
public _key?: "key";
|
|
749
|
-
|
|
750
|
-
/** DHTRequest _value. */
|
|
751
|
-
public _value?: "value";
|
|
752
|
-
|
|
753
|
-
/** DHTRequest _count. */
|
|
754
|
-
public _count?: "count";
|
|
755
|
-
|
|
756
|
-
/** DHTRequest _timeout. */
|
|
757
|
-
public _timeout?: "timeout";
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* Encodes the specified DHTRequest message. Does not implicitly {@link DHTRequest.verify|verify} messages.
|
|
761
|
-
* @param m DHTRequest message or plain object to encode
|
|
762
|
-
* @param [w] Writer to encode to
|
|
763
|
-
* @returns Writer
|
|
764
|
-
*/
|
|
765
|
-
public static encode(m: IDHTRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* Decodes a DHTRequest message from the specified reader or buffer.
|
|
769
|
-
* @param r Reader or buffer to decode from
|
|
770
|
-
* @param [l] Message length if known beforehand
|
|
771
|
-
* @returns DHTRequest
|
|
772
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
773
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
774
|
-
*/
|
|
775
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): DHTRequest;
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* Creates a DHTRequest message from a plain object. Also converts values to their respective internal types.
|
|
779
|
-
* @param d Plain object
|
|
780
|
-
* @returns DHTRequest
|
|
781
|
-
*/
|
|
782
|
-
public static fromObject(d: { [k: string]: any }): DHTRequest;
|
|
783
|
-
|
|
784
|
-
/**
|
|
785
|
-
* Creates a plain object from a DHTRequest message. Also converts values to other types if specified.
|
|
786
|
-
* @param m DHTRequest
|
|
787
|
-
* @param [o] Conversion options
|
|
788
|
-
* @returns Plain object
|
|
789
|
-
*/
|
|
790
|
-
public static toObject(m: DHTRequest, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Converts this DHTRequest to JSON.
|
|
794
|
-
* @returns JSON object
|
|
795
|
-
*/
|
|
796
|
-
public toJSON(): { [k: string]: any };
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
export namespace DHTRequest {
|
|
800
|
-
|
|
801
|
-
/** Type enum. */
|
|
112
|
+
peer?: Uint8Array;
|
|
113
|
+
cid?: Uint8Array;
|
|
114
|
+
key?: Uint8Array;
|
|
115
|
+
value?: Uint8Array;
|
|
116
|
+
count?: number;
|
|
117
|
+
timeout?: bigint;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace DHTRequest {
|
|
802
120
|
enum Type {
|
|
803
|
-
FIND_PEER =
|
|
804
|
-
FIND_PEERS_CONNECTED_TO_PEER =
|
|
805
|
-
FIND_PROVIDERS =
|
|
806
|
-
GET_CLOSEST_PEERS =
|
|
807
|
-
GET_PUBLIC_KEY =
|
|
808
|
-
GET_VALUE =
|
|
809
|
-
SEARCH_VALUE =
|
|
810
|
-
PUT_VALUE =
|
|
811
|
-
PROVIDE =
|
|
121
|
+
FIND_PEER = "FIND_PEER",
|
|
122
|
+
FIND_PEERS_CONNECTED_TO_PEER = "FIND_PEERS_CONNECTED_TO_PEER",
|
|
123
|
+
FIND_PROVIDERS = "FIND_PROVIDERS",
|
|
124
|
+
GET_CLOSEST_PEERS = "GET_CLOSEST_PEERS",
|
|
125
|
+
GET_PUBLIC_KEY = "GET_PUBLIC_KEY",
|
|
126
|
+
GET_VALUE = "GET_VALUE",
|
|
127
|
+
SEARCH_VALUE = "SEARCH_VALUE",
|
|
128
|
+
PUT_VALUE = "PUT_VALUE",
|
|
129
|
+
PROVIDE = "PROVIDE"
|
|
130
|
+
}
|
|
131
|
+
namespace Type {
|
|
132
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<typeof Type>;
|
|
812
133
|
}
|
|
134
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<DHTRequest>;
|
|
135
|
+
const encode: (obj: DHTRequest) => Uint8Array;
|
|
136
|
+
const decode: (buf: Uint8Array) => DHTRequest;
|
|
813
137
|
}
|
|
814
|
-
|
|
815
|
-
/** Properties of a DHTResponse. */
|
|
816
|
-
export interface IDHTResponse {
|
|
817
|
-
|
|
818
|
-
/** DHTResponse type */
|
|
138
|
+
export interface DHTResponse {
|
|
819
139
|
type: DHTResponse.Type;
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
peer?: (IPeerInfo|null);
|
|
823
|
-
|
|
824
|
-
/** DHTResponse value */
|
|
825
|
-
value?: (Uint8Array|null);
|
|
140
|
+
peer?: PeerInfo;
|
|
141
|
+
value?: Uint8Array;
|
|
826
142
|
}
|
|
827
|
-
|
|
828
|
-
/** Represents a DHTResponse. */
|
|
829
|
-
export class DHTResponse implements IDHTResponse {
|
|
830
|
-
|
|
831
|
-
/**
|
|
832
|
-
* Constructs a new DHTResponse.
|
|
833
|
-
* @param [p] Properties to set
|
|
834
|
-
*/
|
|
835
|
-
constructor(p?: IDHTResponse);
|
|
836
|
-
|
|
837
|
-
/** DHTResponse type. */
|
|
838
|
-
public type: DHTResponse.Type;
|
|
839
|
-
|
|
840
|
-
/** DHTResponse peer. */
|
|
841
|
-
public peer?: (IPeerInfo|null);
|
|
842
|
-
|
|
843
|
-
/** DHTResponse value. */
|
|
844
|
-
public value?: (Uint8Array|null);
|
|
845
|
-
|
|
846
|
-
/** DHTResponse _peer. */
|
|
847
|
-
public _peer?: "peer";
|
|
848
|
-
|
|
849
|
-
/** DHTResponse _value. */
|
|
850
|
-
public _value?: "value";
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
* Encodes the specified DHTResponse message. Does not implicitly {@link DHTResponse.verify|verify} messages.
|
|
854
|
-
* @param m DHTResponse message or plain object to encode
|
|
855
|
-
* @param [w] Writer to encode to
|
|
856
|
-
* @returns Writer
|
|
857
|
-
*/
|
|
858
|
-
public static encode(m: IDHTResponse, w?: $protobuf.Writer): $protobuf.Writer;
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* Decodes a DHTResponse message from the specified reader or buffer.
|
|
862
|
-
* @param r Reader or buffer to decode from
|
|
863
|
-
* @param [l] Message length if known beforehand
|
|
864
|
-
* @returns DHTResponse
|
|
865
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
866
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
867
|
-
*/
|
|
868
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): DHTResponse;
|
|
869
|
-
|
|
870
|
-
/**
|
|
871
|
-
* Creates a DHTResponse message from a plain object. Also converts values to their respective internal types.
|
|
872
|
-
* @param d Plain object
|
|
873
|
-
* @returns DHTResponse
|
|
874
|
-
*/
|
|
875
|
-
public static fromObject(d: { [k: string]: any }): DHTResponse;
|
|
876
|
-
|
|
877
|
-
/**
|
|
878
|
-
* Creates a plain object from a DHTResponse message. Also converts values to other types if specified.
|
|
879
|
-
* @param m DHTResponse
|
|
880
|
-
* @param [o] Conversion options
|
|
881
|
-
* @returns Plain object
|
|
882
|
-
*/
|
|
883
|
-
public static toObject(m: DHTResponse, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
884
|
-
|
|
885
|
-
/**
|
|
886
|
-
* Converts this DHTResponse to JSON.
|
|
887
|
-
* @returns JSON object
|
|
888
|
-
*/
|
|
889
|
-
public toJSON(): { [k: string]: any };
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
export namespace DHTResponse {
|
|
893
|
-
|
|
894
|
-
/** Type enum. */
|
|
143
|
+
export declare namespace DHTResponse {
|
|
895
144
|
enum Type {
|
|
896
|
-
BEGIN =
|
|
897
|
-
VALUE =
|
|
898
|
-
END =
|
|
145
|
+
BEGIN = "BEGIN",
|
|
146
|
+
VALUE = "VALUE",
|
|
147
|
+
END = "END"
|
|
148
|
+
}
|
|
149
|
+
namespace Type {
|
|
150
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<typeof Type>;
|
|
899
151
|
}
|
|
152
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<DHTResponse>;
|
|
153
|
+
const encode: (obj: DHTResponse) => Uint8Array;
|
|
154
|
+
const decode: (buf: Uint8Array) => DHTResponse;
|
|
900
155
|
}
|
|
901
|
-
|
|
902
|
-
/** Properties of a PeerInfo. */
|
|
903
|
-
export interface IPeerInfo {
|
|
904
|
-
|
|
905
|
-
/** PeerInfo id */
|
|
156
|
+
export interface PeerInfo {
|
|
906
157
|
id: Uint8Array;
|
|
907
|
-
|
|
908
|
-
/** PeerInfo addrs */
|
|
909
|
-
addrs?: (Uint8Array[]|null);
|
|
158
|
+
addrs: Uint8Array[];
|
|
910
159
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* Constructs a new PeerInfo.
|
|
917
|
-
* @param [p] Properties to set
|
|
918
|
-
*/
|
|
919
|
-
constructor(p?: IPeerInfo);
|
|
920
|
-
|
|
921
|
-
/** PeerInfo id. */
|
|
922
|
-
public id: Uint8Array;
|
|
923
|
-
|
|
924
|
-
/** PeerInfo addrs. */
|
|
925
|
-
public addrs: Uint8Array[];
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
* Encodes the specified PeerInfo message. Does not implicitly {@link PeerInfo.verify|verify} messages.
|
|
929
|
-
* @param m PeerInfo message or plain object to encode
|
|
930
|
-
* @param [w] Writer to encode to
|
|
931
|
-
* @returns Writer
|
|
932
|
-
*/
|
|
933
|
-
public static encode(m: IPeerInfo, w?: $protobuf.Writer): $protobuf.Writer;
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* Decodes a PeerInfo message from the specified reader or buffer.
|
|
937
|
-
* @param r Reader or buffer to decode from
|
|
938
|
-
* @param [l] Message length if known beforehand
|
|
939
|
-
* @returns PeerInfo
|
|
940
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
941
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
942
|
-
*/
|
|
943
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): PeerInfo;
|
|
944
|
-
|
|
945
|
-
/**
|
|
946
|
-
* Creates a PeerInfo message from a plain object. Also converts values to their respective internal types.
|
|
947
|
-
* @param d Plain object
|
|
948
|
-
* @returns PeerInfo
|
|
949
|
-
*/
|
|
950
|
-
public static fromObject(d: { [k: string]: any }): PeerInfo;
|
|
951
|
-
|
|
952
|
-
/**
|
|
953
|
-
* Creates a plain object from a PeerInfo message. Also converts values to other types if specified.
|
|
954
|
-
* @param m PeerInfo
|
|
955
|
-
* @param [o] Conversion options
|
|
956
|
-
* @returns Plain object
|
|
957
|
-
*/
|
|
958
|
-
public static toObject(m: PeerInfo, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* Converts this PeerInfo to JSON.
|
|
962
|
-
* @returns JSON object
|
|
963
|
-
*/
|
|
964
|
-
public toJSON(): { [k: string]: any };
|
|
160
|
+
export declare namespace PeerInfo {
|
|
161
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<PeerInfo>;
|
|
162
|
+
const encode: (obj: PeerInfo) => Uint8Array;
|
|
163
|
+
const decode: (buf: Uint8Array) => PeerInfo;
|
|
965
164
|
}
|
|
966
|
-
|
|
967
|
-
/** Properties of a ConnManagerRequest. */
|
|
968
|
-
export interface IConnManagerRequest {
|
|
969
|
-
|
|
970
|
-
/** ConnManagerRequest type */
|
|
165
|
+
export interface ConnManagerRequest {
|
|
971
166
|
type: ConnManagerRequest.Type;
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
/** ConnManagerRequest tag */
|
|
977
|
-
tag?: (string|null);
|
|
978
|
-
|
|
979
|
-
/** ConnManagerRequest weight */
|
|
980
|
-
weight?: (number|null);
|
|
167
|
+
peer?: Uint8Array;
|
|
168
|
+
tag?: string;
|
|
169
|
+
weight?: bigint;
|
|
981
170
|
}
|
|
982
|
-
|
|
983
|
-
/** Represents a ConnManagerRequest. */
|
|
984
|
-
export class ConnManagerRequest implements IConnManagerRequest {
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* Constructs a new ConnManagerRequest.
|
|
988
|
-
* @param [p] Properties to set
|
|
989
|
-
*/
|
|
990
|
-
constructor(p?: IConnManagerRequest);
|
|
991
|
-
|
|
992
|
-
/** ConnManagerRequest type. */
|
|
993
|
-
public type: ConnManagerRequest.Type;
|
|
994
|
-
|
|
995
|
-
/** ConnManagerRequest peer. */
|
|
996
|
-
public peer?: (Uint8Array|null);
|
|
997
|
-
|
|
998
|
-
/** ConnManagerRequest tag. */
|
|
999
|
-
public tag?: (string|null);
|
|
1000
|
-
|
|
1001
|
-
/** ConnManagerRequest weight. */
|
|
1002
|
-
public weight?: (number|null);
|
|
1003
|
-
|
|
1004
|
-
/** ConnManagerRequest _peer. */
|
|
1005
|
-
public _peer?: "peer";
|
|
1006
|
-
|
|
1007
|
-
/** ConnManagerRequest _tag. */
|
|
1008
|
-
public _tag?: "tag";
|
|
1009
|
-
|
|
1010
|
-
/** ConnManagerRequest _weight. */
|
|
1011
|
-
public _weight?: "weight";
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* Encodes the specified ConnManagerRequest message. Does not implicitly {@link ConnManagerRequest.verify|verify} messages.
|
|
1015
|
-
* @param m ConnManagerRequest message or plain object to encode
|
|
1016
|
-
* @param [w] Writer to encode to
|
|
1017
|
-
* @returns Writer
|
|
1018
|
-
*/
|
|
1019
|
-
public static encode(m: IConnManagerRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
1020
|
-
|
|
1021
|
-
/**
|
|
1022
|
-
* Decodes a ConnManagerRequest message from the specified reader or buffer.
|
|
1023
|
-
* @param r Reader or buffer to decode from
|
|
1024
|
-
* @param [l] Message length if known beforehand
|
|
1025
|
-
* @returns ConnManagerRequest
|
|
1026
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1027
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1028
|
-
*/
|
|
1029
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): ConnManagerRequest;
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* Creates a ConnManagerRequest message from a plain object. Also converts values to their respective internal types.
|
|
1033
|
-
* @param d Plain object
|
|
1034
|
-
* @returns ConnManagerRequest
|
|
1035
|
-
*/
|
|
1036
|
-
public static fromObject(d: { [k: string]: any }): ConnManagerRequest;
|
|
1037
|
-
|
|
1038
|
-
/**
|
|
1039
|
-
* Creates a plain object from a ConnManagerRequest message. Also converts values to other types if specified.
|
|
1040
|
-
* @param m ConnManagerRequest
|
|
1041
|
-
* @param [o] Conversion options
|
|
1042
|
-
* @returns Plain object
|
|
1043
|
-
*/
|
|
1044
|
-
public static toObject(m: ConnManagerRequest, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1045
|
-
|
|
1046
|
-
/**
|
|
1047
|
-
* Converts this ConnManagerRequest to JSON.
|
|
1048
|
-
* @returns JSON object
|
|
1049
|
-
*/
|
|
1050
|
-
public toJSON(): { [k: string]: any };
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
export namespace ConnManagerRequest {
|
|
1054
|
-
|
|
1055
|
-
/** Type enum. */
|
|
171
|
+
export declare namespace ConnManagerRequest {
|
|
1056
172
|
enum Type {
|
|
1057
|
-
TAG_PEER =
|
|
1058
|
-
UNTAG_PEER =
|
|
1059
|
-
TRIM =
|
|
173
|
+
TAG_PEER = "TAG_PEER",
|
|
174
|
+
UNTAG_PEER = "UNTAG_PEER",
|
|
175
|
+
TRIM = "TRIM"
|
|
176
|
+
}
|
|
177
|
+
namespace Type {
|
|
178
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<typeof Type>;
|
|
1060
179
|
}
|
|
180
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<ConnManagerRequest>;
|
|
181
|
+
const encode: (obj: ConnManagerRequest) => Uint8Array;
|
|
182
|
+
const decode: (buf: Uint8Array) => ConnManagerRequest;
|
|
1061
183
|
}
|
|
1062
|
-
|
|
1063
|
-
/** Properties of a DisconnectRequest. */
|
|
1064
|
-
export interface IDisconnectRequest {
|
|
1065
|
-
|
|
1066
|
-
/** DisconnectRequest peer */
|
|
184
|
+
export interface DisconnectRequest {
|
|
1067
185
|
peer: Uint8Array;
|
|
1068
186
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
/**
|
|
1074
|
-
* Constructs a new DisconnectRequest.
|
|
1075
|
-
* @param [p] Properties to set
|
|
1076
|
-
*/
|
|
1077
|
-
constructor(p?: IDisconnectRequest);
|
|
1078
|
-
|
|
1079
|
-
/** DisconnectRequest peer. */
|
|
1080
|
-
public peer: Uint8Array;
|
|
1081
|
-
|
|
1082
|
-
/**
|
|
1083
|
-
* Encodes the specified DisconnectRequest message. Does not implicitly {@link DisconnectRequest.verify|verify} messages.
|
|
1084
|
-
* @param m DisconnectRequest message or plain object to encode
|
|
1085
|
-
* @param [w] Writer to encode to
|
|
1086
|
-
* @returns Writer
|
|
1087
|
-
*/
|
|
1088
|
-
public static encode(m: IDisconnectRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* Decodes a DisconnectRequest message from the specified reader or buffer.
|
|
1092
|
-
* @param r Reader or buffer to decode from
|
|
1093
|
-
* @param [l] Message length if known beforehand
|
|
1094
|
-
* @returns DisconnectRequest
|
|
1095
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1096
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1097
|
-
*/
|
|
1098
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): DisconnectRequest;
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* Creates a DisconnectRequest message from a plain object. Also converts values to their respective internal types.
|
|
1102
|
-
* @param d Plain object
|
|
1103
|
-
* @returns DisconnectRequest
|
|
1104
|
-
*/
|
|
1105
|
-
public static fromObject(d: { [k: string]: any }): DisconnectRequest;
|
|
1106
|
-
|
|
1107
|
-
/**
|
|
1108
|
-
* Creates a plain object from a DisconnectRequest message. Also converts values to other types if specified.
|
|
1109
|
-
* @param m DisconnectRequest
|
|
1110
|
-
* @param [o] Conversion options
|
|
1111
|
-
* @returns Plain object
|
|
1112
|
-
*/
|
|
1113
|
-
public static toObject(m: DisconnectRequest, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
* Converts this DisconnectRequest to JSON.
|
|
1117
|
-
* @returns JSON object
|
|
1118
|
-
*/
|
|
1119
|
-
public toJSON(): { [k: string]: any };
|
|
187
|
+
export declare namespace DisconnectRequest {
|
|
188
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<DisconnectRequest>;
|
|
189
|
+
const encode: (obj: DisconnectRequest) => Uint8Array;
|
|
190
|
+
const decode: (buf: Uint8Array) => DisconnectRequest;
|
|
1120
191
|
}
|
|
1121
|
-
|
|
1122
|
-
/** Properties of a PSRequest. */
|
|
1123
|
-
export interface IPSRequest {
|
|
1124
|
-
|
|
1125
|
-
/** PSRequest type */
|
|
192
|
+
export interface PSRequest {
|
|
1126
193
|
type: PSRequest.Type;
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
topic?: (string|null);
|
|
1130
|
-
|
|
1131
|
-
/** PSRequest data */
|
|
1132
|
-
data?: (Uint8Array|null);
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
/** Represents a PSRequest. */
|
|
1136
|
-
export class PSRequest implements IPSRequest {
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Constructs a new PSRequest.
|
|
1140
|
-
* @param [p] Properties to set
|
|
1141
|
-
*/
|
|
1142
|
-
constructor(p?: IPSRequest);
|
|
1143
|
-
|
|
1144
|
-
/** PSRequest type. */
|
|
1145
|
-
public type: PSRequest.Type;
|
|
1146
|
-
|
|
1147
|
-
/** PSRequest topic. */
|
|
1148
|
-
public topic?: (string|null);
|
|
1149
|
-
|
|
1150
|
-
/** PSRequest data. */
|
|
1151
|
-
public data?: (Uint8Array|null);
|
|
1152
|
-
|
|
1153
|
-
/** PSRequest _topic. */
|
|
1154
|
-
public _topic?: "topic";
|
|
1155
|
-
|
|
1156
|
-
/** PSRequest _data. */
|
|
1157
|
-
public _data?: "data";
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
* Encodes the specified PSRequest message. Does not implicitly {@link PSRequest.verify|verify} messages.
|
|
1161
|
-
* @param m PSRequest message or plain object to encode
|
|
1162
|
-
* @param [w] Writer to encode to
|
|
1163
|
-
* @returns Writer
|
|
1164
|
-
*/
|
|
1165
|
-
public static encode(m: IPSRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
1166
|
-
|
|
1167
|
-
/**
|
|
1168
|
-
* Decodes a PSRequest message from the specified reader or buffer.
|
|
1169
|
-
* @param r Reader or buffer to decode from
|
|
1170
|
-
* @param [l] Message length if known beforehand
|
|
1171
|
-
* @returns PSRequest
|
|
1172
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1173
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1174
|
-
*/
|
|
1175
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): PSRequest;
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
* Creates a PSRequest message from a plain object. Also converts values to their respective internal types.
|
|
1179
|
-
* @param d Plain object
|
|
1180
|
-
* @returns PSRequest
|
|
1181
|
-
*/
|
|
1182
|
-
public static fromObject(d: { [k: string]: any }): PSRequest;
|
|
1183
|
-
|
|
1184
|
-
/**
|
|
1185
|
-
* Creates a plain object from a PSRequest message. Also converts values to other types if specified.
|
|
1186
|
-
* @param m PSRequest
|
|
1187
|
-
* @param [o] Conversion options
|
|
1188
|
-
* @returns Plain object
|
|
1189
|
-
*/
|
|
1190
|
-
public static toObject(m: PSRequest, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1191
|
-
|
|
1192
|
-
/**
|
|
1193
|
-
* Converts this PSRequest to JSON.
|
|
1194
|
-
* @returns JSON object
|
|
1195
|
-
*/
|
|
1196
|
-
public toJSON(): { [k: string]: any };
|
|
194
|
+
topic?: string;
|
|
195
|
+
data?: Uint8Array;
|
|
1197
196
|
}
|
|
1198
|
-
|
|
1199
|
-
export namespace PSRequest {
|
|
1200
|
-
|
|
1201
|
-
/** Type enum. */
|
|
197
|
+
export declare namespace PSRequest {
|
|
1202
198
|
enum Type {
|
|
1203
|
-
GET_TOPICS =
|
|
1204
|
-
LIST_PEERS =
|
|
1205
|
-
PUBLISH =
|
|
1206
|
-
SUBSCRIBE =
|
|
199
|
+
GET_TOPICS = "GET_TOPICS",
|
|
200
|
+
LIST_PEERS = "LIST_PEERS",
|
|
201
|
+
PUBLISH = "PUBLISH",
|
|
202
|
+
SUBSCRIBE = "SUBSCRIBE"
|
|
1207
203
|
}
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
data?:
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
*/
|
|
1239
|
-
constructor(p?: IPSMessage);
|
|
1240
|
-
|
|
1241
|
-
/** PSMessage from. */
|
|
1242
|
-
public from?: (Uint8Array|null);
|
|
1243
|
-
|
|
1244
|
-
/** PSMessage data. */
|
|
1245
|
-
public data?: (Uint8Array|null);
|
|
1246
|
-
|
|
1247
|
-
/** PSMessage seqno. */
|
|
1248
|
-
public seqno?: (Uint8Array|null);
|
|
1249
|
-
|
|
1250
|
-
/** PSMessage topicIDs. */
|
|
1251
|
-
public topicIDs: string[];
|
|
1252
|
-
|
|
1253
|
-
/** PSMessage signature. */
|
|
1254
|
-
public signature?: (Uint8Array|null);
|
|
1255
|
-
|
|
1256
|
-
/** PSMessage key. */
|
|
1257
|
-
public key?: (Uint8Array|null);
|
|
1258
|
-
|
|
1259
|
-
/** PSMessage _from. */
|
|
1260
|
-
public _from?: "from";
|
|
1261
|
-
|
|
1262
|
-
/** PSMessage _data. */
|
|
1263
|
-
public _data?: "data";
|
|
1264
|
-
|
|
1265
|
-
/** PSMessage _seqno. */
|
|
1266
|
-
public _seqno?: "seqno";
|
|
1267
|
-
|
|
1268
|
-
/** PSMessage _signature. */
|
|
1269
|
-
public _signature?: "signature";
|
|
1270
|
-
|
|
1271
|
-
/** PSMessage _key. */
|
|
1272
|
-
public _key?: "key";
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* Encodes the specified PSMessage message. Does not implicitly {@link PSMessage.verify|verify} messages.
|
|
1276
|
-
* @param m PSMessage message or plain object to encode
|
|
1277
|
-
* @param [w] Writer to encode to
|
|
1278
|
-
* @returns Writer
|
|
1279
|
-
*/
|
|
1280
|
-
public static encode(m: IPSMessage, w?: $protobuf.Writer): $protobuf.Writer;
|
|
1281
|
-
|
|
1282
|
-
/**
|
|
1283
|
-
* Decodes a PSMessage message from the specified reader or buffer.
|
|
1284
|
-
* @param r Reader or buffer to decode from
|
|
1285
|
-
* @param [l] Message length if known beforehand
|
|
1286
|
-
* @returns PSMessage
|
|
1287
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1288
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1289
|
-
*/
|
|
1290
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): PSMessage;
|
|
1291
|
-
|
|
1292
|
-
/**
|
|
1293
|
-
* Creates a PSMessage message from a plain object. Also converts values to their respective internal types.
|
|
1294
|
-
* @param d Plain object
|
|
1295
|
-
* @returns PSMessage
|
|
1296
|
-
*/
|
|
1297
|
-
public static fromObject(d: { [k: string]: any }): PSMessage;
|
|
1298
|
-
|
|
1299
|
-
/**
|
|
1300
|
-
* Creates a plain object from a PSMessage message. Also converts values to other types if specified.
|
|
1301
|
-
* @param m PSMessage
|
|
1302
|
-
* @param [o] Conversion options
|
|
1303
|
-
* @returns Plain object
|
|
1304
|
-
*/
|
|
1305
|
-
public static toObject(m: PSMessage, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1306
|
-
|
|
1307
|
-
/**
|
|
1308
|
-
* Converts this PSMessage to JSON.
|
|
1309
|
-
* @returns JSON object
|
|
1310
|
-
*/
|
|
1311
|
-
public toJSON(): { [k: string]: any };
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
/** Properties of a PSResponse. */
|
|
1315
|
-
export interface IPSResponse {
|
|
1316
|
-
|
|
1317
|
-
/** PSResponse topics */
|
|
1318
|
-
topics?: (string[]|null);
|
|
1319
|
-
|
|
1320
|
-
/** PSResponse peerIDs */
|
|
1321
|
-
peerIDs?: (Uint8Array[]|null);
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
/** Represents a PSResponse. */
|
|
1325
|
-
export class PSResponse implements IPSResponse {
|
|
1326
|
-
|
|
1327
|
-
/**
|
|
1328
|
-
* Constructs a new PSResponse.
|
|
1329
|
-
* @param [p] Properties to set
|
|
1330
|
-
*/
|
|
1331
|
-
constructor(p?: IPSResponse);
|
|
1332
|
-
|
|
1333
|
-
/** PSResponse topics. */
|
|
1334
|
-
public topics: string[];
|
|
1335
|
-
|
|
1336
|
-
/** PSResponse peerIDs. */
|
|
1337
|
-
public peerIDs: Uint8Array[];
|
|
1338
|
-
|
|
1339
|
-
/**
|
|
1340
|
-
* Encodes the specified PSResponse message. Does not implicitly {@link PSResponse.verify|verify} messages.
|
|
1341
|
-
* @param m PSResponse message or plain object to encode
|
|
1342
|
-
* @param [w] Writer to encode to
|
|
1343
|
-
* @returns Writer
|
|
1344
|
-
*/
|
|
1345
|
-
public static encode(m: IPSResponse, w?: $protobuf.Writer): $protobuf.Writer;
|
|
1346
|
-
|
|
1347
|
-
/**
|
|
1348
|
-
* Decodes a PSResponse message from the specified reader or buffer.
|
|
1349
|
-
* @param r Reader or buffer to decode from
|
|
1350
|
-
* @param [l] Message length if known beforehand
|
|
1351
|
-
* @returns PSResponse
|
|
1352
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1353
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1354
|
-
*/
|
|
1355
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): PSResponse;
|
|
1356
|
-
|
|
1357
|
-
/**
|
|
1358
|
-
* Creates a PSResponse message from a plain object. Also converts values to their respective internal types.
|
|
1359
|
-
* @param d Plain object
|
|
1360
|
-
* @returns PSResponse
|
|
1361
|
-
*/
|
|
1362
|
-
public static fromObject(d: { [k: string]: any }): PSResponse;
|
|
1363
|
-
|
|
1364
|
-
/**
|
|
1365
|
-
* Creates a plain object from a PSResponse message. Also converts values to other types if specified.
|
|
1366
|
-
* @param m PSResponse
|
|
1367
|
-
* @param [o] Conversion options
|
|
1368
|
-
* @returns Plain object
|
|
1369
|
-
*/
|
|
1370
|
-
public static toObject(m: PSResponse, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1371
|
-
|
|
1372
|
-
/**
|
|
1373
|
-
* Converts this PSResponse to JSON.
|
|
1374
|
-
* @returns JSON object
|
|
1375
|
-
*/
|
|
1376
|
-
public toJSON(): { [k: string]: any };
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
/** Properties of a PeerstoreRequest. */
|
|
1380
|
-
export interface IPeerstoreRequest {
|
|
1381
|
-
|
|
1382
|
-
/** PeerstoreRequest type */
|
|
204
|
+
namespace Type {
|
|
205
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<typeof Type>;
|
|
206
|
+
}
|
|
207
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<PSRequest>;
|
|
208
|
+
const encode: (obj: PSRequest) => Uint8Array;
|
|
209
|
+
const decode: (buf: Uint8Array) => PSRequest;
|
|
210
|
+
}
|
|
211
|
+
export interface PSMessage {
|
|
212
|
+
from?: Uint8Array;
|
|
213
|
+
data?: Uint8Array;
|
|
214
|
+
seqno?: Uint8Array;
|
|
215
|
+
topicIDs: string[];
|
|
216
|
+
signature?: Uint8Array;
|
|
217
|
+
key?: Uint8Array;
|
|
218
|
+
}
|
|
219
|
+
export declare namespace PSMessage {
|
|
220
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<PSMessage>;
|
|
221
|
+
const encode: (obj: PSMessage) => Uint8Array;
|
|
222
|
+
const decode: (buf: Uint8Array) => PSMessage;
|
|
223
|
+
}
|
|
224
|
+
export interface PSResponse {
|
|
225
|
+
topics: string[];
|
|
226
|
+
peerIDs: Uint8Array[];
|
|
227
|
+
}
|
|
228
|
+
export declare namespace PSResponse {
|
|
229
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<PSResponse>;
|
|
230
|
+
const encode: (obj: PSResponse) => Uint8Array;
|
|
231
|
+
const decode: (buf: Uint8Array) => PSResponse;
|
|
232
|
+
}
|
|
233
|
+
export interface PeerstoreRequest {
|
|
1383
234
|
type: PeerstoreRequest.Type;
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
id?: (Uint8Array|null);
|
|
1387
|
-
|
|
1388
|
-
/** PeerstoreRequest protos */
|
|
1389
|
-
protos?: (string[]|null);
|
|
235
|
+
id?: Uint8Array;
|
|
236
|
+
protos: string[];
|
|
1390
237
|
}
|
|
1391
|
-
|
|
1392
|
-
/** Represents a PeerstoreRequest. */
|
|
1393
|
-
export class PeerstoreRequest implements IPeerstoreRequest {
|
|
1394
|
-
|
|
1395
|
-
/**
|
|
1396
|
-
* Constructs a new PeerstoreRequest.
|
|
1397
|
-
* @param [p] Properties to set
|
|
1398
|
-
*/
|
|
1399
|
-
constructor(p?: IPeerstoreRequest);
|
|
1400
|
-
|
|
1401
|
-
/** PeerstoreRequest type. */
|
|
1402
|
-
public type: PeerstoreRequest.Type;
|
|
1403
|
-
|
|
1404
|
-
/** PeerstoreRequest id. */
|
|
1405
|
-
public id?: (Uint8Array|null);
|
|
1406
|
-
|
|
1407
|
-
/** PeerstoreRequest protos. */
|
|
1408
|
-
public protos: string[];
|
|
1409
|
-
|
|
1410
|
-
/** PeerstoreRequest _id. */
|
|
1411
|
-
public _id?: "id";
|
|
1412
|
-
|
|
1413
|
-
/**
|
|
1414
|
-
* Encodes the specified PeerstoreRequest message. Does not implicitly {@link PeerstoreRequest.verify|verify} messages.
|
|
1415
|
-
* @param m PeerstoreRequest message or plain object to encode
|
|
1416
|
-
* @param [w] Writer to encode to
|
|
1417
|
-
* @returns Writer
|
|
1418
|
-
*/
|
|
1419
|
-
public static encode(m: IPeerstoreRequest, w?: $protobuf.Writer): $protobuf.Writer;
|
|
1420
|
-
|
|
1421
|
-
/**
|
|
1422
|
-
* Decodes a PeerstoreRequest message from the specified reader or buffer.
|
|
1423
|
-
* @param r Reader or buffer to decode from
|
|
1424
|
-
* @param [l] Message length if known beforehand
|
|
1425
|
-
* @returns PeerstoreRequest
|
|
1426
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1427
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1428
|
-
*/
|
|
1429
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): PeerstoreRequest;
|
|
1430
|
-
|
|
1431
|
-
/**
|
|
1432
|
-
* Creates a PeerstoreRequest message from a plain object. Also converts values to their respective internal types.
|
|
1433
|
-
* @param d Plain object
|
|
1434
|
-
* @returns PeerstoreRequest
|
|
1435
|
-
*/
|
|
1436
|
-
public static fromObject(d: { [k: string]: any }): PeerstoreRequest;
|
|
1437
|
-
|
|
1438
|
-
/**
|
|
1439
|
-
* Creates a plain object from a PeerstoreRequest message. Also converts values to other types if specified.
|
|
1440
|
-
* @param m PeerstoreRequest
|
|
1441
|
-
* @param [o] Conversion options
|
|
1442
|
-
* @returns Plain object
|
|
1443
|
-
*/
|
|
1444
|
-
public static toObject(m: PeerstoreRequest, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1445
|
-
|
|
1446
|
-
/**
|
|
1447
|
-
* Converts this PeerstoreRequest to JSON.
|
|
1448
|
-
* @returns JSON object
|
|
1449
|
-
*/
|
|
1450
|
-
public toJSON(): { [k: string]: any };
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
export namespace PeerstoreRequest {
|
|
1454
|
-
|
|
1455
|
-
/** Type enum. */
|
|
238
|
+
export declare namespace PeerstoreRequest {
|
|
1456
239
|
enum Type {
|
|
1457
|
-
GET_PROTOCOLS =
|
|
1458
|
-
GET_PEER_INFO =
|
|
240
|
+
GET_PROTOCOLS = "GET_PROTOCOLS",
|
|
241
|
+
GET_PEER_INFO = "GET_PEER_INFO"
|
|
242
|
+
}
|
|
243
|
+
namespace Type {
|
|
244
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<typeof Type>;
|
|
1459
245
|
}
|
|
246
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<PeerstoreRequest>;
|
|
247
|
+
const encode: (obj: PeerstoreRequest) => Uint8Array;
|
|
248
|
+
const decode: (buf: Uint8Array) => PeerstoreRequest;
|
|
1460
249
|
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
/** PeerstoreResponse peer */
|
|
1466
|
-
peer?: (IPeerInfo|null);
|
|
1467
|
-
|
|
1468
|
-
/** PeerstoreResponse protos */
|
|
1469
|
-
protos?: (string[]|null);
|
|
250
|
+
export interface PeerstoreResponse {
|
|
251
|
+
peer?: PeerInfo;
|
|
252
|
+
protos: string[];
|
|
1470
253
|
}
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
/**
|
|
1476
|
-
* Constructs a new PeerstoreResponse.
|
|
1477
|
-
* @param [p] Properties to set
|
|
1478
|
-
*/
|
|
1479
|
-
constructor(p?: IPeerstoreResponse);
|
|
1480
|
-
|
|
1481
|
-
/** PeerstoreResponse peer. */
|
|
1482
|
-
public peer?: (IPeerInfo|null);
|
|
1483
|
-
|
|
1484
|
-
/** PeerstoreResponse protos. */
|
|
1485
|
-
public protos: string[];
|
|
1486
|
-
|
|
1487
|
-
/** PeerstoreResponse _peer. */
|
|
1488
|
-
public _peer?: "peer";
|
|
1489
|
-
|
|
1490
|
-
/**
|
|
1491
|
-
* Encodes the specified PeerstoreResponse message. Does not implicitly {@link PeerstoreResponse.verify|verify} messages.
|
|
1492
|
-
* @param m PeerstoreResponse message or plain object to encode
|
|
1493
|
-
* @param [w] Writer to encode to
|
|
1494
|
-
* @returns Writer
|
|
1495
|
-
*/
|
|
1496
|
-
public static encode(m: IPeerstoreResponse, w?: $protobuf.Writer): $protobuf.Writer;
|
|
1497
|
-
|
|
1498
|
-
/**
|
|
1499
|
-
* Decodes a PeerstoreResponse message from the specified reader or buffer.
|
|
1500
|
-
* @param r Reader or buffer to decode from
|
|
1501
|
-
* @param [l] Message length if known beforehand
|
|
1502
|
-
* @returns PeerstoreResponse
|
|
1503
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1504
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1505
|
-
*/
|
|
1506
|
-
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): PeerstoreResponse;
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* Creates a PeerstoreResponse message from a plain object. Also converts values to their respective internal types.
|
|
1510
|
-
* @param d Plain object
|
|
1511
|
-
* @returns PeerstoreResponse
|
|
1512
|
-
*/
|
|
1513
|
-
public static fromObject(d: { [k: string]: any }): PeerstoreResponse;
|
|
1514
|
-
|
|
1515
|
-
/**
|
|
1516
|
-
* Creates a plain object from a PeerstoreResponse message. Also converts values to other types if specified.
|
|
1517
|
-
* @param m PeerstoreResponse
|
|
1518
|
-
* @param [o] Conversion options
|
|
1519
|
-
* @returns Plain object
|
|
1520
|
-
*/
|
|
1521
|
-
public static toObject(m: PeerstoreResponse, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1522
|
-
|
|
1523
|
-
/**
|
|
1524
|
-
* Converts this PeerstoreResponse to JSON.
|
|
1525
|
-
* @returns JSON object
|
|
1526
|
-
*/
|
|
1527
|
-
public toJSON(): { [k: string]: any };
|
|
254
|
+
export declare namespace PeerstoreResponse {
|
|
255
|
+
const codec: () => import("protons-runtime/dist/src/codecs/codec").Codec<PeerstoreResponse>;
|
|
256
|
+
const encode: (obj: PeerstoreResponse) => Uint8Array;
|
|
257
|
+
const decode: (buf: Uint8Array) => PeerstoreResponse;
|
|
1528
258
|
}
|
|
259
|
+
//# sourceMappingURL=index.d.ts.map
|