@dashevo/dapi-grpc 2.1.0-dev.7 → 2.1.0-pr.2716.1

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.
@@ -54,6 +54,3427 @@ $root.org = (function() {
54
54
  */
55
55
  var v0 = {};
56
56
 
57
+ v0.PlatformEventsCommand = (function() {
58
+
59
+ /**
60
+ * Properties of a PlatformEventsCommand.
61
+ * @memberof org.dash.platform.dapi.v0
62
+ * @interface IPlatformEventsCommand
63
+ * @property {org.dash.platform.dapi.v0.PlatformEventsCommand.IPlatformEventsCommandV0|null} [v0] PlatformEventsCommand v0
64
+ */
65
+
66
+ /**
67
+ * Constructs a new PlatformEventsCommand.
68
+ * @memberof org.dash.platform.dapi.v0
69
+ * @classdesc Represents a PlatformEventsCommand.
70
+ * @implements IPlatformEventsCommand
71
+ * @constructor
72
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsCommand=} [properties] Properties to set
73
+ */
74
+ function PlatformEventsCommand(properties) {
75
+ if (properties)
76
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
77
+ if (properties[keys[i]] != null)
78
+ this[keys[i]] = properties[keys[i]];
79
+ }
80
+
81
+ /**
82
+ * PlatformEventsCommand v0.
83
+ * @member {org.dash.platform.dapi.v0.PlatformEventsCommand.IPlatformEventsCommandV0|null|undefined} v0
84
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
85
+ * @instance
86
+ */
87
+ PlatformEventsCommand.prototype.v0 = null;
88
+
89
+ // OneOf field names bound to virtual getters and setters
90
+ var $oneOfFields;
91
+
92
+ /**
93
+ * PlatformEventsCommand version.
94
+ * @member {"v0"|undefined} version
95
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
96
+ * @instance
97
+ */
98
+ Object.defineProperty(PlatformEventsCommand.prototype, "version", {
99
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
100
+ set: $util.oneOfSetter($oneOfFields)
101
+ });
102
+
103
+ /**
104
+ * Creates a new PlatformEventsCommand instance using the specified properties.
105
+ * @function create
106
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
107
+ * @static
108
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsCommand=} [properties] Properties to set
109
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsCommand} PlatformEventsCommand instance
110
+ */
111
+ PlatformEventsCommand.create = function create(properties) {
112
+ return new PlatformEventsCommand(properties);
113
+ };
114
+
115
+ /**
116
+ * Encodes the specified PlatformEventsCommand message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventsCommand.verify|verify} messages.
117
+ * @function encode
118
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
119
+ * @static
120
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsCommand} message PlatformEventsCommand message or plain object to encode
121
+ * @param {$protobuf.Writer} [writer] Writer to encode to
122
+ * @returns {$protobuf.Writer} Writer
123
+ */
124
+ PlatformEventsCommand.encode = function encode(message, writer) {
125
+ if (!writer)
126
+ writer = $Writer.create();
127
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
128
+ $root.org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
129
+ return writer;
130
+ };
131
+
132
+ /**
133
+ * Encodes the specified PlatformEventsCommand message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventsCommand.verify|verify} messages.
134
+ * @function encodeDelimited
135
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
136
+ * @static
137
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsCommand} message PlatformEventsCommand message or plain object to encode
138
+ * @param {$protobuf.Writer} [writer] Writer to encode to
139
+ * @returns {$protobuf.Writer} Writer
140
+ */
141
+ PlatformEventsCommand.encodeDelimited = function encodeDelimited(message, writer) {
142
+ return this.encode(message, writer).ldelim();
143
+ };
144
+
145
+ /**
146
+ * Decodes a PlatformEventsCommand message from the specified reader or buffer.
147
+ * @function decode
148
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
149
+ * @static
150
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
151
+ * @param {number} [length] Message length if known beforehand
152
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsCommand} PlatformEventsCommand
153
+ * @throws {Error} If the payload is not a reader or valid buffer
154
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
155
+ */
156
+ PlatformEventsCommand.decode = function decode(reader, length) {
157
+ if (!(reader instanceof $Reader))
158
+ reader = $Reader.create(reader);
159
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventsCommand();
160
+ while (reader.pos < end) {
161
+ var tag = reader.uint32();
162
+ switch (tag >>> 3) {
163
+ case 1:
164
+ message.v0 = $root.org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.decode(reader, reader.uint32());
165
+ break;
166
+ default:
167
+ reader.skipType(tag & 7);
168
+ break;
169
+ }
170
+ }
171
+ return message;
172
+ };
173
+
174
+ /**
175
+ * Decodes a PlatformEventsCommand message from the specified reader or buffer, length delimited.
176
+ * @function decodeDelimited
177
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
178
+ * @static
179
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
180
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsCommand} PlatformEventsCommand
181
+ * @throws {Error} If the payload is not a reader or valid buffer
182
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
183
+ */
184
+ PlatformEventsCommand.decodeDelimited = function decodeDelimited(reader) {
185
+ if (!(reader instanceof $Reader))
186
+ reader = new $Reader(reader);
187
+ return this.decode(reader, reader.uint32());
188
+ };
189
+
190
+ /**
191
+ * Verifies a PlatformEventsCommand message.
192
+ * @function verify
193
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
194
+ * @static
195
+ * @param {Object.<string,*>} message Plain object to verify
196
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
197
+ */
198
+ PlatformEventsCommand.verify = function verify(message) {
199
+ if (typeof message !== "object" || message === null)
200
+ return "object expected";
201
+ var properties = {};
202
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
203
+ properties.version = 1;
204
+ {
205
+ var error = $root.org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.verify(message.v0);
206
+ if (error)
207
+ return "v0." + error;
208
+ }
209
+ }
210
+ return null;
211
+ };
212
+
213
+ /**
214
+ * Creates a PlatformEventsCommand message from a plain object. Also converts values to their respective internal types.
215
+ * @function fromObject
216
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
217
+ * @static
218
+ * @param {Object.<string,*>} object Plain object
219
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsCommand} PlatformEventsCommand
220
+ */
221
+ PlatformEventsCommand.fromObject = function fromObject(object) {
222
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventsCommand)
223
+ return object;
224
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventsCommand();
225
+ if (object.v0 != null) {
226
+ if (typeof object.v0 !== "object")
227
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventsCommand.v0: object expected");
228
+ message.v0 = $root.org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.fromObject(object.v0);
229
+ }
230
+ return message;
231
+ };
232
+
233
+ /**
234
+ * Creates a plain object from a PlatformEventsCommand message. Also converts values to other types if specified.
235
+ * @function toObject
236
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
237
+ * @static
238
+ * @param {org.dash.platform.dapi.v0.PlatformEventsCommand} message PlatformEventsCommand
239
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
240
+ * @returns {Object.<string,*>} Plain object
241
+ */
242
+ PlatformEventsCommand.toObject = function toObject(message, options) {
243
+ if (!options)
244
+ options = {};
245
+ var object = {};
246
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
247
+ object.v0 = $root.org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.toObject(message.v0, options);
248
+ if (options.oneofs)
249
+ object.version = "v0";
250
+ }
251
+ return object;
252
+ };
253
+
254
+ /**
255
+ * Converts this PlatformEventsCommand to JSON.
256
+ * @function toJSON
257
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
258
+ * @instance
259
+ * @returns {Object.<string,*>} JSON object
260
+ */
261
+ PlatformEventsCommand.prototype.toJSON = function toJSON() {
262
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
263
+ };
264
+
265
+ PlatformEventsCommand.PlatformEventsCommandV0 = (function() {
266
+
267
+ /**
268
+ * Properties of a PlatformEventsCommandV0.
269
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
270
+ * @interface IPlatformEventsCommandV0
271
+ * @property {org.dash.platform.dapi.v0.IAddSubscriptionV0|null} [add] PlatformEventsCommandV0 add
272
+ * @property {org.dash.platform.dapi.v0.IRemoveSubscriptionV0|null} [remove] PlatformEventsCommandV0 remove
273
+ */
274
+
275
+ /**
276
+ * Constructs a new PlatformEventsCommandV0.
277
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand
278
+ * @classdesc Represents a PlatformEventsCommandV0.
279
+ * @implements IPlatformEventsCommandV0
280
+ * @constructor
281
+ * @param {org.dash.platform.dapi.v0.PlatformEventsCommand.IPlatformEventsCommandV0=} [properties] Properties to set
282
+ */
283
+ function PlatformEventsCommandV0(properties) {
284
+ if (properties)
285
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
286
+ if (properties[keys[i]] != null)
287
+ this[keys[i]] = properties[keys[i]];
288
+ }
289
+
290
+ /**
291
+ * PlatformEventsCommandV0 add.
292
+ * @member {org.dash.platform.dapi.v0.IAddSubscriptionV0|null|undefined} add
293
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
294
+ * @instance
295
+ */
296
+ PlatformEventsCommandV0.prototype.add = null;
297
+
298
+ /**
299
+ * PlatformEventsCommandV0 remove.
300
+ * @member {org.dash.platform.dapi.v0.IRemoveSubscriptionV0|null|undefined} remove
301
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
302
+ * @instance
303
+ */
304
+ PlatformEventsCommandV0.prototype.remove = null;
305
+
306
+ // OneOf field names bound to virtual getters and setters
307
+ var $oneOfFields;
308
+
309
+ /**
310
+ * PlatformEventsCommandV0 command.
311
+ * @member {"add"|"remove"|undefined} command
312
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
313
+ * @instance
314
+ */
315
+ Object.defineProperty(PlatformEventsCommandV0.prototype, "command", {
316
+ get: $util.oneOfGetter($oneOfFields = ["add", "remove"]),
317
+ set: $util.oneOfSetter($oneOfFields)
318
+ });
319
+
320
+ /**
321
+ * Creates a new PlatformEventsCommandV0 instance using the specified properties.
322
+ * @function create
323
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
324
+ * @static
325
+ * @param {org.dash.platform.dapi.v0.PlatformEventsCommand.IPlatformEventsCommandV0=} [properties] Properties to set
326
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0} PlatformEventsCommandV0 instance
327
+ */
328
+ PlatformEventsCommandV0.create = function create(properties) {
329
+ return new PlatformEventsCommandV0(properties);
330
+ };
331
+
332
+ /**
333
+ * Encodes the specified PlatformEventsCommandV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.verify|verify} messages.
334
+ * @function encode
335
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
336
+ * @static
337
+ * @param {org.dash.platform.dapi.v0.PlatformEventsCommand.IPlatformEventsCommandV0} message PlatformEventsCommandV0 message or plain object to encode
338
+ * @param {$protobuf.Writer} [writer] Writer to encode to
339
+ * @returns {$protobuf.Writer} Writer
340
+ */
341
+ PlatformEventsCommandV0.encode = function encode(message, writer) {
342
+ if (!writer)
343
+ writer = $Writer.create();
344
+ if (message.add != null && Object.hasOwnProperty.call(message, "add"))
345
+ $root.org.dash.platform.dapi.v0.AddSubscriptionV0.encode(message.add, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
346
+ if (message.remove != null && Object.hasOwnProperty.call(message, "remove"))
347
+ $root.org.dash.platform.dapi.v0.RemoveSubscriptionV0.encode(message.remove, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
348
+ return writer;
349
+ };
350
+
351
+ /**
352
+ * Encodes the specified PlatformEventsCommandV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.verify|verify} messages.
353
+ * @function encodeDelimited
354
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
355
+ * @static
356
+ * @param {org.dash.platform.dapi.v0.PlatformEventsCommand.IPlatformEventsCommandV0} message PlatformEventsCommandV0 message or plain object to encode
357
+ * @param {$protobuf.Writer} [writer] Writer to encode to
358
+ * @returns {$protobuf.Writer} Writer
359
+ */
360
+ PlatformEventsCommandV0.encodeDelimited = function encodeDelimited(message, writer) {
361
+ return this.encode(message, writer).ldelim();
362
+ };
363
+
364
+ /**
365
+ * Decodes a PlatformEventsCommandV0 message from the specified reader or buffer.
366
+ * @function decode
367
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
368
+ * @static
369
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
370
+ * @param {number} [length] Message length if known beforehand
371
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0} PlatformEventsCommandV0
372
+ * @throws {Error} If the payload is not a reader or valid buffer
373
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
374
+ */
375
+ PlatformEventsCommandV0.decode = function decode(reader, length) {
376
+ if (!(reader instanceof $Reader))
377
+ reader = $Reader.create(reader);
378
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0();
379
+ while (reader.pos < end) {
380
+ var tag = reader.uint32();
381
+ switch (tag >>> 3) {
382
+ case 1:
383
+ message.add = $root.org.dash.platform.dapi.v0.AddSubscriptionV0.decode(reader, reader.uint32());
384
+ break;
385
+ case 2:
386
+ message.remove = $root.org.dash.platform.dapi.v0.RemoveSubscriptionV0.decode(reader, reader.uint32());
387
+ break;
388
+ default:
389
+ reader.skipType(tag & 7);
390
+ break;
391
+ }
392
+ }
393
+ return message;
394
+ };
395
+
396
+ /**
397
+ * Decodes a PlatformEventsCommandV0 message from the specified reader or buffer, length delimited.
398
+ * @function decodeDelimited
399
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
400
+ * @static
401
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
402
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0} PlatformEventsCommandV0
403
+ * @throws {Error} If the payload is not a reader or valid buffer
404
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
405
+ */
406
+ PlatformEventsCommandV0.decodeDelimited = function decodeDelimited(reader) {
407
+ if (!(reader instanceof $Reader))
408
+ reader = new $Reader(reader);
409
+ return this.decode(reader, reader.uint32());
410
+ };
411
+
412
+ /**
413
+ * Verifies a PlatformEventsCommandV0 message.
414
+ * @function verify
415
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
416
+ * @static
417
+ * @param {Object.<string,*>} message Plain object to verify
418
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
419
+ */
420
+ PlatformEventsCommandV0.verify = function verify(message) {
421
+ if (typeof message !== "object" || message === null)
422
+ return "object expected";
423
+ var properties = {};
424
+ if (message.add != null && message.hasOwnProperty("add")) {
425
+ properties.command = 1;
426
+ {
427
+ var error = $root.org.dash.platform.dapi.v0.AddSubscriptionV0.verify(message.add);
428
+ if (error)
429
+ return "add." + error;
430
+ }
431
+ }
432
+ if (message.remove != null && message.hasOwnProperty("remove")) {
433
+ if (properties.command === 1)
434
+ return "command: multiple values";
435
+ properties.command = 1;
436
+ {
437
+ var error = $root.org.dash.platform.dapi.v0.RemoveSubscriptionV0.verify(message.remove);
438
+ if (error)
439
+ return "remove." + error;
440
+ }
441
+ }
442
+ return null;
443
+ };
444
+
445
+ /**
446
+ * Creates a PlatformEventsCommandV0 message from a plain object. Also converts values to their respective internal types.
447
+ * @function fromObject
448
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
449
+ * @static
450
+ * @param {Object.<string,*>} object Plain object
451
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0} PlatformEventsCommandV0
452
+ */
453
+ PlatformEventsCommandV0.fromObject = function fromObject(object) {
454
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0)
455
+ return object;
456
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0();
457
+ if (object.add != null) {
458
+ if (typeof object.add !== "object")
459
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.add: object expected");
460
+ message.add = $root.org.dash.platform.dapi.v0.AddSubscriptionV0.fromObject(object.add);
461
+ }
462
+ if (object.remove != null) {
463
+ if (typeof object.remove !== "object")
464
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0.remove: object expected");
465
+ message.remove = $root.org.dash.platform.dapi.v0.RemoveSubscriptionV0.fromObject(object.remove);
466
+ }
467
+ return message;
468
+ };
469
+
470
+ /**
471
+ * Creates a plain object from a PlatformEventsCommandV0 message. Also converts values to other types if specified.
472
+ * @function toObject
473
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
474
+ * @static
475
+ * @param {org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0} message PlatformEventsCommandV0
476
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
477
+ * @returns {Object.<string,*>} Plain object
478
+ */
479
+ PlatformEventsCommandV0.toObject = function toObject(message, options) {
480
+ if (!options)
481
+ options = {};
482
+ var object = {};
483
+ if (message.add != null && message.hasOwnProperty("add")) {
484
+ object.add = $root.org.dash.platform.dapi.v0.AddSubscriptionV0.toObject(message.add, options);
485
+ if (options.oneofs)
486
+ object.command = "add";
487
+ }
488
+ if (message.remove != null && message.hasOwnProperty("remove")) {
489
+ object.remove = $root.org.dash.platform.dapi.v0.RemoveSubscriptionV0.toObject(message.remove, options);
490
+ if (options.oneofs)
491
+ object.command = "remove";
492
+ }
493
+ return object;
494
+ };
495
+
496
+ /**
497
+ * Converts this PlatformEventsCommandV0 to JSON.
498
+ * @function toJSON
499
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsCommand.PlatformEventsCommandV0
500
+ * @instance
501
+ * @returns {Object.<string,*>} JSON object
502
+ */
503
+ PlatformEventsCommandV0.prototype.toJSON = function toJSON() {
504
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
505
+ };
506
+
507
+ return PlatformEventsCommandV0;
508
+ })();
509
+
510
+ return PlatformEventsCommand;
511
+ })();
512
+
513
+ v0.PlatformEventsResponse = (function() {
514
+
515
+ /**
516
+ * Properties of a PlatformEventsResponse.
517
+ * @memberof org.dash.platform.dapi.v0
518
+ * @interface IPlatformEventsResponse
519
+ * @property {org.dash.platform.dapi.v0.PlatformEventsResponse.IPlatformEventsResponseV0|null} [v0] PlatformEventsResponse v0
520
+ */
521
+
522
+ /**
523
+ * Constructs a new PlatformEventsResponse.
524
+ * @memberof org.dash.platform.dapi.v0
525
+ * @classdesc Represents a PlatformEventsResponse.
526
+ * @implements IPlatformEventsResponse
527
+ * @constructor
528
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsResponse=} [properties] Properties to set
529
+ */
530
+ function PlatformEventsResponse(properties) {
531
+ if (properties)
532
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
533
+ if (properties[keys[i]] != null)
534
+ this[keys[i]] = properties[keys[i]];
535
+ }
536
+
537
+ /**
538
+ * PlatformEventsResponse v0.
539
+ * @member {org.dash.platform.dapi.v0.PlatformEventsResponse.IPlatformEventsResponseV0|null|undefined} v0
540
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
541
+ * @instance
542
+ */
543
+ PlatformEventsResponse.prototype.v0 = null;
544
+
545
+ // OneOf field names bound to virtual getters and setters
546
+ var $oneOfFields;
547
+
548
+ /**
549
+ * PlatformEventsResponse version.
550
+ * @member {"v0"|undefined} version
551
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
552
+ * @instance
553
+ */
554
+ Object.defineProperty(PlatformEventsResponse.prototype, "version", {
555
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
556
+ set: $util.oneOfSetter($oneOfFields)
557
+ });
558
+
559
+ /**
560
+ * Creates a new PlatformEventsResponse instance using the specified properties.
561
+ * @function create
562
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
563
+ * @static
564
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsResponse=} [properties] Properties to set
565
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsResponse} PlatformEventsResponse instance
566
+ */
567
+ PlatformEventsResponse.create = function create(properties) {
568
+ return new PlatformEventsResponse(properties);
569
+ };
570
+
571
+ /**
572
+ * Encodes the specified PlatformEventsResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventsResponse.verify|verify} messages.
573
+ * @function encode
574
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
575
+ * @static
576
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsResponse} message PlatformEventsResponse message or plain object to encode
577
+ * @param {$protobuf.Writer} [writer] Writer to encode to
578
+ * @returns {$protobuf.Writer} Writer
579
+ */
580
+ PlatformEventsResponse.encode = function encode(message, writer) {
581
+ if (!writer)
582
+ writer = $Writer.create();
583
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
584
+ $root.org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
585
+ return writer;
586
+ };
587
+
588
+ /**
589
+ * Encodes the specified PlatformEventsResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventsResponse.verify|verify} messages.
590
+ * @function encodeDelimited
591
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
592
+ * @static
593
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsResponse} message PlatformEventsResponse message or plain object to encode
594
+ * @param {$protobuf.Writer} [writer] Writer to encode to
595
+ * @returns {$protobuf.Writer} Writer
596
+ */
597
+ PlatformEventsResponse.encodeDelimited = function encodeDelimited(message, writer) {
598
+ return this.encode(message, writer).ldelim();
599
+ };
600
+
601
+ /**
602
+ * Decodes a PlatformEventsResponse message from the specified reader or buffer.
603
+ * @function decode
604
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
605
+ * @static
606
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
607
+ * @param {number} [length] Message length if known beforehand
608
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsResponse} PlatformEventsResponse
609
+ * @throws {Error} If the payload is not a reader or valid buffer
610
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
611
+ */
612
+ PlatformEventsResponse.decode = function decode(reader, length) {
613
+ if (!(reader instanceof $Reader))
614
+ reader = $Reader.create(reader);
615
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventsResponse();
616
+ while (reader.pos < end) {
617
+ var tag = reader.uint32();
618
+ switch (tag >>> 3) {
619
+ case 1:
620
+ message.v0 = $root.org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.decode(reader, reader.uint32());
621
+ break;
622
+ default:
623
+ reader.skipType(tag & 7);
624
+ break;
625
+ }
626
+ }
627
+ return message;
628
+ };
629
+
630
+ /**
631
+ * Decodes a PlatformEventsResponse message from the specified reader or buffer, length delimited.
632
+ * @function decodeDelimited
633
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
634
+ * @static
635
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
636
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsResponse} PlatformEventsResponse
637
+ * @throws {Error} If the payload is not a reader or valid buffer
638
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
639
+ */
640
+ PlatformEventsResponse.decodeDelimited = function decodeDelimited(reader) {
641
+ if (!(reader instanceof $Reader))
642
+ reader = new $Reader(reader);
643
+ return this.decode(reader, reader.uint32());
644
+ };
645
+
646
+ /**
647
+ * Verifies a PlatformEventsResponse message.
648
+ * @function verify
649
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
650
+ * @static
651
+ * @param {Object.<string,*>} message Plain object to verify
652
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
653
+ */
654
+ PlatformEventsResponse.verify = function verify(message) {
655
+ if (typeof message !== "object" || message === null)
656
+ return "object expected";
657
+ var properties = {};
658
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
659
+ properties.version = 1;
660
+ {
661
+ var error = $root.org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.verify(message.v0);
662
+ if (error)
663
+ return "v0." + error;
664
+ }
665
+ }
666
+ return null;
667
+ };
668
+
669
+ /**
670
+ * Creates a PlatformEventsResponse message from a plain object. Also converts values to their respective internal types.
671
+ * @function fromObject
672
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
673
+ * @static
674
+ * @param {Object.<string,*>} object Plain object
675
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsResponse} PlatformEventsResponse
676
+ */
677
+ PlatformEventsResponse.fromObject = function fromObject(object) {
678
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventsResponse)
679
+ return object;
680
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventsResponse();
681
+ if (object.v0 != null) {
682
+ if (typeof object.v0 !== "object")
683
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventsResponse.v0: object expected");
684
+ message.v0 = $root.org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.fromObject(object.v0);
685
+ }
686
+ return message;
687
+ };
688
+
689
+ /**
690
+ * Creates a plain object from a PlatformEventsResponse message. Also converts values to other types if specified.
691
+ * @function toObject
692
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
693
+ * @static
694
+ * @param {org.dash.platform.dapi.v0.PlatformEventsResponse} message PlatformEventsResponse
695
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
696
+ * @returns {Object.<string,*>} Plain object
697
+ */
698
+ PlatformEventsResponse.toObject = function toObject(message, options) {
699
+ if (!options)
700
+ options = {};
701
+ var object = {};
702
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
703
+ object.v0 = $root.org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.toObject(message.v0, options);
704
+ if (options.oneofs)
705
+ object.version = "v0";
706
+ }
707
+ return object;
708
+ };
709
+
710
+ /**
711
+ * Converts this PlatformEventsResponse to JSON.
712
+ * @function toJSON
713
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
714
+ * @instance
715
+ * @returns {Object.<string,*>} JSON object
716
+ */
717
+ PlatformEventsResponse.prototype.toJSON = function toJSON() {
718
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
719
+ };
720
+
721
+ PlatformEventsResponse.PlatformEventsResponseV0 = (function() {
722
+
723
+ /**
724
+ * Properties of a PlatformEventsResponseV0.
725
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
726
+ * @interface IPlatformEventsResponseV0
727
+ * @property {org.dash.platform.dapi.v0.IPlatformEventMessageV0|null} [event] PlatformEventsResponseV0 event
728
+ * @property {org.dash.platform.dapi.v0.IAckV0|null} [ack] PlatformEventsResponseV0 ack
729
+ * @property {org.dash.platform.dapi.v0.IPlatformErrorV0|null} [error] PlatformEventsResponseV0 error
730
+ */
731
+
732
+ /**
733
+ * Constructs a new PlatformEventsResponseV0.
734
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse
735
+ * @classdesc Represents a PlatformEventsResponseV0.
736
+ * @implements IPlatformEventsResponseV0
737
+ * @constructor
738
+ * @param {org.dash.platform.dapi.v0.PlatformEventsResponse.IPlatformEventsResponseV0=} [properties] Properties to set
739
+ */
740
+ function PlatformEventsResponseV0(properties) {
741
+ if (properties)
742
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
743
+ if (properties[keys[i]] != null)
744
+ this[keys[i]] = properties[keys[i]];
745
+ }
746
+
747
+ /**
748
+ * PlatformEventsResponseV0 event.
749
+ * @member {org.dash.platform.dapi.v0.IPlatformEventMessageV0|null|undefined} event
750
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
751
+ * @instance
752
+ */
753
+ PlatformEventsResponseV0.prototype.event = null;
754
+
755
+ /**
756
+ * PlatformEventsResponseV0 ack.
757
+ * @member {org.dash.platform.dapi.v0.IAckV0|null|undefined} ack
758
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
759
+ * @instance
760
+ */
761
+ PlatformEventsResponseV0.prototype.ack = null;
762
+
763
+ /**
764
+ * PlatformEventsResponseV0 error.
765
+ * @member {org.dash.platform.dapi.v0.IPlatformErrorV0|null|undefined} error
766
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
767
+ * @instance
768
+ */
769
+ PlatformEventsResponseV0.prototype.error = null;
770
+
771
+ // OneOf field names bound to virtual getters and setters
772
+ var $oneOfFields;
773
+
774
+ /**
775
+ * PlatformEventsResponseV0 response.
776
+ * @member {"event"|"ack"|"error"|undefined} response
777
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
778
+ * @instance
779
+ */
780
+ Object.defineProperty(PlatformEventsResponseV0.prototype, "response", {
781
+ get: $util.oneOfGetter($oneOfFields = ["event", "ack", "error"]),
782
+ set: $util.oneOfSetter($oneOfFields)
783
+ });
784
+
785
+ /**
786
+ * Creates a new PlatformEventsResponseV0 instance using the specified properties.
787
+ * @function create
788
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
789
+ * @static
790
+ * @param {org.dash.platform.dapi.v0.PlatformEventsResponse.IPlatformEventsResponseV0=} [properties] Properties to set
791
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0} PlatformEventsResponseV0 instance
792
+ */
793
+ PlatformEventsResponseV0.create = function create(properties) {
794
+ return new PlatformEventsResponseV0(properties);
795
+ };
796
+
797
+ /**
798
+ * Encodes the specified PlatformEventsResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.verify|verify} messages.
799
+ * @function encode
800
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
801
+ * @static
802
+ * @param {org.dash.platform.dapi.v0.PlatformEventsResponse.IPlatformEventsResponseV0} message PlatformEventsResponseV0 message or plain object to encode
803
+ * @param {$protobuf.Writer} [writer] Writer to encode to
804
+ * @returns {$protobuf.Writer} Writer
805
+ */
806
+ PlatformEventsResponseV0.encode = function encode(message, writer) {
807
+ if (!writer)
808
+ writer = $Writer.create();
809
+ if (message.event != null && Object.hasOwnProperty.call(message, "event"))
810
+ $root.org.dash.platform.dapi.v0.PlatformEventMessageV0.encode(message.event, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
811
+ if (message.ack != null && Object.hasOwnProperty.call(message, "ack"))
812
+ $root.org.dash.platform.dapi.v0.AckV0.encode(message.ack, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
813
+ if (message.error != null && Object.hasOwnProperty.call(message, "error"))
814
+ $root.org.dash.platform.dapi.v0.PlatformErrorV0.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
815
+ return writer;
816
+ };
817
+
818
+ /**
819
+ * Encodes the specified PlatformEventsResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.verify|verify} messages.
820
+ * @function encodeDelimited
821
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
822
+ * @static
823
+ * @param {org.dash.platform.dapi.v0.PlatformEventsResponse.IPlatformEventsResponseV0} message PlatformEventsResponseV0 message or plain object to encode
824
+ * @param {$protobuf.Writer} [writer] Writer to encode to
825
+ * @returns {$protobuf.Writer} Writer
826
+ */
827
+ PlatformEventsResponseV0.encodeDelimited = function encodeDelimited(message, writer) {
828
+ return this.encode(message, writer).ldelim();
829
+ };
830
+
831
+ /**
832
+ * Decodes a PlatformEventsResponseV0 message from the specified reader or buffer.
833
+ * @function decode
834
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
835
+ * @static
836
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
837
+ * @param {number} [length] Message length if known beforehand
838
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0} PlatformEventsResponseV0
839
+ * @throws {Error} If the payload is not a reader or valid buffer
840
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
841
+ */
842
+ PlatformEventsResponseV0.decode = function decode(reader, length) {
843
+ if (!(reader instanceof $Reader))
844
+ reader = $Reader.create(reader);
845
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0();
846
+ while (reader.pos < end) {
847
+ var tag = reader.uint32();
848
+ switch (tag >>> 3) {
849
+ case 1:
850
+ message.event = $root.org.dash.platform.dapi.v0.PlatformEventMessageV0.decode(reader, reader.uint32());
851
+ break;
852
+ case 2:
853
+ message.ack = $root.org.dash.platform.dapi.v0.AckV0.decode(reader, reader.uint32());
854
+ break;
855
+ case 3:
856
+ message.error = $root.org.dash.platform.dapi.v0.PlatformErrorV0.decode(reader, reader.uint32());
857
+ break;
858
+ default:
859
+ reader.skipType(tag & 7);
860
+ break;
861
+ }
862
+ }
863
+ return message;
864
+ };
865
+
866
+ /**
867
+ * Decodes a PlatformEventsResponseV0 message from the specified reader or buffer, length delimited.
868
+ * @function decodeDelimited
869
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
870
+ * @static
871
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
872
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0} PlatformEventsResponseV0
873
+ * @throws {Error} If the payload is not a reader or valid buffer
874
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
875
+ */
876
+ PlatformEventsResponseV0.decodeDelimited = function decodeDelimited(reader) {
877
+ if (!(reader instanceof $Reader))
878
+ reader = new $Reader(reader);
879
+ return this.decode(reader, reader.uint32());
880
+ };
881
+
882
+ /**
883
+ * Verifies a PlatformEventsResponseV0 message.
884
+ * @function verify
885
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
886
+ * @static
887
+ * @param {Object.<string,*>} message Plain object to verify
888
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
889
+ */
890
+ PlatformEventsResponseV0.verify = function verify(message) {
891
+ if (typeof message !== "object" || message === null)
892
+ return "object expected";
893
+ var properties = {};
894
+ if (message.event != null && message.hasOwnProperty("event")) {
895
+ properties.response = 1;
896
+ {
897
+ var error = $root.org.dash.platform.dapi.v0.PlatformEventMessageV0.verify(message.event);
898
+ if (error)
899
+ return "event." + error;
900
+ }
901
+ }
902
+ if (message.ack != null && message.hasOwnProperty("ack")) {
903
+ if (properties.response === 1)
904
+ return "response: multiple values";
905
+ properties.response = 1;
906
+ {
907
+ var error = $root.org.dash.platform.dapi.v0.AckV0.verify(message.ack);
908
+ if (error)
909
+ return "ack." + error;
910
+ }
911
+ }
912
+ if (message.error != null && message.hasOwnProperty("error")) {
913
+ if (properties.response === 1)
914
+ return "response: multiple values";
915
+ properties.response = 1;
916
+ {
917
+ var error = $root.org.dash.platform.dapi.v0.PlatformErrorV0.verify(message.error);
918
+ if (error)
919
+ return "error." + error;
920
+ }
921
+ }
922
+ return null;
923
+ };
924
+
925
+ /**
926
+ * Creates a PlatformEventsResponseV0 message from a plain object. Also converts values to their respective internal types.
927
+ * @function fromObject
928
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
929
+ * @static
930
+ * @param {Object.<string,*>} object Plain object
931
+ * @returns {org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0} PlatformEventsResponseV0
932
+ */
933
+ PlatformEventsResponseV0.fromObject = function fromObject(object) {
934
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0)
935
+ return object;
936
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0();
937
+ if (object.event != null) {
938
+ if (typeof object.event !== "object")
939
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.event: object expected");
940
+ message.event = $root.org.dash.platform.dapi.v0.PlatformEventMessageV0.fromObject(object.event);
941
+ }
942
+ if (object.ack != null) {
943
+ if (typeof object.ack !== "object")
944
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.ack: object expected");
945
+ message.ack = $root.org.dash.platform.dapi.v0.AckV0.fromObject(object.ack);
946
+ }
947
+ if (object.error != null) {
948
+ if (typeof object.error !== "object")
949
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0.error: object expected");
950
+ message.error = $root.org.dash.platform.dapi.v0.PlatformErrorV0.fromObject(object.error);
951
+ }
952
+ return message;
953
+ };
954
+
955
+ /**
956
+ * Creates a plain object from a PlatformEventsResponseV0 message. Also converts values to other types if specified.
957
+ * @function toObject
958
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
959
+ * @static
960
+ * @param {org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0} message PlatformEventsResponseV0
961
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
962
+ * @returns {Object.<string,*>} Plain object
963
+ */
964
+ PlatformEventsResponseV0.toObject = function toObject(message, options) {
965
+ if (!options)
966
+ options = {};
967
+ var object = {};
968
+ if (message.event != null && message.hasOwnProperty("event")) {
969
+ object.event = $root.org.dash.platform.dapi.v0.PlatformEventMessageV0.toObject(message.event, options);
970
+ if (options.oneofs)
971
+ object.response = "event";
972
+ }
973
+ if (message.ack != null && message.hasOwnProperty("ack")) {
974
+ object.ack = $root.org.dash.platform.dapi.v0.AckV0.toObject(message.ack, options);
975
+ if (options.oneofs)
976
+ object.response = "ack";
977
+ }
978
+ if (message.error != null && message.hasOwnProperty("error")) {
979
+ object.error = $root.org.dash.platform.dapi.v0.PlatformErrorV0.toObject(message.error, options);
980
+ if (options.oneofs)
981
+ object.response = "error";
982
+ }
983
+ return object;
984
+ };
985
+
986
+ /**
987
+ * Converts this PlatformEventsResponseV0 to JSON.
988
+ * @function toJSON
989
+ * @memberof org.dash.platform.dapi.v0.PlatformEventsResponse.PlatformEventsResponseV0
990
+ * @instance
991
+ * @returns {Object.<string,*>} JSON object
992
+ */
993
+ PlatformEventsResponseV0.prototype.toJSON = function toJSON() {
994
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
995
+ };
996
+
997
+ return PlatformEventsResponseV0;
998
+ })();
999
+
1000
+ return PlatformEventsResponse;
1001
+ })();
1002
+
1003
+ v0.AddSubscriptionV0 = (function() {
1004
+
1005
+ /**
1006
+ * Properties of an AddSubscriptionV0.
1007
+ * @memberof org.dash.platform.dapi.v0
1008
+ * @interface IAddSubscriptionV0
1009
+ * @property {string|null} [clientSubscriptionId] AddSubscriptionV0 clientSubscriptionId
1010
+ * @property {org.dash.platform.dapi.v0.IPlatformFilterV0|null} [filter] AddSubscriptionV0 filter
1011
+ */
1012
+
1013
+ /**
1014
+ * Constructs a new AddSubscriptionV0.
1015
+ * @memberof org.dash.platform.dapi.v0
1016
+ * @classdesc Represents an AddSubscriptionV0.
1017
+ * @implements IAddSubscriptionV0
1018
+ * @constructor
1019
+ * @param {org.dash.platform.dapi.v0.IAddSubscriptionV0=} [properties] Properties to set
1020
+ */
1021
+ function AddSubscriptionV0(properties) {
1022
+ if (properties)
1023
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1024
+ if (properties[keys[i]] != null)
1025
+ this[keys[i]] = properties[keys[i]];
1026
+ }
1027
+
1028
+ /**
1029
+ * AddSubscriptionV0 clientSubscriptionId.
1030
+ * @member {string} clientSubscriptionId
1031
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1032
+ * @instance
1033
+ */
1034
+ AddSubscriptionV0.prototype.clientSubscriptionId = "";
1035
+
1036
+ /**
1037
+ * AddSubscriptionV0 filter.
1038
+ * @member {org.dash.platform.dapi.v0.IPlatformFilterV0|null|undefined} filter
1039
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1040
+ * @instance
1041
+ */
1042
+ AddSubscriptionV0.prototype.filter = null;
1043
+
1044
+ /**
1045
+ * Creates a new AddSubscriptionV0 instance using the specified properties.
1046
+ * @function create
1047
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1048
+ * @static
1049
+ * @param {org.dash.platform.dapi.v0.IAddSubscriptionV0=} [properties] Properties to set
1050
+ * @returns {org.dash.platform.dapi.v0.AddSubscriptionV0} AddSubscriptionV0 instance
1051
+ */
1052
+ AddSubscriptionV0.create = function create(properties) {
1053
+ return new AddSubscriptionV0(properties);
1054
+ };
1055
+
1056
+ /**
1057
+ * Encodes the specified AddSubscriptionV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.AddSubscriptionV0.verify|verify} messages.
1058
+ * @function encode
1059
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1060
+ * @static
1061
+ * @param {org.dash.platform.dapi.v0.IAddSubscriptionV0} message AddSubscriptionV0 message or plain object to encode
1062
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1063
+ * @returns {$protobuf.Writer} Writer
1064
+ */
1065
+ AddSubscriptionV0.encode = function encode(message, writer) {
1066
+ if (!writer)
1067
+ writer = $Writer.create();
1068
+ if (message.clientSubscriptionId != null && Object.hasOwnProperty.call(message, "clientSubscriptionId"))
1069
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientSubscriptionId);
1070
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
1071
+ $root.org.dash.platform.dapi.v0.PlatformFilterV0.encode(message.filter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
1072
+ return writer;
1073
+ };
1074
+
1075
+ /**
1076
+ * Encodes the specified AddSubscriptionV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.AddSubscriptionV0.verify|verify} messages.
1077
+ * @function encodeDelimited
1078
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1079
+ * @static
1080
+ * @param {org.dash.platform.dapi.v0.IAddSubscriptionV0} message AddSubscriptionV0 message or plain object to encode
1081
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1082
+ * @returns {$protobuf.Writer} Writer
1083
+ */
1084
+ AddSubscriptionV0.encodeDelimited = function encodeDelimited(message, writer) {
1085
+ return this.encode(message, writer).ldelim();
1086
+ };
1087
+
1088
+ /**
1089
+ * Decodes an AddSubscriptionV0 message from the specified reader or buffer.
1090
+ * @function decode
1091
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1092
+ * @static
1093
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1094
+ * @param {number} [length] Message length if known beforehand
1095
+ * @returns {org.dash.platform.dapi.v0.AddSubscriptionV0} AddSubscriptionV0
1096
+ * @throws {Error} If the payload is not a reader or valid buffer
1097
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1098
+ */
1099
+ AddSubscriptionV0.decode = function decode(reader, length) {
1100
+ if (!(reader instanceof $Reader))
1101
+ reader = $Reader.create(reader);
1102
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.AddSubscriptionV0();
1103
+ while (reader.pos < end) {
1104
+ var tag = reader.uint32();
1105
+ switch (tag >>> 3) {
1106
+ case 1:
1107
+ message.clientSubscriptionId = reader.string();
1108
+ break;
1109
+ case 2:
1110
+ message.filter = $root.org.dash.platform.dapi.v0.PlatformFilterV0.decode(reader, reader.uint32());
1111
+ break;
1112
+ default:
1113
+ reader.skipType(tag & 7);
1114
+ break;
1115
+ }
1116
+ }
1117
+ return message;
1118
+ };
1119
+
1120
+ /**
1121
+ * Decodes an AddSubscriptionV0 message from the specified reader or buffer, length delimited.
1122
+ * @function decodeDelimited
1123
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1124
+ * @static
1125
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1126
+ * @returns {org.dash.platform.dapi.v0.AddSubscriptionV0} AddSubscriptionV0
1127
+ * @throws {Error} If the payload is not a reader or valid buffer
1128
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1129
+ */
1130
+ AddSubscriptionV0.decodeDelimited = function decodeDelimited(reader) {
1131
+ if (!(reader instanceof $Reader))
1132
+ reader = new $Reader(reader);
1133
+ return this.decode(reader, reader.uint32());
1134
+ };
1135
+
1136
+ /**
1137
+ * Verifies an AddSubscriptionV0 message.
1138
+ * @function verify
1139
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1140
+ * @static
1141
+ * @param {Object.<string,*>} message Plain object to verify
1142
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1143
+ */
1144
+ AddSubscriptionV0.verify = function verify(message) {
1145
+ if (typeof message !== "object" || message === null)
1146
+ return "object expected";
1147
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1148
+ if (!$util.isString(message.clientSubscriptionId))
1149
+ return "clientSubscriptionId: string expected";
1150
+ if (message.filter != null && message.hasOwnProperty("filter")) {
1151
+ var error = $root.org.dash.platform.dapi.v0.PlatformFilterV0.verify(message.filter);
1152
+ if (error)
1153
+ return "filter." + error;
1154
+ }
1155
+ return null;
1156
+ };
1157
+
1158
+ /**
1159
+ * Creates an AddSubscriptionV0 message from a plain object. Also converts values to their respective internal types.
1160
+ * @function fromObject
1161
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1162
+ * @static
1163
+ * @param {Object.<string,*>} object Plain object
1164
+ * @returns {org.dash.platform.dapi.v0.AddSubscriptionV0} AddSubscriptionV0
1165
+ */
1166
+ AddSubscriptionV0.fromObject = function fromObject(object) {
1167
+ if (object instanceof $root.org.dash.platform.dapi.v0.AddSubscriptionV0)
1168
+ return object;
1169
+ var message = new $root.org.dash.platform.dapi.v0.AddSubscriptionV0();
1170
+ if (object.clientSubscriptionId != null)
1171
+ message.clientSubscriptionId = String(object.clientSubscriptionId);
1172
+ if (object.filter != null) {
1173
+ if (typeof object.filter !== "object")
1174
+ throw TypeError(".org.dash.platform.dapi.v0.AddSubscriptionV0.filter: object expected");
1175
+ message.filter = $root.org.dash.platform.dapi.v0.PlatformFilterV0.fromObject(object.filter);
1176
+ }
1177
+ return message;
1178
+ };
1179
+
1180
+ /**
1181
+ * Creates a plain object from an AddSubscriptionV0 message. Also converts values to other types if specified.
1182
+ * @function toObject
1183
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1184
+ * @static
1185
+ * @param {org.dash.platform.dapi.v0.AddSubscriptionV0} message AddSubscriptionV0
1186
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1187
+ * @returns {Object.<string,*>} Plain object
1188
+ */
1189
+ AddSubscriptionV0.toObject = function toObject(message, options) {
1190
+ if (!options)
1191
+ options = {};
1192
+ var object = {};
1193
+ if (options.defaults) {
1194
+ object.clientSubscriptionId = "";
1195
+ object.filter = null;
1196
+ }
1197
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1198
+ object.clientSubscriptionId = message.clientSubscriptionId;
1199
+ if (message.filter != null && message.hasOwnProperty("filter"))
1200
+ object.filter = $root.org.dash.platform.dapi.v0.PlatformFilterV0.toObject(message.filter, options);
1201
+ return object;
1202
+ };
1203
+
1204
+ /**
1205
+ * Converts this AddSubscriptionV0 to JSON.
1206
+ * @function toJSON
1207
+ * @memberof org.dash.platform.dapi.v0.AddSubscriptionV0
1208
+ * @instance
1209
+ * @returns {Object.<string,*>} JSON object
1210
+ */
1211
+ AddSubscriptionV0.prototype.toJSON = function toJSON() {
1212
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1213
+ };
1214
+
1215
+ return AddSubscriptionV0;
1216
+ })();
1217
+
1218
+ v0.RemoveSubscriptionV0 = (function() {
1219
+
1220
+ /**
1221
+ * Properties of a RemoveSubscriptionV0.
1222
+ * @memberof org.dash.platform.dapi.v0
1223
+ * @interface IRemoveSubscriptionV0
1224
+ * @property {string|null} [clientSubscriptionId] RemoveSubscriptionV0 clientSubscriptionId
1225
+ */
1226
+
1227
+ /**
1228
+ * Constructs a new RemoveSubscriptionV0.
1229
+ * @memberof org.dash.platform.dapi.v0
1230
+ * @classdesc Represents a RemoveSubscriptionV0.
1231
+ * @implements IRemoveSubscriptionV0
1232
+ * @constructor
1233
+ * @param {org.dash.platform.dapi.v0.IRemoveSubscriptionV0=} [properties] Properties to set
1234
+ */
1235
+ function RemoveSubscriptionV0(properties) {
1236
+ if (properties)
1237
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1238
+ if (properties[keys[i]] != null)
1239
+ this[keys[i]] = properties[keys[i]];
1240
+ }
1241
+
1242
+ /**
1243
+ * RemoveSubscriptionV0 clientSubscriptionId.
1244
+ * @member {string} clientSubscriptionId
1245
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1246
+ * @instance
1247
+ */
1248
+ RemoveSubscriptionV0.prototype.clientSubscriptionId = "";
1249
+
1250
+ /**
1251
+ * Creates a new RemoveSubscriptionV0 instance using the specified properties.
1252
+ * @function create
1253
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1254
+ * @static
1255
+ * @param {org.dash.platform.dapi.v0.IRemoveSubscriptionV0=} [properties] Properties to set
1256
+ * @returns {org.dash.platform.dapi.v0.RemoveSubscriptionV0} RemoveSubscriptionV0 instance
1257
+ */
1258
+ RemoveSubscriptionV0.create = function create(properties) {
1259
+ return new RemoveSubscriptionV0(properties);
1260
+ };
1261
+
1262
+ /**
1263
+ * Encodes the specified RemoveSubscriptionV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.RemoveSubscriptionV0.verify|verify} messages.
1264
+ * @function encode
1265
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1266
+ * @static
1267
+ * @param {org.dash.platform.dapi.v0.IRemoveSubscriptionV0} message RemoveSubscriptionV0 message or plain object to encode
1268
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1269
+ * @returns {$protobuf.Writer} Writer
1270
+ */
1271
+ RemoveSubscriptionV0.encode = function encode(message, writer) {
1272
+ if (!writer)
1273
+ writer = $Writer.create();
1274
+ if (message.clientSubscriptionId != null && Object.hasOwnProperty.call(message, "clientSubscriptionId"))
1275
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientSubscriptionId);
1276
+ return writer;
1277
+ };
1278
+
1279
+ /**
1280
+ * Encodes the specified RemoveSubscriptionV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.RemoveSubscriptionV0.verify|verify} messages.
1281
+ * @function encodeDelimited
1282
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1283
+ * @static
1284
+ * @param {org.dash.platform.dapi.v0.IRemoveSubscriptionV0} message RemoveSubscriptionV0 message or plain object to encode
1285
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1286
+ * @returns {$protobuf.Writer} Writer
1287
+ */
1288
+ RemoveSubscriptionV0.encodeDelimited = function encodeDelimited(message, writer) {
1289
+ return this.encode(message, writer).ldelim();
1290
+ };
1291
+
1292
+ /**
1293
+ * Decodes a RemoveSubscriptionV0 message from the specified reader or buffer.
1294
+ * @function decode
1295
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1296
+ * @static
1297
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1298
+ * @param {number} [length] Message length if known beforehand
1299
+ * @returns {org.dash.platform.dapi.v0.RemoveSubscriptionV0} RemoveSubscriptionV0
1300
+ * @throws {Error} If the payload is not a reader or valid buffer
1301
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1302
+ */
1303
+ RemoveSubscriptionV0.decode = function decode(reader, length) {
1304
+ if (!(reader instanceof $Reader))
1305
+ reader = $Reader.create(reader);
1306
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.RemoveSubscriptionV0();
1307
+ while (reader.pos < end) {
1308
+ var tag = reader.uint32();
1309
+ switch (tag >>> 3) {
1310
+ case 1:
1311
+ message.clientSubscriptionId = reader.string();
1312
+ break;
1313
+ default:
1314
+ reader.skipType(tag & 7);
1315
+ break;
1316
+ }
1317
+ }
1318
+ return message;
1319
+ };
1320
+
1321
+ /**
1322
+ * Decodes a RemoveSubscriptionV0 message from the specified reader or buffer, length delimited.
1323
+ * @function decodeDelimited
1324
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1325
+ * @static
1326
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1327
+ * @returns {org.dash.platform.dapi.v0.RemoveSubscriptionV0} RemoveSubscriptionV0
1328
+ * @throws {Error} If the payload is not a reader or valid buffer
1329
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1330
+ */
1331
+ RemoveSubscriptionV0.decodeDelimited = function decodeDelimited(reader) {
1332
+ if (!(reader instanceof $Reader))
1333
+ reader = new $Reader(reader);
1334
+ return this.decode(reader, reader.uint32());
1335
+ };
1336
+
1337
+ /**
1338
+ * Verifies a RemoveSubscriptionV0 message.
1339
+ * @function verify
1340
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1341
+ * @static
1342
+ * @param {Object.<string,*>} message Plain object to verify
1343
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1344
+ */
1345
+ RemoveSubscriptionV0.verify = function verify(message) {
1346
+ if (typeof message !== "object" || message === null)
1347
+ return "object expected";
1348
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1349
+ if (!$util.isString(message.clientSubscriptionId))
1350
+ return "clientSubscriptionId: string expected";
1351
+ return null;
1352
+ };
1353
+
1354
+ /**
1355
+ * Creates a RemoveSubscriptionV0 message from a plain object. Also converts values to their respective internal types.
1356
+ * @function fromObject
1357
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1358
+ * @static
1359
+ * @param {Object.<string,*>} object Plain object
1360
+ * @returns {org.dash.platform.dapi.v0.RemoveSubscriptionV0} RemoveSubscriptionV0
1361
+ */
1362
+ RemoveSubscriptionV0.fromObject = function fromObject(object) {
1363
+ if (object instanceof $root.org.dash.platform.dapi.v0.RemoveSubscriptionV0)
1364
+ return object;
1365
+ var message = new $root.org.dash.platform.dapi.v0.RemoveSubscriptionV0();
1366
+ if (object.clientSubscriptionId != null)
1367
+ message.clientSubscriptionId = String(object.clientSubscriptionId);
1368
+ return message;
1369
+ };
1370
+
1371
+ /**
1372
+ * Creates a plain object from a RemoveSubscriptionV0 message. Also converts values to other types if specified.
1373
+ * @function toObject
1374
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1375
+ * @static
1376
+ * @param {org.dash.platform.dapi.v0.RemoveSubscriptionV0} message RemoveSubscriptionV0
1377
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1378
+ * @returns {Object.<string,*>} Plain object
1379
+ */
1380
+ RemoveSubscriptionV0.toObject = function toObject(message, options) {
1381
+ if (!options)
1382
+ options = {};
1383
+ var object = {};
1384
+ if (options.defaults)
1385
+ object.clientSubscriptionId = "";
1386
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1387
+ object.clientSubscriptionId = message.clientSubscriptionId;
1388
+ return object;
1389
+ };
1390
+
1391
+ /**
1392
+ * Converts this RemoveSubscriptionV0 to JSON.
1393
+ * @function toJSON
1394
+ * @memberof org.dash.platform.dapi.v0.RemoveSubscriptionV0
1395
+ * @instance
1396
+ * @returns {Object.<string,*>} JSON object
1397
+ */
1398
+ RemoveSubscriptionV0.prototype.toJSON = function toJSON() {
1399
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1400
+ };
1401
+
1402
+ return RemoveSubscriptionV0;
1403
+ })();
1404
+
1405
+ v0.AckV0 = (function() {
1406
+
1407
+ /**
1408
+ * Properties of an AckV0.
1409
+ * @memberof org.dash.platform.dapi.v0
1410
+ * @interface IAckV0
1411
+ * @property {string|null} [clientSubscriptionId] AckV0 clientSubscriptionId
1412
+ * @property {string|null} [op] AckV0 op
1413
+ */
1414
+
1415
+ /**
1416
+ * Constructs a new AckV0.
1417
+ * @memberof org.dash.platform.dapi.v0
1418
+ * @classdesc Represents an AckV0.
1419
+ * @implements IAckV0
1420
+ * @constructor
1421
+ * @param {org.dash.platform.dapi.v0.IAckV0=} [properties] Properties to set
1422
+ */
1423
+ function AckV0(properties) {
1424
+ if (properties)
1425
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1426
+ if (properties[keys[i]] != null)
1427
+ this[keys[i]] = properties[keys[i]];
1428
+ }
1429
+
1430
+ /**
1431
+ * AckV0 clientSubscriptionId.
1432
+ * @member {string} clientSubscriptionId
1433
+ * @memberof org.dash.platform.dapi.v0.AckV0
1434
+ * @instance
1435
+ */
1436
+ AckV0.prototype.clientSubscriptionId = "";
1437
+
1438
+ /**
1439
+ * AckV0 op.
1440
+ * @member {string} op
1441
+ * @memberof org.dash.platform.dapi.v0.AckV0
1442
+ * @instance
1443
+ */
1444
+ AckV0.prototype.op = "";
1445
+
1446
+ /**
1447
+ * Creates a new AckV0 instance using the specified properties.
1448
+ * @function create
1449
+ * @memberof org.dash.platform.dapi.v0.AckV0
1450
+ * @static
1451
+ * @param {org.dash.platform.dapi.v0.IAckV0=} [properties] Properties to set
1452
+ * @returns {org.dash.platform.dapi.v0.AckV0} AckV0 instance
1453
+ */
1454
+ AckV0.create = function create(properties) {
1455
+ return new AckV0(properties);
1456
+ };
1457
+
1458
+ /**
1459
+ * Encodes the specified AckV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.AckV0.verify|verify} messages.
1460
+ * @function encode
1461
+ * @memberof org.dash.platform.dapi.v0.AckV0
1462
+ * @static
1463
+ * @param {org.dash.platform.dapi.v0.IAckV0} message AckV0 message or plain object to encode
1464
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1465
+ * @returns {$protobuf.Writer} Writer
1466
+ */
1467
+ AckV0.encode = function encode(message, writer) {
1468
+ if (!writer)
1469
+ writer = $Writer.create();
1470
+ if (message.clientSubscriptionId != null && Object.hasOwnProperty.call(message, "clientSubscriptionId"))
1471
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientSubscriptionId);
1472
+ if (message.op != null && Object.hasOwnProperty.call(message, "op"))
1473
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.op);
1474
+ return writer;
1475
+ };
1476
+
1477
+ /**
1478
+ * Encodes the specified AckV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.AckV0.verify|verify} messages.
1479
+ * @function encodeDelimited
1480
+ * @memberof org.dash.platform.dapi.v0.AckV0
1481
+ * @static
1482
+ * @param {org.dash.platform.dapi.v0.IAckV0} message AckV0 message or plain object to encode
1483
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1484
+ * @returns {$protobuf.Writer} Writer
1485
+ */
1486
+ AckV0.encodeDelimited = function encodeDelimited(message, writer) {
1487
+ return this.encode(message, writer).ldelim();
1488
+ };
1489
+
1490
+ /**
1491
+ * Decodes an AckV0 message from the specified reader or buffer.
1492
+ * @function decode
1493
+ * @memberof org.dash.platform.dapi.v0.AckV0
1494
+ * @static
1495
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1496
+ * @param {number} [length] Message length if known beforehand
1497
+ * @returns {org.dash.platform.dapi.v0.AckV0} AckV0
1498
+ * @throws {Error} If the payload is not a reader or valid buffer
1499
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1500
+ */
1501
+ AckV0.decode = function decode(reader, length) {
1502
+ if (!(reader instanceof $Reader))
1503
+ reader = $Reader.create(reader);
1504
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.AckV0();
1505
+ while (reader.pos < end) {
1506
+ var tag = reader.uint32();
1507
+ switch (tag >>> 3) {
1508
+ case 1:
1509
+ message.clientSubscriptionId = reader.string();
1510
+ break;
1511
+ case 2:
1512
+ message.op = reader.string();
1513
+ break;
1514
+ default:
1515
+ reader.skipType(tag & 7);
1516
+ break;
1517
+ }
1518
+ }
1519
+ return message;
1520
+ };
1521
+
1522
+ /**
1523
+ * Decodes an AckV0 message from the specified reader or buffer, length delimited.
1524
+ * @function decodeDelimited
1525
+ * @memberof org.dash.platform.dapi.v0.AckV0
1526
+ * @static
1527
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1528
+ * @returns {org.dash.platform.dapi.v0.AckV0} AckV0
1529
+ * @throws {Error} If the payload is not a reader or valid buffer
1530
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1531
+ */
1532
+ AckV0.decodeDelimited = function decodeDelimited(reader) {
1533
+ if (!(reader instanceof $Reader))
1534
+ reader = new $Reader(reader);
1535
+ return this.decode(reader, reader.uint32());
1536
+ };
1537
+
1538
+ /**
1539
+ * Verifies an AckV0 message.
1540
+ * @function verify
1541
+ * @memberof org.dash.platform.dapi.v0.AckV0
1542
+ * @static
1543
+ * @param {Object.<string,*>} message Plain object to verify
1544
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1545
+ */
1546
+ AckV0.verify = function verify(message) {
1547
+ if (typeof message !== "object" || message === null)
1548
+ return "object expected";
1549
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1550
+ if (!$util.isString(message.clientSubscriptionId))
1551
+ return "clientSubscriptionId: string expected";
1552
+ if (message.op != null && message.hasOwnProperty("op"))
1553
+ if (!$util.isString(message.op))
1554
+ return "op: string expected";
1555
+ return null;
1556
+ };
1557
+
1558
+ /**
1559
+ * Creates an AckV0 message from a plain object. Also converts values to their respective internal types.
1560
+ * @function fromObject
1561
+ * @memberof org.dash.platform.dapi.v0.AckV0
1562
+ * @static
1563
+ * @param {Object.<string,*>} object Plain object
1564
+ * @returns {org.dash.platform.dapi.v0.AckV0} AckV0
1565
+ */
1566
+ AckV0.fromObject = function fromObject(object) {
1567
+ if (object instanceof $root.org.dash.platform.dapi.v0.AckV0)
1568
+ return object;
1569
+ var message = new $root.org.dash.platform.dapi.v0.AckV0();
1570
+ if (object.clientSubscriptionId != null)
1571
+ message.clientSubscriptionId = String(object.clientSubscriptionId);
1572
+ if (object.op != null)
1573
+ message.op = String(object.op);
1574
+ return message;
1575
+ };
1576
+
1577
+ /**
1578
+ * Creates a plain object from an AckV0 message. Also converts values to other types if specified.
1579
+ * @function toObject
1580
+ * @memberof org.dash.platform.dapi.v0.AckV0
1581
+ * @static
1582
+ * @param {org.dash.platform.dapi.v0.AckV0} message AckV0
1583
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1584
+ * @returns {Object.<string,*>} Plain object
1585
+ */
1586
+ AckV0.toObject = function toObject(message, options) {
1587
+ if (!options)
1588
+ options = {};
1589
+ var object = {};
1590
+ if (options.defaults) {
1591
+ object.clientSubscriptionId = "";
1592
+ object.op = "";
1593
+ }
1594
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1595
+ object.clientSubscriptionId = message.clientSubscriptionId;
1596
+ if (message.op != null && message.hasOwnProperty("op"))
1597
+ object.op = message.op;
1598
+ return object;
1599
+ };
1600
+
1601
+ /**
1602
+ * Converts this AckV0 to JSON.
1603
+ * @function toJSON
1604
+ * @memberof org.dash.platform.dapi.v0.AckV0
1605
+ * @instance
1606
+ * @returns {Object.<string,*>} JSON object
1607
+ */
1608
+ AckV0.prototype.toJSON = function toJSON() {
1609
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1610
+ };
1611
+
1612
+ return AckV0;
1613
+ })();
1614
+
1615
+ v0.PlatformErrorV0 = (function() {
1616
+
1617
+ /**
1618
+ * Properties of a PlatformErrorV0.
1619
+ * @memberof org.dash.platform.dapi.v0
1620
+ * @interface IPlatformErrorV0
1621
+ * @property {string|null} [clientSubscriptionId] PlatformErrorV0 clientSubscriptionId
1622
+ * @property {number|null} [code] PlatformErrorV0 code
1623
+ * @property {string|null} [message] PlatformErrorV0 message
1624
+ */
1625
+
1626
+ /**
1627
+ * Constructs a new PlatformErrorV0.
1628
+ * @memberof org.dash.platform.dapi.v0
1629
+ * @classdesc Represents a PlatformErrorV0.
1630
+ * @implements IPlatformErrorV0
1631
+ * @constructor
1632
+ * @param {org.dash.platform.dapi.v0.IPlatformErrorV0=} [properties] Properties to set
1633
+ */
1634
+ function PlatformErrorV0(properties) {
1635
+ if (properties)
1636
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1637
+ if (properties[keys[i]] != null)
1638
+ this[keys[i]] = properties[keys[i]];
1639
+ }
1640
+
1641
+ /**
1642
+ * PlatformErrorV0 clientSubscriptionId.
1643
+ * @member {string} clientSubscriptionId
1644
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1645
+ * @instance
1646
+ */
1647
+ PlatformErrorV0.prototype.clientSubscriptionId = "";
1648
+
1649
+ /**
1650
+ * PlatformErrorV0 code.
1651
+ * @member {number} code
1652
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1653
+ * @instance
1654
+ */
1655
+ PlatformErrorV0.prototype.code = 0;
1656
+
1657
+ /**
1658
+ * PlatformErrorV0 message.
1659
+ * @member {string} message
1660
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1661
+ * @instance
1662
+ */
1663
+ PlatformErrorV0.prototype.message = "";
1664
+
1665
+ /**
1666
+ * Creates a new PlatformErrorV0 instance using the specified properties.
1667
+ * @function create
1668
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1669
+ * @static
1670
+ * @param {org.dash.platform.dapi.v0.IPlatformErrorV0=} [properties] Properties to set
1671
+ * @returns {org.dash.platform.dapi.v0.PlatformErrorV0} PlatformErrorV0 instance
1672
+ */
1673
+ PlatformErrorV0.create = function create(properties) {
1674
+ return new PlatformErrorV0(properties);
1675
+ };
1676
+
1677
+ /**
1678
+ * Encodes the specified PlatformErrorV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformErrorV0.verify|verify} messages.
1679
+ * @function encode
1680
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1681
+ * @static
1682
+ * @param {org.dash.platform.dapi.v0.IPlatformErrorV0} message PlatformErrorV0 message or plain object to encode
1683
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1684
+ * @returns {$protobuf.Writer} Writer
1685
+ */
1686
+ PlatformErrorV0.encode = function encode(message, writer) {
1687
+ if (!writer)
1688
+ writer = $Writer.create();
1689
+ if (message.clientSubscriptionId != null && Object.hasOwnProperty.call(message, "clientSubscriptionId"))
1690
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientSubscriptionId);
1691
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
1692
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.code);
1693
+ if (message.message != null && Object.hasOwnProperty.call(message, "message"))
1694
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.message);
1695
+ return writer;
1696
+ };
1697
+
1698
+ /**
1699
+ * Encodes the specified PlatformErrorV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformErrorV0.verify|verify} messages.
1700
+ * @function encodeDelimited
1701
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1702
+ * @static
1703
+ * @param {org.dash.platform.dapi.v0.IPlatformErrorV0} message PlatformErrorV0 message or plain object to encode
1704
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1705
+ * @returns {$protobuf.Writer} Writer
1706
+ */
1707
+ PlatformErrorV0.encodeDelimited = function encodeDelimited(message, writer) {
1708
+ return this.encode(message, writer).ldelim();
1709
+ };
1710
+
1711
+ /**
1712
+ * Decodes a PlatformErrorV0 message from the specified reader or buffer.
1713
+ * @function decode
1714
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1715
+ * @static
1716
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1717
+ * @param {number} [length] Message length if known beforehand
1718
+ * @returns {org.dash.platform.dapi.v0.PlatformErrorV0} PlatformErrorV0
1719
+ * @throws {Error} If the payload is not a reader or valid buffer
1720
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1721
+ */
1722
+ PlatformErrorV0.decode = function decode(reader, length) {
1723
+ if (!(reader instanceof $Reader))
1724
+ reader = $Reader.create(reader);
1725
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformErrorV0();
1726
+ while (reader.pos < end) {
1727
+ var tag = reader.uint32();
1728
+ switch (tag >>> 3) {
1729
+ case 1:
1730
+ message.clientSubscriptionId = reader.string();
1731
+ break;
1732
+ case 2:
1733
+ message.code = reader.uint32();
1734
+ break;
1735
+ case 3:
1736
+ message.message = reader.string();
1737
+ break;
1738
+ default:
1739
+ reader.skipType(tag & 7);
1740
+ break;
1741
+ }
1742
+ }
1743
+ return message;
1744
+ };
1745
+
1746
+ /**
1747
+ * Decodes a PlatformErrorV0 message from the specified reader or buffer, length delimited.
1748
+ * @function decodeDelimited
1749
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1750
+ * @static
1751
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1752
+ * @returns {org.dash.platform.dapi.v0.PlatformErrorV0} PlatformErrorV0
1753
+ * @throws {Error} If the payload is not a reader or valid buffer
1754
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1755
+ */
1756
+ PlatformErrorV0.decodeDelimited = function decodeDelimited(reader) {
1757
+ if (!(reader instanceof $Reader))
1758
+ reader = new $Reader(reader);
1759
+ return this.decode(reader, reader.uint32());
1760
+ };
1761
+
1762
+ /**
1763
+ * Verifies a PlatformErrorV0 message.
1764
+ * @function verify
1765
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1766
+ * @static
1767
+ * @param {Object.<string,*>} message Plain object to verify
1768
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1769
+ */
1770
+ PlatformErrorV0.verify = function verify(message) {
1771
+ if (typeof message !== "object" || message === null)
1772
+ return "object expected";
1773
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1774
+ if (!$util.isString(message.clientSubscriptionId))
1775
+ return "clientSubscriptionId: string expected";
1776
+ if (message.code != null && message.hasOwnProperty("code"))
1777
+ if (!$util.isInteger(message.code))
1778
+ return "code: integer expected";
1779
+ if (message.message != null && message.hasOwnProperty("message"))
1780
+ if (!$util.isString(message.message))
1781
+ return "message: string expected";
1782
+ return null;
1783
+ };
1784
+
1785
+ /**
1786
+ * Creates a PlatformErrorV0 message from a plain object. Also converts values to their respective internal types.
1787
+ * @function fromObject
1788
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1789
+ * @static
1790
+ * @param {Object.<string,*>} object Plain object
1791
+ * @returns {org.dash.platform.dapi.v0.PlatformErrorV0} PlatformErrorV0
1792
+ */
1793
+ PlatformErrorV0.fromObject = function fromObject(object) {
1794
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformErrorV0)
1795
+ return object;
1796
+ var message = new $root.org.dash.platform.dapi.v0.PlatformErrorV0();
1797
+ if (object.clientSubscriptionId != null)
1798
+ message.clientSubscriptionId = String(object.clientSubscriptionId);
1799
+ if (object.code != null)
1800
+ message.code = object.code >>> 0;
1801
+ if (object.message != null)
1802
+ message.message = String(object.message);
1803
+ return message;
1804
+ };
1805
+
1806
+ /**
1807
+ * Creates a plain object from a PlatformErrorV0 message. Also converts values to other types if specified.
1808
+ * @function toObject
1809
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1810
+ * @static
1811
+ * @param {org.dash.platform.dapi.v0.PlatformErrorV0} message PlatformErrorV0
1812
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1813
+ * @returns {Object.<string,*>} Plain object
1814
+ */
1815
+ PlatformErrorV0.toObject = function toObject(message, options) {
1816
+ if (!options)
1817
+ options = {};
1818
+ var object = {};
1819
+ if (options.defaults) {
1820
+ object.clientSubscriptionId = "";
1821
+ object.code = 0;
1822
+ object.message = "";
1823
+ }
1824
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1825
+ object.clientSubscriptionId = message.clientSubscriptionId;
1826
+ if (message.code != null && message.hasOwnProperty("code"))
1827
+ object.code = message.code;
1828
+ if (message.message != null && message.hasOwnProperty("message"))
1829
+ object.message = message.message;
1830
+ return object;
1831
+ };
1832
+
1833
+ /**
1834
+ * Converts this PlatformErrorV0 to JSON.
1835
+ * @function toJSON
1836
+ * @memberof org.dash.platform.dapi.v0.PlatformErrorV0
1837
+ * @instance
1838
+ * @returns {Object.<string,*>} JSON object
1839
+ */
1840
+ PlatformErrorV0.prototype.toJSON = function toJSON() {
1841
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1842
+ };
1843
+
1844
+ return PlatformErrorV0;
1845
+ })();
1846
+
1847
+ v0.PlatformEventMessageV0 = (function() {
1848
+
1849
+ /**
1850
+ * Properties of a PlatformEventMessageV0.
1851
+ * @memberof org.dash.platform.dapi.v0
1852
+ * @interface IPlatformEventMessageV0
1853
+ * @property {string|null} [clientSubscriptionId] PlatformEventMessageV0 clientSubscriptionId
1854
+ * @property {org.dash.platform.dapi.v0.IPlatformEventV0|null} [event] PlatformEventMessageV0 event
1855
+ */
1856
+
1857
+ /**
1858
+ * Constructs a new PlatformEventMessageV0.
1859
+ * @memberof org.dash.platform.dapi.v0
1860
+ * @classdesc Represents a PlatformEventMessageV0.
1861
+ * @implements IPlatformEventMessageV0
1862
+ * @constructor
1863
+ * @param {org.dash.platform.dapi.v0.IPlatformEventMessageV0=} [properties] Properties to set
1864
+ */
1865
+ function PlatformEventMessageV0(properties) {
1866
+ if (properties)
1867
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1868
+ if (properties[keys[i]] != null)
1869
+ this[keys[i]] = properties[keys[i]];
1870
+ }
1871
+
1872
+ /**
1873
+ * PlatformEventMessageV0 clientSubscriptionId.
1874
+ * @member {string} clientSubscriptionId
1875
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
1876
+ * @instance
1877
+ */
1878
+ PlatformEventMessageV0.prototype.clientSubscriptionId = "";
1879
+
1880
+ /**
1881
+ * PlatformEventMessageV0 event.
1882
+ * @member {org.dash.platform.dapi.v0.IPlatformEventV0|null|undefined} event
1883
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
1884
+ * @instance
1885
+ */
1886
+ PlatformEventMessageV0.prototype.event = null;
1887
+
1888
+ /**
1889
+ * Creates a new PlatformEventMessageV0 instance using the specified properties.
1890
+ * @function create
1891
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
1892
+ * @static
1893
+ * @param {org.dash.platform.dapi.v0.IPlatformEventMessageV0=} [properties] Properties to set
1894
+ * @returns {org.dash.platform.dapi.v0.PlatformEventMessageV0} PlatformEventMessageV0 instance
1895
+ */
1896
+ PlatformEventMessageV0.create = function create(properties) {
1897
+ return new PlatformEventMessageV0(properties);
1898
+ };
1899
+
1900
+ /**
1901
+ * Encodes the specified PlatformEventMessageV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventMessageV0.verify|verify} messages.
1902
+ * @function encode
1903
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
1904
+ * @static
1905
+ * @param {org.dash.platform.dapi.v0.IPlatformEventMessageV0} message PlatformEventMessageV0 message or plain object to encode
1906
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1907
+ * @returns {$protobuf.Writer} Writer
1908
+ */
1909
+ PlatformEventMessageV0.encode = function encode(message, writer) {
1910
+ if (!writer)
1911
+ writer = $Writer.create();
1912
+ if (message.clientSubscriptionId != null && Object.hasOwnProperty.call(message, "clientSubscriptionId"))
1913
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientSubscriptionId);
1914
+ if (message.event != null && Object.hasOwnProperty.call(message, "event"))
1915
+ $root.org.dash.platform.dapi.v0.PlatformEventV0.encode(message.event, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
1916
+ return writer;
1917
+ };
1918
+
1919
+ /**
1920
+ * Encodes the specified PlatformEventMessageV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventMessageV0.verify|verify} messages.
1921
+ * @function encodeDelimited
1922
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
1923
+ * @static
1924
+ * @param {org.dash.platform.dapi.v0.IPlatformEventMessageV0} message PlatformEventMessageV0 message or plain object to encode
1925
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1926
+ * @returns {$protobuf.Writer} Writer
1927
+ */
1928
+ PlatformEventMessageV0.encodeDelimited = function encodeDelimited(message, writer) {
1929
+ return this.encode(message, writer).ldelim();
1930
+ };
1931
+
1932
+ /**
1933
+ * Decodes a PlatformEventMessageV0 message from the specified reader or buffer.
1934
+ * @function decode
1935
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
1936
+ * @static
1937
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1938
+ * @param {number} [length] Message length if known beforehand
1939
+ * @returns {org.dash.platform.dapi.v0.PlatformEventMessageV0} PlatformEventMessageV0
1940
+ * @throws {Error} If the payload is not a reader or valid buffer
1941
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1942
+ */
1943
+ PlatformEventMessageV0.decode = function decode(reader, length) {
1944
+ if (!(reader instanceof $Reader))
1945
+ reader = $Reader.create(reader);
1946
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventMessageV0();
1947
+ while (reader.pos < end) {
1948
+ var tag = reader.uint32();
1949
+ switch (tag >>> 3) {
1950
+ case 1:
1951
+ message.clientSubscriptionId = reader.string();
1952
+ break;
1953
+ case 2:
1954
+ message.event = $root.org.dash.platform.dapi.v0.PlatformEventV0.decode(reader, reader.uint32());
1955
+ break;
1956
+ default:
1957
+ reader.skipType(tag & 7);
1958
+ break;
1959
+ }
1960
+ }
1961
+ return message;
1962
+ };
1963
+
1964
+ /**
1965
+ * Decodes a PlatformEventMessageV0 message from the specified reader or buffer, length delimited.
1966
+ * @function decodeDelimited
1967
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
1968
+ * @static
1969
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1970
+ * @returns {org.dash.platform.dapi.v0.PlatformEventMessageV0} PlatformEventMessageV0
1971
+ * @throws {Error} If the payload is not a reader or valid buffer
1972
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1973
+ */
1974
+ PlatformEventMessageV0.decodeDelimited = function decodeDelimited(reader) {
1975
+ if (!(reader instanceof $Reader))
1976
+ reader = new $Reader(reader);
1977
+ return this.decode(reader, reader.uint32());
1978
+ };
1979
+
1980
+ /**
1981
+ * Verifies a PlatformEventMessageV0 message.
1982
+ * @function verify
1983
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
1984
+ * @static
1985
+ * @param {Object.<string,*>} message Plain object to verify
1986
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1987
+ */
1988
+ PlatformEventMessageV0.verify = function verify(message) {
1989
+ if (typeof message !== "object" || message === null)
1990
+ return "object expected";
1991
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
1992
+ if (!$util.isString(message.clientSubscriptionId))
1993
+ return "clientSubscriptionId: string expected";
1994
+ if (message.event != null && message.hasOwnProperty("event")) {
1995
+ var error = $root.org.dash.platform.dapi.v0.PlatformEventV0.verify(message.event);
1996
+ if (error)
1997
+ return "event." + error;
1998
+ }
1999
+ return null;
2000
+ };
2001
+
2002
+ /**
2003
+ * Creates a PlatformEventMessageV0 message from a plain object. Also converts values to their respective internal types.
2004
+ * @function fromObject
2005
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
2006
+ * @static
2007
+ * @param {Object.<string,*>} object Plain object
2008
+ * @returns {org.dash.platform.dapi.v0.PlatformEventMessageV0} PlatformEventMessageV0
2009
+ */
2010
+ PlatformEventMessageV0.fromObject = function fromObject(object) {
2011
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventMessageV0)
2012
+ return object;
2013
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventMessageV0();
2014
+ if (object.clientSubscriptionId != null)
2015
+ message.clientSubscriptionId = String(object.clientSubscriptionId);
2016
+ if (object.event != null) {
2017
+ if (typeof object.event !== "object")
2018
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventMessageV0.event: object expected");
2019
+ message.event = $root.org.dash.platform.dapi.v0.PlatformEventV0.fromObject(object.event);
2020
+ }
2021
+ return message;
2022
+ };
2023
+
2024
+ /**
2025
+ * Creates a plain object from a PlatformEventMessageV0 message. Also converts values to other types if specified.
2026
+ * @function toObject
2027
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
2028
+ * @static
2029
+ * @param {org.dash.platform.dapi.v0.PlatformEventMessageV0} message PlatformEventMessageV0
2030
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2031
+ * @returns {Object.<string,*>} Plain object
2032
+ */
2033
+ PlatformEventMessageV0.toObject = function toObject(message, options) {
2034
+ if (!options)
2035
+ options = {};
2036
+ var object = {};
2037
+ if (options.defaults) {
2038
+ object.clientSubscriptionId = "";
2039
+ object.event = null;
2040
+ }
2041
+ if (message.clientSubscriptionId != null && message.hasOwnProperty("clientSubscriptionId"))
2042
+ object.clientSubscriptionId = message.clientSubscriptionId;
2043
+ if (message.event != null && message.hasOwnProperty("event"))
2044
+ object.event = $root.org.dash.platform.dapi.v0.PlatformEventV0.toObject(message.event, options);
2045
+ return object;
2046
+ };
2047
+
2048
+ /**
2049
+ * Converts this PlatformEventMessageV0 to JSON.
2050
+ * @function toJSON
2051
+ * @memberof org.dash.platform.dapi.v0.PlatformEventMessageV0
2052
+ * @instance
2053
+ * @returns {Object.<string,*>} JSON object
2054
+ */
2055
+ PlatformEventMessageV0.prototype.toJSON = function toJSON() {
2056
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2057
+ };
2058
+
2059
+ return PlatformEventMessageV0;
2060
+ })();
2061
+
2062
+ v0.StateTransitionResultFilter = (function() {
2063
+
2064
+ /**
2065
+ * Properties of a StateTransitionResultFilter.
2066
+ * @memberof org.dash.platform.dapi.v0
2067
+ * @interface IStateTransitionResultFilter
2068
+ * @property {Uint8Array|null} [txHash] StateTransitionResultFilter txHash
2069
+ */
2070
+
2071
+ /**
2072
+ * Constructs a new StateTransitionResultFilter.
2073
+ * @memberof org.dash.platform.dapi.v0
2074
+ * @classdesc Represents a StateTransitionResultFilter.
2075
+ * @implements IStateTransitionResultFilter
2076
+ * @constructor
2077
+ * @param {org.dash.platform.dapi.v0.IStateTransitionResultFilter=} [properties] Properties to set
2078
+ */
2079
+ function StateTransitionResultFilter(properties) {
2080
+ if (properties)
2081
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2082
+ if (properties[keys[i]] != null)
2083
+ this[keys[i]] = properties[keys[i]];
2084
+ }
2085
+
2086
+ /**
2087
+ * StateTransitionResultFilter txHash.
2088
+ * @member {Uint8Array} txHash
2089
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2090
+ * @instance
2091
+ */
2092
+ StateTransitionResultFilter.prototype.txHash = $util.newBuffer([]);
2093
+
2094
+ /**
2095
+ * Creates a new StateTransitionResultFilter instance using the specified properties.
2096
+ * @function create
2097
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2098
+ * @static
2099
+ * @param {org.dash.platform.dapi.v0.IStateTransitionResultFilter=} [properties] Properties to set
2100
+ * @returns {org.dash.platform.dapi.v0.StateTransitionResultFilter} StateTransitionResultFilter instance
2101
+ */
2102
+ StateTransitionResultFilter.create = function create(properties) {
2103
+ return new StateTransitionResultFilter(properties);
2104
+ };
2105
+
2106
+ /**
2107
+ * Encodes the specified StateTransitionResultFilter message. Does not implicitly {@link org.dash.platform.dapi.v0.StateTransitionResultFilter.verify|verify} messages.
2108
+ * @function encode
2109
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2110
+ * @static
2111
+ * @param {org.dash.platform.dapi.v0.IStateTransitionResultFilter} message StateTransitionResultFilter message or plain object to encode
2112
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2113
+ * @returns {$protobuf.Writer} Writer
2114
+ */
2115
+ StateTransitionResultFilter.encode = function encode(message, writer) {
2116
+ if (!writer)
2117
+ writer = $Writer.create();
2118
+ if (message.txHash != null && Object.hasOwnProperty.call(message, "txHash"))
2119
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.txHash);
2120
+ return writer;
2121
+ };
2122
+
2123
+ /**
2124
+ * Encodes the specified StateTransitionResultFilter message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.StateTransitionResultFilter.verify|verify} messages.
2125
+ * @function encodeDelimited
2126
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2127
+ * @static
2128
+ * @param {org.dash.platform.dapi.v0.IStateTransitionResultFilter} message StateTransitionResultFilter message or plain object to encode
2129
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2130
+ * @returns {$protobuf.Writer} Writer
2131
+ */
2132
+ StateTransitionResultFilter.encodeDelimited = function encodeDelimited(message, writer) {
2133
+ return this.encode(message, writer).ldelim();
2134
+ };
2135
+
2136
+ /**
2137
+ * Decodes a StateTransitionResultFilter message from the specified reader or buffer.
2138
+ * @function decode
2139
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2140
+ * @static
2141
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2142
+ * @param {number} [length] Message length if known beforehand
2143
+ * @returns {org.dash.platform.dapi.v0.StateTransitionResultFilter} StateTransitionResultFilter
2144
+ * @throws {Error} If the payload is not a reader or valid buffer
2145
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2146
+ */
2147
+ StateTransitionResultFilter.decode = function decode(reader, length) {
2148
+ if (!(reader instanceof $Reader))
2149
+ reader = $Reader.create(reader);
2150
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.StateTransitionResultFilter();
2151
+ while (reader.pos < end) {
2152
+ var tag = reader.uint32();
2153
+ switch (tag >>> 3) {
2154
+ case 1:
2155
+ message.txHash = reader.bytes();
2156
+ break;
2157
+ default:
2158
+ reader.skipType(tag & 7);
2159
+ break;
2160
+ }
2161
+ }
2162
+ return message;
2163
+ };
2164
+
2165
+ /**
2166
+ * Decodes a StateTransitionResultFilter message from the specified reader or buffer, length delimited.
2167
+ * @function decodeDelimited
2168
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2169
+ * @static
2170
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2171
+ * @returns {org.dash.platform.dapi.v0.StateTransitionResultFilter} StateTransitionResultFilter
2172
+ * @throws {Error} If the payload is not a reader or valid buffer
2173
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2174
+ */
2175
+ StateTransitionResultFilter.decodeDelimited = function decodeDelimited(reader) {
2176
+ if (!(reader instanceof $Reader))
2177
+ reader = new $Reader(reader);
2178
+ return this.decode(reader, reader.uint32());
2179
+ };
2180
+
2181
+ /**
2182
+ * Verifies a StateTransitionResultFilter message.
2183
+ * @function verify
2184
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2185
+ * @static
2186
+ * @param {Object.<string,*>} message Plain object to verify
2187
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2188
+ */
2189
+ StateTransitionResultFilter.verify = function verify(message) {
2190
+ if (typeof message !== "object" || message === null)
2191
+ return "object expected";
2192
+ if (message.txHash != null && message.hasOwnProperty("txHash"))
2193
+ if (!(message.txHash && typeof message.txHash.length === "number" || $util.isString(message.txHash)))
2194
+ return "txHash: buffer expected";
2195
+ return null;
2196
+ };
2197
+
2198
+ /**
2199
+ * Creates a StateTransitionResultFilter message from a plain object. Also converts values to their respective internal types.
2200
+ * @function fromObject
2201
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2202
+ * @static
2203
+ * @param {Object.<string,*>} object Plain object
2204
+ * @returns {org.dash.platform.dapi.v0.StateTransitionResultFilter} StateTransitionResultFilter
2205
+ */
2206
+ StateTransitionResultFilter.fromObject = function fromObject(object) {
2207
+ if (object instanceof $root.org.dash.platform.dapi.v0.StateTransitionResultFilter)
2208
+ return object;
2209
+ var message = new $root.org.dash.platform.dapi.v0.StateTransitionResultFilter();
2210
+ if (object.txHash != null)
2211
+ if (typeof object.txHash === "string")
2212
+ $util.base64.decode(object.txHash, message.txHash = $util.newBuffer($util.base64.length(object.txHash)), 0);
2213
+ else if (object.txHash.length >= 0)
2214
+ message.txHash = object.txHash;
2215
+ return message;
2216
+ };
2217
+
2218
+ /**
2219
+ * Creates a plain object from a StateTransitionResultFilter message. Also converts values to other types if specified.
2220
+ * @function toObject
2221
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2222
+ * @static
2223
+ * @param {org.dash.platform.dapi.v0.StateTransitionResultFilter} message StateTransitionResultFilter
2224
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2225
+ * @returns {Object.<string,*>} Plain object
2226
+ */
2227
+ StateTransitionResultFilter.toObject = function toObject(message, options) {
2228
+ if (!options)
2229
+ options = {};
2230
+ var object = {};
2231
+ if (options.defaults)
2232
+ if (options.bytes === String)
2233
+ object.txHash = "";
2234
+ else {
2235
+ object.txHash = [];
2236
+ if (options.bytes !== Array)
2237
+ object.txHash = $util.newBuffer(object.txHash);
2238
+ }
2239
+ if (message.txHash != null && message.hasOwnProperty("txHash"))
2240
+ object.txHash = options.bytes === String ? $util.base64.encode(message.txHash, 0, message.txHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.txHash) : message.txHash;
2241
+ return object;
2242
+ };
2243
+
2244
+ /**
2245
+ * Converts this StateTransitionResultFilter to JSON.
2246
+ * @function toJSON
2247
+ * @memberof org.dash.platform.dapi.v0.StateTransitionResultFilter
2248
+ * @instance
2249
+ * @returns {Object.<string,*>} JSON object
2250
+ */
2251
+ StateTransitionResultFilter.prototype.toJSON = function toJSON() {
2252
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2253
+ };
2254
+
2255
+ return StateTransitionResultFilter;
2256
+ })();
2257
+
2258
+ v0.PlatformFilterV0 = (function() {
2259
+
2260
+ /**
2261
+ * Properties of a PlatformFilterV0.
2262
+ * @memberof org.dash.platform.dapi.v0
2263
+ * @interface IPlatformFilterV0
2264
+ * @property {boolean|null} [all] PlatformFilterV0 all
2265
+ * @property {boolean|null} [blockCommitted] PlatformFilterV0 blockCommitted
2266
+ * @property {org.dash.platform.dapi.v0.IStateTransitionResultFilter|null} [stateTransitionResult] PlatformFilterV0 stateTransitionResult
2267
+ */
2268
+
2269
+ /**
2270
+ * Constructs a new PlatformFilterV0.
2271
+ * @memberof org.dash.platform.dapi.v0
2272
+ * @classdesc Represents a PlatformFilterV0.
2273
+ * @implements IPlatformFilterV0
2274
+ * @constructor
2275
+ * @param {org.dash.platform.dapi.v0.IPlatformFilterV0=} [properties] Properties to set
2276
+ */
2277
+ function PlatformFilterV0(properties) {
2278
+ if (properties)
2279
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2280
+ if (properties[keys[i]] != null)
2281
+ this[keys[i]] = properties[keys[i]];
2282
+ }
2283
+
2284
+ /**
2285
+ * PlatformFilterV0 all.
2286
+ * @member {boolean} all
2287
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2288
+ * @instance
2289
+ */
2290
+ PlatformFilterV0.prototype.all = false;
2291
+
2292
+ /**
2293
+ * PlatformFilterV0 blockCommitted.
2294
+ * @member {boolean} blockCommitted
2295
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2296
+ * @instance
2297
+ */
2298
+ PlatformFilterV0.prototype.blockCommitted = false;
2299
+
2300
+ /**
2301
+ * PlatformFilterV0 stateTransitionResult.
2302
+ * @member {org.dash.platform.dapi.v0.IStateTransitionResultFilter|null|undefined} stateTransitionResult
2303
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2304
+ * @instance
2305
+ */
2306
+ PlatformFilterV0.prototype.stateTransitionResult = null;
2307
+
2308
+ // OneOf field names bound to virtual getters and setters
2309
+ var $oneOfFields;
2310
+
2311
+ /**
2312
+ * PlatformFilterV0 kind.
2313
+ * @member {"all"|"blockCommitted"|"stateTransitionResult"|undefined} kind
2314
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2315
+ * @instance
2316
+ */
2317
+ Object.defineProperty(PlatformFilterV0.prototype, "kind", {
2318
+ get: $util.oneOfGetter($oneOfFields = ["all", "blockCommitted", "stateTransitionResult"]),
2319
+ set: $util.oneOfSetter($oneOfFields)
2320
+ });
2321
+
2322
+ /**
2323
+ * Creates a new PlatformFilterV0 instance using the specified properties.
2324
+ * @function create
2325
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2326
+ * @static
2327
+ * @param {org.dash.platform.dapi.v0.IPlatformFilterV0=} [properties] Properties to set
2328
+ * @returns {org.dash.platform.dapi.v0.PlatformFilterV0} PlatformFilterV0 instance
2329
+ */
2330
+ PlatformFilterV0.create = function create(properties) {
2331
+ return new PlatformFilterV0(properties);
2332
+ };
2333
+
2334
+ /**
2335
+ * Encodes the specified PlatformFilterV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformFilterV0.verify|verify} messages.
2336
+ * @function encode
2337
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2338
+ * @static
2339
+ * @param {org.dash.platform.dapi.v0.IPlatformFilterV0} message PlatformFilterV0 message or plain object to encode
2340
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2341
+ * @returns {$protobuf.Writer} Writer
2342
+ */
2343
+ PlatformFilterV0.encode = function encode(message, writer) {
2344
+ if (!writer)
2345
+ writer = $Writer.create();
2346
+ if (message.all != null && Object.hasOwnProperty.call(message, "all"))
2347
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all);
2348
+ if (message.blockCommitted != null && Object.hasOwnProperty.call(message, "blockCommitted"))
2349
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.blockCommitted);
2350
+ if (message.stateTransitionResult != null && Object.hasOwnProperty.call(message, "stateTransitionResult"))
2351
+ $root.org.dash.platform.dapi.v0.StateTransitionResultFilter.encode(message.stateTransitionResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
2352
+ return writer;
2353
+ };
2354
+
2355
+ /**
2356
+ * Encodes the specified PlatformFilterV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformFilterV0.verify|verify} messages.
2357
+ * @function encodeDelimited
2358
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2359
+ * @static
2360
+ * @param {org.dash.platform.dapi.v0.IPlatformFilterV0} message PlatformFilterV0 message or plain object to encode
2361
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2362
+ * @returns {$protobuf.Writer} Writer
2363
+ */
2364
+ PlatformFilterV0.encodeDelimited = function encodeDelimited(message, writer) {
2365
+ return this.encode(message, writer).ldelim();
2366
+ };
2367
+
2368
+ /**
2369
+ * Decodes a PlatformFilterV0 message from the specified reader or buffer.
2370
+ * @function decode
2371
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2372
+ * @static
2373
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2374
+ * @param {number} [length] Message length if known beforehand
2375
+ * @returns {org.dash.platform.dapi.v0.PlatformFilterV0} PlatformFilterV0
2376
+ * @throws {Error} If the payload is not a reader or valid buffer
2377
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2378
+ */
2379
+ PlatformFilterV0.decode = function decode(reader, length) {
2380
+ if (!(reader instanceof $Reader))
2381
+ reader = $Reader.create(reader);
2382
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformFilterV0();
2383
+ while (reader.pos < end) {
2384
+ var tag = reader.uint32();
2385
+ switch (tag >>> 3) {
2386
+ case 1:
2387
+ message.all = reader.bool();
2388
+ break;
2389
+ case 2:
2390
+ message.blockCommitted = reader.bool();
2391
+ break;
2392
+ case 3:
2393
+ message.stateTransitionResult = $root.org.dash.platform.dapi.v0.StateTransitionResultFilter.decode(reader, reader.uint32());
2394
+ break;
2395
+ default:
2396
+ reader.skipType(tag & 7);
2397
+ break;
2398
+ }
2399
+ }
2400
+ return message;
2401
+ };
2402
+
2403
+ /**
2404
+ * Decodes a PlatformFilterV0 message from the specified reader or buffer, length delimited.
2405
+ * @function decodeDelimited
2406
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2407
+ * @static
2408
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2409
+ * @returns {org.dash.platform.dapi.v0.PlatformFilterV0} PlatformFilterV0
2410
+ * @throws {Error} If the payload is not a reader or valid buffer
2411
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2412
+ */
2413
+ PlatformFilterV0.decodeDelimited = function decodeDelimited(reader) {
2414
+ if (!(reader instanceof $Reader))
2415
+ reader = new $Reader(reader);
2416
+ return this.decode(reader, reader.uint32());
2417
+ };
2418
+
2419
+ /**
2420
+ * Verifies a PlatformFilterV0 message.
2421
+ * @function verify
2422
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2423
+ * @static
2424
+ * @param {Object.<string,*>} message Plain object to verify
2425
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2426
+ */
2427
+ PlatformFilterV0.verify = function verify(message) {
2428
+ if (typeof message !== "object" || message === null)
2429
+ return "object expected";
2430
+ var properties = {};
2431
+ if (message.all != null && message.hasOwnProperty("all")) {
2432
+ properties.kind = 1;
2433
+ if (typeof message.all !== "boolean")
2434
+ return "all: boolean expected";
2435
+ }
2436
+ if (message.blockCommitted != null && message.hasOwnProperty("blockCommitted")) {
2437
+ if (properties.kind === 1)
2438
+ return "kind: multiple values";
2439
+ properties.kind = 1;
2440
+ if (typeof message.blockCommitted !== "boolean")
2441
+ return "blockCommitted: boolean expected";
2442
+ }
2443
+ if (message.stateTransitionResult != null && message.hasOwnProperty("stateTransitionResult")) {
2444
+ if (properties.kind === 1)
2445
+ return "kind: multiple values";
2446
+ properties.kind = 1;
2447
+ {
2448
+ var error = $root.org.dash.platform.dapi.v0.StateTransitionResultFilter.verify(message.stateTransitionResult);
2449
+ if (error)
2450
+ return "stateTransitionResult." + error;
2451
+ }
2452
+ }
2453
+ return null;
2454
+ };
2455
+
2456
+ /**
2457
+ * Creates a PlatformFilterV0 message from a plain object. Also converts values to their respective internal types.
2458
+ * @function fromObject
2459
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2460
+ * @static
2461
+ * @param {Object.<string,*>} object Plain object
2462
+ * @returns {org.dash.platform.dapi.v0.PlatformFilterV0} PlatformFilterV0
2463
+ */
2464
+ PlatformFilterV0.fromObject = function fromObject(object) {
2465
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformFilterV0)
2466
+ return object;
2467
+ var message = new $root.org.dash.platform.dapi.v0.PlatformFilterV0();
2468
+ if (object.all != null)
2469
+ message.all = Boolean(object.all);
2470
+ if (object.blockCommitted != null)
2471
+ message.blockCommitted = Boolean(object.blockCommitted);
2472
+ if (object.stateTransitionResult != null) {
2473
+ if (typeof object.stateTransitionResult !== "object")
2474
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformFilterV0.stateTransitionResult: object expected");
2475
+ message.stateTransitionResult = $root.org.dash.platform.dapi.v0.StateTransitionResultFilter.fromObject(object.stateTransitionResult);
2476
+ }
2477
+ return message;
2478
+ };
2479
+
2480
+ /**
2481
+ * Creates a plain object from a PlatformFilterV0 message. Also converts values to other types if specified.
2482
+ * @function toObject
2483
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2484
+ * @static
2485
+ * @param {org.dash.platform.dapi.v0.PlatformFilterV0} message PlatformFilterV0
2486
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2487
+ * @returns {Object.<string,*>} Plain object
2488
+ */
2489
+ PlatformFilterV0.toObject = function toObject(message, options) {
2490
+ if (!options)
2491
+ options = {};
2492
+ var object = {};
2493
+ if (message.all != null && message.hasOwnProperty("all")) {
2494
+ object.all = message.all;
2495
+ if (options.oneofs)
2496
+ object.kind = "all";
2497
+ }
2498
+ if (message.blockCommitted != null && message.hasOwnProperty("blockCommitted")) {
2499
+ object.blockCommitted = message.blockCommitted;
2500
+ if (options.oneofs)
2501
+ object.kind = "blockCommitted";
2502
+ }
2503
+ if (message.stateTransitionResult != null && message.hasOwnProperty("stateTransitionResult")) {
2504
+ object.stateTransitionResult = $root.org.dash.platform.dapi.v0.StateTransitionResultFilter.toObject(message.stateTransitionResult, options);
2505
+ if (options.oneofs)
2506
+ object.kind = "stateTransitionResult";
2507
+ }
2508
+ return object;
2509
+ };
2510
+
2511
+ /**
2512
+ * Converts this PlatformFilterV0 to JSON.
2513
+ * @function toJSON
2514
+ * @memberof org.dash.platform.dapi.v0.PlatformFilterV0
2515
+ * @instance
2516
+ * @returns {Object.<string,*>} JSON object
2517
+ */
2518
+ PlatformFilterV0.prototype.toJSON = function toJSON() {
2519
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2520
+ };
2521
+
2522
+ return PlatformFilterV0;
2523
+ })();
2524
+
2525
+ v0.PlatformEventV0 = (function() {
2526
+
2527
+ /**
2528
+ * Properties of a PlatformEventV0.
2529
+ * @memberof org.dash.platform.dapi.v0
2530
+ * @interface IPlatformEventV0
2531
+ * @property {org.dash.platform.dapi.v0.PlatformEventV0.IBlockCommitted|null} [blockCommitted] PlatformEventV0 blockCommitted
2532
+ * @property {org.dash.platform.dapi.v0.PlatformEventV0.IStateTransitionFinalized|null} [stateTransitionFinalized] PlatformEventV0 stateTransitionFinalized
2533
+ */
2534
+
2535
+ /**
2536
+ * Constructs a new PlatformEventV0.
2537
+ * @memberof org.dash.platform.dapi.v0
2538
+ * @classdesc Represents a PlatformEventV0.
2539
+ * @implements IPlatformEventV0
2540
+ * @constructor
2541
+ * @param {org.dash.platform.dapi.v0.IPlatformEventV0=} [properties] Properties to set
2542
+ */
2543
+ function PlatformEventV0(properties) {
2544
+ if (properties)
2545
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2546
+ if (properties[keys[i]] != null)
2547
+ this[keys[i]] = properties[keys[i]];
2548
+ }
2549
+
2550
+ /**
2551
+ * PlatformEventV0 blockCommitted.
2552
+ * @member {org.dash.platform.dapi.v0.PlatformEventV0.IBlockCommitted|null|undefined} blockCommitted
2553
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2554
+ * @instance
2555
+ */
2556
+ PlatformEventV0.prototype.blockCommitted = null;
2557
+
2558
+ /**
2559
+ * PlatformEventV0 stateTransitionFinalized.
2560
+ * @member {org.dash.platform.dapi.v0.PlatformEventV0.IStateTransitionFinalized|null|undefined} stateTransitionFinalized
2561
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2562
+ * @instance
2563
+ */
2564
+ PlatformEventV0.prototype.stateTransitionFinalized = null;
2565
+
2566
+ // OneOf field names bound to virtual getters and setters
2567
+ var $oneOfFields;
2568
+
2569
+ /**
2570
+ * PlatformEventV0 event.
2571
+ * @member {"blockCommitted"|"stateTransitionFinalized"|undefined} event
2572
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2573
+ * @instance
2574
+ */
2575
+ Object.defineProperty(PlatformEventV0.prototype, "event", {
2576
+ get: $util.oneOfGetter($oneOfFields = ["blockCommitted", "stateTransitionFinalized"]),
2577
+ set: $util.oneOfSetter($oneOfFields)
2578
+ });
2579
+
2580
+ /**
2581
+ * Creates a new PlatformEventV0 instance using the specified properties.
2582
+ * @function create
2583
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2584
+ * @static
2585
+ * @param {org.dash.platform.dapi.v0.IPlatformEventV0=} [properties] Properties to set
2586
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0} PlatformEventV0 instance
2587
+ */
2588
+ PlatformEventV0.create = function create(properties) {
2589
+ return new PlatformEventV0(properties);
2590
+ };
2591
+
2592
+ /**
2593
+ * Encodes the specified PlatformEventV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventV0.verify|verify} messages.
2594
+ * @function encode
2595
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2596
+ * @static
2597
+ * @param {org.dash.platform.dapi.v0.IPlatformEventV0} message PlatformEventV0 message or plain object to encode
2598
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2599
+ * @returns {$protobuf.Writer} Writer
2600
+ */
2601
+ PlatformEventV0.encode = function encode(message, writer) {
2602
+ if (!writer)
2603
+ writer = $Writer.create();
2604
+ if (message.blockCommitted != null && Object.hasOwnProperty.call(message, "blockCommitted"))
2605
+ $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted.encode(message.blockCommitted, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
2606
+ if (message.stateTransitionFinalized != null && Object.hasOwnProperty.call(message, "stateTransitionFinalized"))
2607
+ $root.org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized.encode(message.stateTransitionFinalized, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
2608
+ return writer;
2609
+ };
2610
+
2611
+ /**
2612
+ * Encodes the specified PlatformEventV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventV0.verify|verify} messages.
2613
+ * @function encodeDelimited
2614
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2615
+ * @static
2616
+ * @param {org.dash.platform.dapi.v0.IPlatformEventV0} message PlatformEventV0 message or plain object to encode
2617
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2618
+ * @returns {$protobuf.Writer} Writer
2619
+ */
2620
+ PlatformEventV0.encodeDelimited = function encodeDelimited(message, writer) {
2621
+ return this.encode(message, writer).ldelim();
2622
+ };
2623
+
2624
+ /**
2625
+ * Decodes a PlatformEventV0 message from the specified reader or buffer.
2626
+ * @function decode
2627
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2628
+ * @static
2629
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2630
+ * @param {number} [length] Message length if known beforehand
2631
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0} PlatformEventV0
2632
+ * @throws {Error} If the payload is not a reader or valid buffer
2633
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2634
+ */
2635
+ PlatformEventV0.decode = function decode(reader, length) {
2636
+ if (!(reader instanceof $Reader))
2637
+ reader = $Reader.create(reader);
2638
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventV0();
2639
+ while (reader.pos < end) {
2640
+ var tag = reader.uint32();
2641
+ switch (tag >>> 3) {
2642
+ case 1:
2643
+ message.blockCommitted = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted.decode(reader, reader.uint32());
2644
+ break;
2645
+ case 2:
2646
+ message.stateTransitionFinalized = $root.org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized.decode(reader, reader.uint32());
2647
+ break;
2648
+ default:
2649
+ reader.skipType(tag & 7);
2650
+ break;
2651
+ }
2652
+ }
2653
+ return message;
2654
+ };
2655
+
2656
+ /**
2657
+ * Decodes a PlatformEventV0 message from the specified reader or buffer, length delimited.
2658
+ * @function decodeDelimited
2659
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2660
+ * @static
2661
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2662
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0} PlatformEventV0
2663
+ * @throws {Error} If the payload is not a reader or valid buffer
2664
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2665
+ */
2666
+ PlatformEventV0.decodeDelimited = function decodeDelimited(reader) {
2667
+ if (!(reader instanceof $Reader))
2668
+ reader = new $Reader(reader);
2669
+ return this.decode(reader, reader.uint32());
2670
+ };
2671
+
2672
+ /**
2673
+ * Verifies a PlatformEventV0 message.
2674
+ * @function verify
2675
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2676
+ * @static
2677
+ * @param {Object.<string,*>} message Plain object to verify
2678
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2679
+ */
2680
+ PlatformEventV0.verify = function verify(message) {
2681
+ if (typeof message !== "object" || message === null)
2682
+ return "object expected";
2683
+ var properties = {};
2684
+ if (message.blockCommitted != null && message.hasOwnProperty("blockCommitted")) {
2685
+ properties.event = 1;
2686
+ {
2687
+ var error = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted.verify(message.blockCommitted);
2688
+ if (error)
2689
+ return "blockCommitted." + error;
2690
+ }
2691
+ }
2692
+ if (message.stateTransitionFinalized != null && message.hasOwnProperty("stateTransitionFinalized")) {
2693
+ if (properties.event === 1)
2694
+ return "event: multiple values";
2695
+ properties.event = 1;
2696
+ {
2697
+ var error = $root.org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized.verify(message.stateTransitionFinalized);
2698
+ if (error)
2699
+ return "stateTransitionFinalized." + error;
2700
+ }
2701
+ }
2702
+ return null;
2703
+ };
2704
+
2705
+ /**
2706
+ * Creates a PlatformEventV0 message from a plain object. Also converts values to their respective internal types.
2707
+ * @function fromObject
2708
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2709
+ * @static
2710
+ * @param {Object.<string,*>} object Plain object
2711
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0} PlatformEventV0
2712
+ */
2713
+ PlatformEventV0.fromObject = function fromObject(object) {
2714
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventV0)
2715
+ return object;
2716
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventV0();
2717
+ if (object.blockCommitted != null) {
2718
+ if (typeof object.blockCommitted !== "object")
2719
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventV0.blockCommitted: object expected");
2720
+ message.blockCommitted = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted.fromObject(object.blockCommitted);
2721
+ }
2722
+ if (object.stateTransitionFinalized != null) {
2723
+ if (typeof object.stateTransitionFinalized !== "object")
2724
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventV0.stateTransitionFinalized: object expected");
2725
+ message.stateTransitionFinalized = $root.org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized.fromObject(object.stateTransitionFinalized);
2726
+ }
2727
+ return message;
2728
+ };
2729
+
2730
+ /**
2731
+ * Creates a plain object from a PlatformEventV0 message. Also converts values to other types if specified.
2732
+ * @function toObject
2733
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2734
+ * @static
2735
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0} message PlatformEventV0
2736
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2737
+ * @returns {Object.<string,*>} Plain object
2738
+ */
2739
+ PlatformEventV0.toObject = function toObject(message, options) {
2740
+ if (!options)
2741
+ options = {};
2742
+ var object = {};
2743
+ if (message.blockCommitted != null && message.hasOwnProperty("blockCommitted")) {
2744
+ object.blockCommitted = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted.toObject(message.blockCommitted, options);
2745
+ if (options.oneofs)
2746
+ object.event = "blockCommitted";
2747
+ }
2748
+ if (message.stateTransitionFinalized != null && message.hasOwnProperty("stateTransitionFinalized")) {
2749
+ object.stateTransitionFinalized = $root.org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized.toObject(message.stateTransitionFinalized, options);
2750
+ if (options.oneofs)
2751
+ object.event = "stateTransitionFinalized";
2752
+ }
2753
+ return object;
2754
+ };
2755
+
2756
+ /**
2757
+ * Converts this PlatformEventV0 to JSON.
2758
+ * @function toJSON
2759
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2760
+ * @instance
2761
+ * @returns {Object.<string,*>} JSON object
2762
+ */
2763
+ PlatformEventV0.prototype.toJSON = function toJSON() {
2764
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2765
+ };
2766
+
2767
+ PlatformEventV0.BlockMetadata = (function() {
2768
+
2769
+ /**
2770
+ * Properties of a BlockMetadata.
2771
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2772
+ * @interface IBlockMetadata
2773
+ * @property {number|Long|null} [height] BlockMetadata height
2774
+ * @property {number|Long|null} [timeMs] BlockMetadata timeMs
2775
+ * @property {Uint8Array|null} [blockIdHash] BlockMetadata blockIdHash
2776
+ */
2777
+
2778
+ /**
2779
+ * Constructs a new BlockMetadata.
2780
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
2781
+ * @classdesc Represents a BlockMetadata.
2782
+ * @implements IBlockMetadata
2783
+ * @constructor
2784
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IBlockMetadata=} [properties] Properties to set
2785
+ */
2786
+ function BlockMetadata(properties) {
2787
+ if (properties)
2788
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2789
+ if (properties[keys[i]] != null)
2790
+ this[keys[i]] = properties[keys[i]];
2791
+ }
2792
+
2793
+ /**
2794
+ * BlockMetadata height.
2795
+ * @member {number|Long} height
2796
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2797
+ * @instance
2798
+ */
2799
+ BlockMetadata.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
2800
+
2801
+ /**
2802
+ * BlockMetadata timeMs.
2803
+ * @member {number|Long} timeMs
2804
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2805
+ * @instance
2806
+ */
2807
+ BlockMetadata.prototype.timeMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
2808
+
2809
+ /**
2810
+ * BlockMetadata blockIdHash.
2811
+ * @member {Uint8Array} blockIdHash
2812
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2813
+ * @instance
2814
+ */
2815
+ BlockMetadata.prototype.blockIdHash = $util.newBuffer([]);
2816
+
2817
+ /**
2818
+ * Creates a new BlockMetadata instance using the specified properties.
2819
+ * @function create
2820
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2821
+ * @static
2822
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IBlockMetadata=} [properties] Properties to set
2823
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata} BlockMetadata instance
2824
+ */
2825
+ BlockMetadata.create = function create(properties) {
2826
+ return new BlockMetadata(properties);
2827
+ };
2828
+
2829
+ /**
2830
+ * Encodes the specified BlockMetadata message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.verify|verify} messages.
2831
+ * @function encode
2832
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2833
+ * @static
2834
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IBlockMetadata} message BlockMetadata message or plain object to encode
2835
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2836
+ * @returns {$protobuf.Writer} Writer
2837
+ */
2838
+ BlockMetadata.encode = function encode(message, writer) {
2839
+ if (!writer)
2840
+ writer = $Writer.create();
2841
+ if (message.height != null && Object.hasOwnProperty.call(message, "height"))
2842
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.height);
2843
+ if (message.timeMs != null && Object.hasOwnProperty.call(message, "timeMs"))
2844
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timeMs);
2845
+ if (message.blockIdHash != null && Object.hasOwnProperty.call(message, "blockIdHash"))
2846
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.blockIdHash);
2847
+ return writer;
2848
+ };
2849
+
2850
+ /**
2851
+ * Encodes the specified BlockMetadata message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.verify|verify} messages.
2852
+ * @function encodeDelimited
2853
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2854
+ * @static
2855
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IBlockMetadata} message BlockMetadata message or plain object to encode
2856
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2857
+ * @returns {$protobuf.Writer} Writer
2858
+ */
2859
+ BlockMetadata.encodeDelimited = function encodeDelimited(message, writer) {
2860
+ return this.encode(message, writer).ldelim();
2861
+ };
2862
+
2863
+ /**
2864
+ * Decodes a BlockMetadata message from the specified reader or buffer.
2865
+ * @function decode
2866
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2867
+ * @static
2868
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2869
+ * @param {number} [length] Message length if known beforehand
2870
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata} BlockMetadata
2871
+ * @throws {Error} If the payload is not a reader or valid buffer
2872
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2873
+ */
2874
+ BlockMetadata.decode = function decode(reader, length) {
2875
+ if (!(reader instanceof $Reader))
2876
+ reader = $Reader.create(reader);
2877
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata();
2878
+ while (reader.pos < end) {
2879
+ var tag = reader.uint32();
2880
+ switch (tag >>> 3) {
2881
+ case 1:
2882
+ message.height = reader.uint64();
2883
+ break;
2884
+ case 2:
2885
+ message.timeMs = reader.uint64();
2886
+ break;
2887
+ case 3:
2888
+ message.blockIdHash = reader.bytes();
2889
+ break;
2890
+ default:
2891
+ reader.skipType(tag & 7);
2892
+ break;
2893
+ }
2894
+ }
2895
+ return message;
2896
+ };
2897
+
2898
+ /**
2899
+ * Decodes a BlockMetadata message from the specified reader or buffer, length delimited.
2900
+ * @function decodeDelimited
2901
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2902
+ * @static
2903
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2904
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata} BlockMetadata
2905
+ * @throws {Error} If the payload is not a reader or valid buffer
2906
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2907
+ */
2908
+ BlockMetadata.decodeDelimited = function decodeDelimited(reader) {
2909
+ if (!(reader instanceof $Reader))
2910
+ reader = new $Reader(reader);
2911
+ return this.decode(reader, reader.uint32());
2912
+ };
2913
+
2914
+ /**
2915
+ * Verifies a BlockMetadata message.
2916
+ * @function verify
2917
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2918
+ * @static
2919
+ * @param {Object.<string,*>} message Plain object to verify
2920
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2921
+ */
2922
+ BlockMetadata.verify = function verify(message) {
2923
+ if (typeof message !== "object" || message === null)
2924
+ return "object expected";
2925
+ if (message.height != null && message.hasOwnProperty("height"))
2926
+ if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high)))
2927
+ return "height: integer|Long expected";
2928
+ if (message.timeMs != null && message.hasOwnProperty("timeMs"))
2929
+ if (!$util.isInteger(message.timeMs) && !(message.timeMs && $util.isInteger(message.timeMs.low) && $util.isInteger(message.timeMs.high)))
2930
+ return "timeMs: integer|Long expected";
2931
+ if (message.blockIdHash != null && message.hasOwnProperty("blockIdHash"))
2932
+ if (!(message.blockIdHash && typeof message.blockIdHash.length === "number" || $util.isString(message.blockIdHash)))
2933
+ return "blockIdHash: buffer expected";
2934
+ return null;
2935
+ };
2936
+
2937
+ /**
2938
+ * Creates a BlockMetadata message from a plain object. Also converts values to their respective internal types.
2939
+ * @function fromObject
2940
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2941
+ * @static
2942
+ * @param {Object.<string,*>} object Plain object
2943
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata} BlockMetadata
2944
+ */
2945
+ BlockMetadata.fromObject = function fromObject(object) {
2946
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata)
2947
+ return object;
2948
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata();
2949
+ if (object.height != null)
2950
+ if ($util.Long)
2951
+ (message.height = $util.Long.fromValue(object.height)).unsigned = true;
2952
+ else if (typeof object.height === "string")
2953
+ message.height = parseInt(object.height, 10);
2954
+ else if (typeof object.height === "number")
2955
+ message.height = object.height;
2956
+ else if (typeof object.height === "object")
2957
+ message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true);
2958
+ if (object.timeMs != null)
2959
+ if ($util.Long)
2960
+ (message.timeMs = $util.Long.fromValue(object.timeMs)).unsigned = true;
2961
+ else if (typeof object.timeMs === "string")
2962
+ message.timeMs = parseInt(object.timeMs, 10);
2963
+ else if (typeof object.timeMs === "number")
2964
+ message.timeMs = object.timeMs;
2965
+ else if (typeof object.timeMs === "object")
2966
+ message.timeMs = new $util.LongBits(object.timeMs.low >>> 0, object.timeMs.high >>> 0).toNumber(true);
2967
+ if (object.blockIdHash != null)
2968
+ if (typeof object.blockIdHash === "string")
2969
+ $util.base64.decode(object.blockIdHash, message.blockIdHash = $util.newBuffer($util.base64.length(object.blockIdHash)), 0);
2970
+ else if (object.blockIdHash.length >= 0)
2971
+ message.blockIdHash = object.blockIdHash;
2972
+ return message;
2973
+ };
2974
+
2975
+ /**
2976
+ * Creates a plain object from a BlockMetadata message. Also converts values to other types if specified.
2977
+ * @function toObject
2978
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
2979
+ * @static
2980
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata} message BlockMetadata
2981
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2982
+ * @returns {Object.<string,*>} Plain object
2983
+ */
2984
+ BlockMetadata.toObject = function toObject(message, options) {
2985
+ if (!options)
2986
+ options = {};
2987
+ var object = {};
2988
+ if (options.defaults) {
2989
+ if ($util.Long) {
2990
+ var long = new $util.Long(0, 0, true);
2991
+ object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
2992
+ } else
2993
+ object.height = options.longs === String ? "0" : 0;
2994
+ if ($util.Long) {
2995
+ var long = new $util.Long(0, 0, true);
2996
+ object.timeMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
2997
+ } else
2998
+ object.timeMs = options.longs === String ? "0" : 0;
2999
+ if (options.bytes === String)
3000
+ object.blockIdHash = "";
3001
+ else {
3002
+ object.blockIdHash = [];
3003
+ if (options.bytes !== Array)
3004
+ object.blockIdHash = $util.newBuffer(object.blockIdHash);
3005
+ }
3006
+ }
3007
+ if (message.height != null && message.hasOwnProperty("height"))
3008
+ if (typeof message.height === "number")
3009
+ object.height = options.longs === String ? String(message.height) : message.height;
3010
+ else
3011
+ object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height;
3012
+ if (message.timeMs != null && message.hasOwnProperty("timeMs"))
3013
+ if (typeof message.timeMs === "number")
3014
+ object.timeMs = options.longs === String ? String(message.timeMs) : message.timeMs;
3015
+ else
3016
+ object.timeMs = options.longs === String ? $util.Long.prototype.toString.call(message.timeMs) : options.longs === Number ? new $util.LongBits(message.timeMs.low >>> 0, message.timeMs.high >>> 0).toNumber(true) : message.timeMs;
3017
+ if (message.blockIdHash != null && message.hasOwnProperty("blockIdHash"))
3018
+ object.blockIdHash = options.bytes === String ? $util.base64.encode(message.blockIdHash, 0, message.blockIdHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.blockIdHash) : message.blockIdHash;
3019
+ return object;
3020
+ };
3021
+
3022
+ /**
3023
+ * Converts this BlockMetadata to JSON.
3024
+ * @function toJSON
3025
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata
3026
+ * @instance
3027
+ * @returns {Object.<string,*>} JSON object
3028
+ */
3029
+ BlockMetadata.prototype.toJSON = function toJSON() {
3030
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3031
+ };
3032
+
3033
+ return BlockMetadata;
3034
+ })();
3035
+
3036
+ PlatformEventV0.BlockCommitted = (function() {
3037
+
3038
+ /**
3039
+ * Properties of a BlockCommitted.
3040
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
3041
+ * @interface IBlockCommitted
3042
+ * @property {org.dash.platform.dapi.v0.PlatformEventV0.IBlockMetadata|null} [meta] BlockCommitted meta
3043
+ * @property {number|null} [txCount] BlockCommitted txCount
3044
+ */
3045
+
3046
+ /**
3047
+ * Constructs a new BlockCommitted.
3048
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
3049
+ * @classdesc Represents a BlockCommitted.
3050
+ * @implements IBlockCommitted
3051
+ * @constructor
3052
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IBlockCommitted=} [properties] Properties to set
3053
+ */
3054
+ function BlockCommitted(properties) {
3055
+ if (properties)
3056
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3057
+ if (properties[keys[i]] != null)
3058
+ this[keys[i]] = properties[keys[i]];
3059
+ }
3060
+
3061
+ /**
3062
+ * BlockCommitted meta.
3063
+ * @member {org.dash.platform.dapi.v0.PlatformEventV0.IBlockMetadata|null|undefined} meta
3064
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3065
+ * @instance
3066
+ */
3067
+ BlockCommitted.prototype.meta = null;
3068
+
3069
+ /**
3070
+ * BlockCommitted txCount.
3071
+ * @member {number} txCount
3072
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3073
+ * @instance
3074
+ */
3075
+ BlockCommitted.prototype.txCount = 0;
3076
+
3077
+ /**
3078
+ * Creates a new BlockCommitted instance using the specified properties.
3079
+ * @function create
3080
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3081
+ * @static
3082
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IBlockCommitted=} [properties] Properties to set
3083
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted} BlockCommitted instance
3084
+ */
3085
+ BlockCommitted.create = function create(properties) {
3086
+ return new BlockCommitted(properties);
3087
+ };
3088
+
3089
+ /**
3090
+ * Encodes the specified BlockCommitted message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted.verify|verify} messages.
3091
+ * @function encode
3092
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3093
+ * @static
3094
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IBlockCommitted} message BlockCommitted message or plain object to encode
3095
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3096
+ * @returns {$protobuf.Writer} Writer
3097
+ */
3098
+ BlockCommitted.encode = function encode(message, writer) {
3099
+ if (!writer)
3100
+ writer = $Writer.create();
3101
+ if (message.meta != null && Object.hasOwnProperty.call(message, "meta"))
3102
+ $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.encode(message.meta, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3103
+ if (message.txCount != null && Object.hasOwnProperty.call(message, "txCount"))
3104
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.txCount);
3105
+ return writer;
3106
+ };
3107
+
3108
+ /**
3109
+ * Encodes the specified BlockCommitted message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted.verify|verify} messages.
3110
+ * @function encodeDelimited
3111
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3112
+ * @static
3113
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IBlockCommitted} message BlockCommitted message or plain object to encode
3114
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3115
+ * @returns {$protobuf.Writer} Writer
3116
+ */
3117
+ BlockCommitted.encodeDelimited = function encodeDelimited(message, writer) {
3118
+ return this.encode(message, writer).ldelim();
3119
+ };
3120
+
3121
+ /**
3122
+ * Decodes a BlockCommitted message from the specified reader or buffer.
3123
+ * @function decode
3124
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3125
+ * @static
3126
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3127
+ * @param {number} [length] Message length if known beforehand
3128
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted} BlockCommitted
3129
+ * @throws {Error} If the payload is not a reader or valid buffer
3130
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3131
+ */
3132
+ BlockCommitted.decode = function decode(reader, length) {
3133
+ if (!(reader instanceof $Reader))
3134
+ reader = $Reader.create(reader);
3135
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted();
3136
+ while (reader.pos < end) {
3137
+ var tag = reader.uint32();
3138
+ switch (tag >>> 3) {
3139
+ case 1:
3140
+ message.meta = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.decode(reader, reader.uint32());
3141
+ break;
3142
+ case 2:
3143
+ message.txCount = reader.uint32();
3144
+ break;
3145
+ default:
3146
+ reader.skipType(tag & 7);
3147
+ break;
3148
+ }
3149
+ }
3150
+ return message;
3151
+ };
3152
+
3153
+ /**
3154
+ * Decodes a BlockCommitted message from the specified reader or buffer, length delimited.
3155
+ * @function decodeDelimited
3156
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3157
+ * @static
3158
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3159
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted} BlockCommitted
3160
+ * @throws {Error} If the payload is not a reader or valid buffer
3161
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3162
+ */
3163
+ BlockCommitted.decodeDelimited = function decodeDelimited(reader) {
3164
+ if (!(reader instanceof $Reader))
3165
+ reader = new $Reader(reader);
3166
+ return this.decode(reader, reader.uint32());
3167
+ };
3168
+
3169
+ /**
3170
+ * Verifies a BlockCommitted message.
3171
+ * @function verify
3172
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3173
+ * @static
3174
+ * @param {Object.<string,*>} message Plain object to verify
3175
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3176
+ */
3177
+ BlockCommitted.verify = function verify(message) {
3178
+ if (typeof message !== "object" || message === null)
3179
+ return "object expected";
3180
+ if (message.meta != null && message.hasOwnProperty("meta")) {
3181
+ var error = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.verify(message.meta);
3182
+ if (error)
3183
+ return "meta." + error;
3184
+ }
3185
+ if (message.txCount != null && message.hasOwnProperty("txCount"))
3186
+ if (!$util.isInteger(message.txCount))
3187
+ return "txCount: integer expected";
3188
+ return null;
3189
+ };
3190
+
3191
+ /**
3192
+ * Creates a BlockCommitted message from a plain object. Also converts values to their respective internal types.
3193
+ * @function fromObject
3194
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3195
+ * @static
3196
+ * @param {Object.<string,*>} object Plain object
3197
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted} BlockCommitted
3198
+ */
3199
+ BlockCommitted.fromObject = function fromObject(object) {
3200
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted)
3201
+ return object;
3202
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted();
3203
+ if (object.meta != null) {
3204
+ if (typeof object.meta !== "object")
3205
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted.meta: object expected");
3206
+ message.meta = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.fromObject(object.meta);
3207
+ }
3208
+ if (object.txCount != null)
3209
+ message.txCount = object.txCount >>> 0;
3210
+ return message;
3211
+ };
3212
+
3213
+ /**
3214
+ * Creates a plain object from a BlockCommitted message. Also converts values to other types if specified.
3215
+ * @function toObject
3216
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3217
+ * @static
3218
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted} message BlockCommitted
3219
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3220
+ * @returns {Object.<string,*>} Plain object
3221
+ */
3222
+ BlockCommitted.toObject = function toObject(message, options) {
3223
+ if (!options)
3224
+ options = {};
3225
+ var object = {};
3226
+ if (options.defaults) {
3227
+ object.meta = null;
3228
+ object.txCount = 0;
3229
+ }
3230
+ if (message.meta != null && message.hasOwnProperty("meta"))
3231
+ object.meta = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.toObject(message.meta, options);
3232
+ if (message.txCount != null && message.hasOwnProperty("txCount"))
3233
+ object.txCount = message.txCount;
3234
+ return object;
3235
+ };
3236
+
3237
+ /**
3238
+ * Converts this BlockCommitted to JSON.
3239
+ * @function toJSON
3240
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.BlockCommitted
3241
+ * @instance
3242
+ * @returns {Object.<string,*>} JSON object
3243
+ */
3244
+ BlockCommitted.prototype.toJSON = function toJSON() {
3245
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3246
+ };
3247
+
3248
+ return BlockCommitted;
3249
+ })();
3250
+
3251
+ PlatformEventV0.StateTransitionFinalized = (function() {
3252
+
3253
+ /**
3254
+ * Properties of a StateTransitionFinalized.
3255
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
3256
+ * @interface IStateTransitionFinalized
3257
+ * @property {org.dash.platform.dapi.v0.PlatformEventV0.IBlockMetadata|null} [meta] StateTransitionFinalized meta
3258
+ * @property {Uint8Array|null} [txHash] StateTransitionFinalized txHash
3259
+ */
3260
+
3261
+ /**
3262
+ * Constructs a new StateTransitionFinalized.
3263
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0
3264
+ * @classdesc Represents a StateTransitionFinalized.
3265
+ * @implements IStateTransitionFinalized
3266
+ * @constructor
3267
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IStateTransitionFinalized=} [properties] Properties to set
3268
+ */
3269
+ function StateTransitionFinalized(properties) {
3270
+ if (properties)
3271
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3272
+ if (properties[keys[i]] != null)
3273
+ this[keys[i]] = properties[keys[i]];
3274
+ }
3275
+
3276
+ /**
3277
+ * StateTransitionFinalized meta.
3278
+ * @member {org.dash.platform.dapi.v0.PlatformEventV0.IBlockMetadata|null|undefined} meta
3279
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3280
+ * @instance
3281
+ */
3282
+ StateTransitionFinalized.prototype.meta = null;
3283
+
3284
+ /**
3285
+ * StateTransitionFinalized txHash.
3286
+ * @member {Uint8Array} txHash
3287
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3288
+ * @instance
3289
+ */
3290
+ StateTransitionFinalized.prototype.txHash = $util.newBuffer([]);
3291
+
3292
+ /**
3293
+ * Creates a new StateTransitionFinalized instance using the specified properties.
3294
+ * @function create
3295
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3296
+ * @static
3297
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IStateTransitionFinalized=} [properties] Properties to set
3298
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized} StateTransitionFinalized instance
3299
+ */
3300
+ StateTransitionFinalized.create = function create(properties) {
3301
+ return new StateTransitionFinalized(properties);
3302
+ };
3303
+
3304
+ /**
3305
+ * Encodes the specified StateTransitionFinalized message. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized.verify|verify} messages.
3306
+ * @function encode
3307
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3308
+ * @static
3309
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IStateTransitionFinalized} message StateTransitionFinalized message or plain object to encode
3310
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3311
+ * @returns {$protobuf.Writer} Writer
3312
+ */
3313
+ StateTransitionFinalized.encode = function encode(message, writer) {
3314
+ if (!writer)
3315
+ writer = $Writer.create();
3316
+ if (message.meta != null && Object.hasOwnProperty.call(message, "meta"))
3317
+ $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.encode(message.meta, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3318
+ if (message.txHash != null && Object.hasOwnProperty.call(message, "txHash"))
3319
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.txHash);
3320
+ return writer;
3321
+ };
3322
+
3323
+ /**
3324
+ * Encodes the specified StateTransitionFinalized message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized.verify|verify} messages.
3325
+ * @function encodeDelimited
3326
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3327
+ * @static
3328
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.IStateTransitionFinalized} message StateTransitionFinalized message or plain object to encode
3329
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3330
+ * @returns {$protobuf.Writer} Writer
3331
+ */
3332
+ StateTransitionFinalized.encodeDelimited = function encodeDelimited(message, writer) {
3333
+ return this.encode(message, writer).ldelim();
3334
+ };
3335
+
3336
+ /**
3337
+ * Decodes a StateTransitionFinalized message from the specified reader or buffer.
3338
+ * @function decode
3339
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3340
+ * @static
3341
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3342
+ * @param {number} [length] Message length if known beforehand
3343
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized} StateTransitionFinalized
3344
+ * @throws {Error} If the payload is not a reader or valid buffer
3345
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3346
+ */
3347
+ StateTransitionFinalized.decode = function decode(reader, length) {
3348
+ if (!(reader instanceof $Reader))
3349
+ reader = $Reader.create(reader);
3350
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized();
3351
+ while (reader.pos < end) {
3352
+ var tag = reader.uint32();
3353
+ switch (tag >>> 3) {
3354
+ case 1:
3355
+ message.meta = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.decode(reader, reader.uint32());
3356
+ break;
3357
+ case 2:
3358
+ message.txHash = reader.bytes();
3359
+ break;
3360
+ default:
3361
+ reader.skipType(tag & 7);
3362
+ break;
3363
+ }
3364
+ }
3365
+ return message;
3366
+ };
3367
+
3368
+ /**
3369
+ * Decodes a StateTransitionFinalized message from the specified reader or buffer, length delimited.
3370
+ * @function decodeDelimited
3371
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3372
+ * @static
3373
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3374
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized} StateTransitionFinalized
3375
+ * @throws {Error} If the payload is not a reader or valid buffer
3376
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3377
+ */
3378
+ StateTransitionFinalized.decodeDelimited = function decodeDelimited(reader) {
3379
+ if (!(reader instanceof $Reader))
3380
+ reader = new $Reader(reader);
3381
+ return this.decode(reader, reader.uint32());
3382
+ };
3383
+
3384
+ /**
3385
+ * Verifies a StateTransitionFinalized message.
3386
+ * @function verify
3387
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3388
+ * @static
3389
+ * @param {Object.<string,*>} message Plain object to verify
3390
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3391
+ */
3392
+ StateTransitionFinalized.verify = function verify(message) {
3393
+ if (typeof message !== "object" || message === null)
3394
+ return "object expected";
3395
+ if (message.meta != null && message.hasOwnProperty("meta")) {
3396
+ var error = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.verify(message.meta);
3397
+ if (error)
3398
+ return "meta." + error;
3399
+ }
3400
+ if (message.txHash != null && message.hasOwnProperty("txHash"))
3401
+ if (!(message.txHash && typeof message.txHash.length === "number" || $util.isString(message.txHash)))
3402
+ return "txHash: buffer expected";
3403
+ return null;
3404
+ };
3405
+
3406
+ /**
3407
+ * Creates a StateTransitionFinalized message from a plain object. Also converts values to their respective internal types.
3408
+ * @function fromObject
3409
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3410
+ * @static
3411
+ * @param {Object.<string,*>} object Plain object
3412
+ * @returns {org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized} StateTransitionFinalized
3413
+ */
3414
+ StateTransitionFinalized.fromObject = function fromObject(object) {
3415
+ if (object instanceof $root.org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized)
3416
+ return object;
3417
+ var message = new $root.org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized();
3418
+ if (object.meta != null) {
3419
+ if (typeof object.meta !== "object")
3420
+ throw TypeError(".org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized.meta: object expected");
3421
+ message.meta = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.fromObject(object.meta);
3422
+ }
3423
+ if (object.txHash != null)
3424
+ if (typeof object.txHash === "string")
3425
+ $util.base64.decode(object.txHash, message.txHash = $util.newBuffer($util.base64.length(object.txHash)), 0);
3426
+ else if (object.txHash.length >= 0)
3427
+ message.txHash = object.txHash;
3428
+ return message;
3429
+ };
3430
+
3431
+ /**
3432
+ * Creates a plain object from a StateTransitionFinalized message. Also converts values to other types if specified.
3433
+ * @function toObject
3434
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3435
+ * @static
3436
+ * @param {org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized} message StateTransitionFinalized
3437
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3438
+ * @returns {Object.<string,*>} Plain object
3439
+ */
3440
+ StateTransitionFinalized.toObject = function toObject(message, options) {
3441
+ if (!options)
3442
+ options = {};
3443
+ var object = {};
3444
+ if (options.defaults) {
3445
+ object.meta = null;
3446
+ if (options.bytes === String)
3447
+ object.txHash = "";
3448
+ else {
3449
+ object.txHash = [];
3450
+ if (options.bytes !== Array)
3451
+ object.txHash = $util.newBuffer(object.txHash);
3452
+ }
3453
+ }
3454
+ if (message.meta != null && message.hasOwnProperty("meta"))
3455
+ object.meta = $root.org.dash.platform.dapi.v0.PlatformEventV0.BlockMetadata.toObject(message.meta, options);
3456
+ if (message.txHash != null && message.hasOwnProperty("txHash"))
3457
+ object.txHash = options.bytes === String ? $util.base64.encode(message.txHash, 0, message.txHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.txHash) : message.txHash;
3458
+ return object;
3459
+ };
3460
+
3461
+ /**
3462
+ * Converts this StateTransitionFinalized to JSON.
3463
+ * @function toJSON
3464
+ * @memberof org.dash.platform.dapi.v0.PlatformEventV0.StateTransitionFinalized
3465
+ * @instance
3466
+ * @returns {Object.<string,*>} JSON object
3467
+ */
3468
+ StateTransitionFinalized.prototype.toJSON = function toJSON() {
3469
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3470
+ };
3471
+
3472
+ return StateTransitionFinalized;
3473
+ })();
3474
+
3475
+ return PlatformEventV0;
3476
+ })();
3477
+
57
3478
  v0.Platform = (function() {
58
3479
 
59
3480
  /**
@@ -1637,6 +5058,39 @@ $root.org = (function() {
1637
5058
  * @variation 2
1638
5059
  */
1639
5060
 
5061
+ /**
5062
+ * Callback as used by {@link org.dash.platform.dapi.v0.Platform#subscribePlatformEvents}.
5063
+ * @memberof org.dash.platform.dapi.v0.Platform
5064
+ * @typedef SubscribePlatformEventsCallback
5065
+ * @type {function}
5066
+ * @param {Error|null} error Error, if any
5067
+ * @param {org.dash.platform.dapi.v0.PlatformEventsResponse} [response] PlatformEventsResponse
5068
+ */
5069
+
5070
+ /**
5071
+ * Calls SubscribePlatformEvents.
5072
+ * @function subscribePlatformEvents
5073
+ * @memberof org.dash.platform.dapi.v0.Platform
5074
+ * @instance
5075
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsCommand} request PlatformEventsCommand message or plain object
5076
+ * @param {org.dash.platform.dapi.v0.Platform.SubscribePlatformEventsCallback} callback Node-style callback called with the error, if any, and PlatformEventsResponse
5077
+ * @returns {undefined}
5078
+ * @variation 1
5079
+ */
5080
+ Object.defineProperty(Platform.prototype.subscribePlatformEvents = function subscribePlatformEvents(request, callback) {
5081
+ return this.rpcCall(subscribePlatformEvents, $root.org.dash.platform.dapi.v0.PlatformEventsCommand, $root.org.dash.platform.dapi.v0.PlatformEventsResponse, request, callback);
5082
+ }, "name", { value: "SubscribePlatformEvents" });
5083
+
5084
+ /**
5085
+ * Calls SubscribePlatformEvents.
5086
+ * @function subscribePlatformEvents
5087
+ * @memberof org.dash.platform.dapi.v0.Platform
5088
+ * @instance
5089
+ * @param {org.dash.platform.dapi.v0.IPlatformEventsCommand} request PlatformEventsCommand message or plain object
5090
+ * @returns {Promise<org.dash.platform.dapi.v0.PlatformEventsResponse>} Promise
5091
+ * @variation 2
5092
+ */
5093
+
1640
5094
  return Platform;
1641
5095
  })();
1642
5096