@libp2p/pubsub 1.2.9 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/src/index.d.ts +34 -25
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +84 -91
- package/dist/src/index.js.map +1 -1
- package/dist/src/{message/sign.d.ts → sign.d.ts} +3 -3
- package/dist/src/sign.d.ts.map +1 -0
- package/dist/src/{message/sign.js → sign.js} +6 -7
- package/dist/src/sign.js.map +1 -0
- package/dist/src/utils.d.ts +3 -4
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +2 -2
- package/dist/src/utils.js.map +1 -1
- package/package.json +18 -25
- package/src/index.ts +118 -107
- package/src/{message/sign.ts → sign.ts} +7 -8
- package/src/utils.ts +5 -6
- package/dist/src/message/rpc.d.ts +0 -669
- package/dist/src/message/rpc.js +0 -1870
- package/dist/src/message/sign.d.ts.map +0 -1
- package/dist/src/message/sign.js.map +0 -1
- package/dist/src/message/topic-descriptor.d.ts +0 -254
- package/dist/src/message/topic-descriptor.js +0 -647
- package/src/message/rpc.d.ts +0 -669
- package/src/message/rpc.js +0 -1870
- package/src/message/rpc.proto +0 -54
- package/src/message/topic-descriptor.d.ts +0 -254
- package/src/message/topic-descriptor.js +0 -647
- package/src/message/topic-descriptor.proto +0 -30
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../../src/message/sign.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAGxD,eAAO,MAAM,UAAU,YAAyC,CAAA;AAEhE;;GAEG;AACH,wBAAsB,WAAW,CAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,oBAyBlE;AAED;;GAEG;AACH,wBAAsB,eAAe,CAA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AAS,IAAI,IAAI,EAAE;YAC/B,OAAO,SAAS,CAAC,SAAS,CAAA;SAC3B;KACF;IAED,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;QAClC,OAAO,OAAO,CAAC,IAAI,CAAC,SAAS,CAAA;KAC9B;IAED,4DAA4D;IAC5D,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;AACxE,CAAC"}
|
@@ -1,254 +0,0 @@
|
|
1
|
-
import * as $protobuf from 'protobufjs'
|
2
|
-
/** Properties of a TopicDescriptor. */
|
3
|
-
export interface ITopicDescriptor {
|
4
|
-
|
5
|
-
/** TopicDescriptor name */
|
6
|
-
name?: (string|null)
|
7
|
-
|
8
|
-
/** TopicDescriptor auth */
|
9
|
-
auth?: (TopicDescriptor.IAuthOpts|null)
|
10
|
-
|
11
|
-
/** TopicDescriptor enc */
|
12
|
-
enc?: (TopicDescriptor.IEncOpts|null)
|
13
|
-
}
|
14
|
-
|
15
|
-
/** Represents a TopicDescriptor. */
|
16
|
-
export class TopicDescriptor implements ITopicDescriptor {
|
17
|
-
/**
|
18
|
-
* Constructs a new TopicDescriptor.
|
19
|
-
*
|
20
|
-
* @param [p] - Properties to set
|
21
|
-
*/
|
22
|
-
constructor (p?: ITopicDescriptor);
|
23
|
-
|
24
|
-
/** TopicDescriptor name. */
|
25
|
-
public name?: (string|null)
|
26
|
-
|
27
|
-
/** TopicDescriptor auth. */
|
28
|
-
public auth?: (TopicDescriptor.IAuthOpts|null)
|
29
|
-
|
30
|
-
/** TopicDescriptor enc. */
|
31
|
-
public enc?: (TopicDescriptor.IEncOpts|null)
|
32
|
-
|
33
|
-
/** TopicDescriptor _name. */
|
34
|
-
public _name?: 'name'
|
35
|
-
|
36
|
-
/** TopicDescriptor _auth. */
|
37
|
-
public _auth?: 'auth'
|
38
|
-
|
39
|
-
/** TopicDescriptor _enc. */
|
40
|
-
public _enc?: 'enc'
|
41
|
-
|
42
|
-
/**
|
43
|
-
* Encodes the specified TopicDescriptor message. Does not implicitly {@link TopicDescriptor.verify|verify} messages.
|
44
|
-
*
|
45
|
-
* @param m - TopicDescriptor message or plain object to encode
|
46
|
-
* @param [w] - Writer to encode to
|
47
|
-
* @returns Writer
|
48
|
-
*/
|
49
|
-
public static encode (m: ITopicDescriptor, w?: $protobuf.Writer): $protobuf.Writer;
|
50
|
-
|
51
|
-
/**
|
52
|
-
* Decodes a TopicDescriptor message from the specified reader or buffer.
|
53
|
-
*
|
54
|
-
* @param r - Reader or buffer to decode from
|
55
|
-
* @param [l] - Message length if known beforehand
|
56
|
-
* @returns TopicDescriptor
|
57
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
58
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
59
|
-
*/
|
60
|
-
public static decode (r: ($protobuf.Reader|Uint8Array), l?: number): TopicDescriptor;
|
61
|
-
|
62
|
-
/**
|
63
|
-
* Creates a TopicDescriptor message from a plain object. Also converts values to their respective internal types.
|
64
|
-
*
|
65
|
-
* @param d - Plain object
|
66
|
-
* @returns TopicDescriptor
|
67
|
-
*/
|
68
|
-
public static fromObject (d: { [k: string]: any }): TopicDescriptor;
|
69
|
-
|
70
|
-
/**
|
71
|
-
* Creates a plain object from a TopicDescriptor message. Also converts values to other types if specified.
|
72
|
-
*
|
73
|
-
* @param m - TopicDescriptor
|
74
|
-
* @param [o] - Conversion options
|
75
|
-
* @returns Plain object
|
76
|
-
*/
|
77
|
-
public static toObject (m: TopicDescriptor, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
78
|
-
|
79
|
-
/**
|
80
|
-
* Converts this TopicDescriptor to JSON.
|
81
|
-
*
|
82
|
-
* @returns JSON object
|
83
|
-
*/
|
84
|
-
public toJSON (): { [k: string]: any };
|
85
|
-
}
|
86
|
-
|
87
|
-
export namespace TopicDescriptor {
|
88
|
-
|
89
|
-
/** Properties of an AuthOpts. */
|
90
|
-
interface IAuthOpts {
|
91
|
-
|
92
|
-
/** AuthOpts mode */
|
93
|
-
mode?: (TopicDescriptor.AuthOpts.AuthMode|null)
|
94
|
-
|
95
|
-
/** AuthOpts keys */
|
96
|
-
keys?: (Uint8Array[]|null)
|
97
|
-
}
|
98
|
-
|
99
|
-
/** Represents an AuthOpts. */
|
100
|
-
class AuthOpts implements IAuthOpts {
|
101
|
-
/**
|
102
|
-
* Constructs a new AuthOpts.
|
103
|
-
*
|
104
|
-
* @param [p] - Properties to set
|
105
|
-
*/
|
106
|
-
constructor (p?: TopicDescriptor.IAuthOpts);
|
107
|
-
|
108
|
-
/** AuthOpts mode. */
|
109
|
-
public mode?: (TopicDescriptor.AuthOpts.AuthMode|null)
|
110
|
-
|
111
|
-
/** AuthOpts keys. */
|
112
|
-
public keys: Uint8Array[]
|
113
|
-
|
114
|
-
/** AuthOpts _mode. */
|
115
|
-
public _mode?: 'mode'
|
116
|
-
|
117
|
-
/**
|
118
|
-
* Encodes the specified AuthOpts message. Does not implicitly {@link TopicDescriptor.AuthOpts.verify|verify} messages.
|
119
|
-
*
|
120
|
-
* @param m - AuthOpts message or plain object to encode
|
121
|
-
* @param [w] - Writer to encode to
|
122
|
-
* @returns Writer
|
123
|
-
*/
|
124
|
-
public static encode (m: TopicDescriptor.IAuthOpts, w?: $protobuf.Writer): $protobuf.Writer;
|
125
|
-
|
126
|
-
/**
|
127
|
-
* Decodes an AuthOpts message from the specified reader or buffer.
|
128
|
-
*
|
129
|
-
* @param r - Reader or buffer to decode from
|
130
|
-
* @param [l] - Message length if known beforehand
|
131
|
-
* @returns AuthOpts
|
132
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
133
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
134
|
-
*/
|
135
|
-
public static decode (r: ($protobuf.Reader|Uint8Array), l?: number): TopicDescriptor.AuthOpts;
|
136
|
-
|
137
|
-
/**
|
138
|
-
* Creates an AuthOpts message from a plain object. Also converts values to their respective internal types.
|
139
|
-
*
|
140
|
-
* @param d - Plain object
|
141
|
-
* @returns AuthOpts
|
142
|
-
*/
|
143
|
-
public static fromObject (d: { [k: string]: any }): TopicDescriptor.AuthOpts;
|
144
|
-
|
145
|
-
/**
|
146
|
-
* Creates a plain object from an AuthOpts message. Also converts values to other types if specified.
|
147
|
-
*
|
148
|
-
* @param m - AuthOpts
|
149
|
-
* @param [o] - Conversion options
|
150
|
-
* @returns Plain object
|
151
|
-
*/
|
152
|
-
public static toObject (m: TopicDescriptor.AuthOpts, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
153
|
-
|
154
|
-
/**
|
155
|
-
* Converts this AuthOpts to JSON.
|
156
|
-
*
|
157
|
-
* @returns JSON object
|
158
|
-
*/
|
159
|
-
public toJSON (): { [k: string]: any };
|
160
|
-
}
|
161
|
-
|
162
|
-
namespace AuthOpts {
|
163
|
-
|
164
|
-
/** AuthMode enum. */
|
165
|
-
enum AuthMode {
|
166
|
-
NONE = 0,
|
167
|
-
KEY = 1,
|
168
|
-
WOT = 2
|
169
|
-
}
|
170
|
-
}
|
171
|
-
|
172
|
-
/** Properties of an EncOpts. */
|
173
|
-
interface IEncOpts {
|
174
|
-
|
175
|
-
/** EncOpts mode */
|
176
|
-
mode?: (TopicDescriptor.EncOpts.EncMode|null)
|
177
|
-
|
178
|
-
/** EncOpts keyHashes */
|
179
|
-
keyHashes?: (Uint8Array[]|null)
|
180
|
-
}
|
181
|
-
|
182
|
-
/** Represents an EncOpts. */
|
183
|
-
class EncOpts implements IEncOpts {
|
184
|
-
/**
|
185
|
-
* Constructs a new EncOpts.
|
186
|
-
*
|
187
|
-
* @param [p] - Properties to set
|
188
|
-
*/
|
189
|
-
constructor (p?: TopicDescriptor.IEncOpts);
|
190
|
-
|
191
|
-
/** EncOpts mode. */
|
192
|
-
public mode?: (TopicDescriptor.EncOpts.EncMode|null)
|
193
|
-
|
194
|
-
/** EncOpts keyHashes. */
|
195
|
-
public keyHashes: Uint8Array[]
|
196
|
-
|
197
|
-
/** EncOpts _mode. */
|
198
|
-
public _mode?: 'mode'
|
199
|
-
|
200
|
-
/**
|
201
|
-
* Encodes the specified EncOpts message. Does not implicitly {@link TopicDescriptor.EncOpts.verify|verify} messages.
|
202
|
-
*
|
203
|
-
* @param m - EncOpts message or plain object to encode
|
204
|
-
* @param [w] - Writer to encode to
|
205
|
-
* @returns Writer
|
206
|
-
*/
|
207
|
-
public static encode (m: TopicDescriptor.IEncOpts, w?: $protobuf.Writer): $protobuf.Writer;
|
208
|
-
|
209
|
-
/**
|
210
|
-
* Decodes an EncOpts message from the specified reader or buffer.
|
211
|
-
*
|
212
|
-
* @param r - Reader or buffer to decode from
|
213
|
-
* @param [l] - Message length if known beforehand
|
214
|
-
* @returns EncOpts
|
215
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
216
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
217
|
-
*/
|
218
|
-
public static decode (r: ($protobuf.Reader|Uint8Array), l?: number): TopicDescriptor.EncOpts;
|
219
|
-
|
220
|
-
/**
|
221
|
-
* Creates an EncOpts message from a plain object. Also converts values to their respective internal types.
|
222
|
-
*
|
223
|
-
* @param d - Plain object
|
224
|
-
* @returns EncOpts
|
225
|
-
*/
|
226
|
-
public static fromObject (d: { [k: string]: any }): TopicDescriptor.EncOpts;
|
227
|
-
|
228
|
-
/**
|
229
|
-
* Creates a plain object from an EncOpts message. Also converts values to other types if specified.
|
230
|
-
*
|
231
|
-
* @param m - EncOpts
|
232
|
-
* @param [o] - Conversion options
|
233
|
-
* @returns Plain object
|
234
|
-
*/
|
235
|
-
public static toObject (m: TopicDescriptor.EncOpts, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
236
|
-
|
237
|
-
/**
|
238
|
-
* Converts this EncOpts to JSON.
|
239
|
-
*
|
240
|
-
* @returns JSON object
|
241
|
-
*/
|
242
|
-
public toJSON (): { [k: string]: any };
|
243
|
-
}
|
244
|
-
|
245
|
-
namespace EncOpts {
|
246
|
-
|
247
|
-
/** EncMode enum. */
|
248
|
-
enum EncMode {
|
249
|
-
NONE = 0,
|
250
|
-
SHAREDKEY = 1,
|
251
|
-
WOT = 2
|
252
|
-
}
|
253
|
-
}
|
254
|
-
}
|