@dashevo/dapi-grpc 2.0.0-rc.15 → 2.0.0-rc.17

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.
@@ -1320,6 +1320,39 @@ $root.org = (function() {
1320
1320
  * @variation 2
1321
1321
  */
1322
1322
 
1323
+ /**
1324
+ * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getFinalizedEpochInfos}.
1325
+ * @memberof org.dash.platform.dapi.v0.Platform
1326
+ * @typedef getFinalizedEpochInfosCallback
1327
+ * @type {function}
1328
+ * @param {Error|null} error Error, if any
1329
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} [response] GetFinalizedEpochInfosResponse
1330
+ */
1331
+
1332
+ /**
1333
+ * Calls getFinalizedEpochInfos.
1334
+ * @function getFinalizedEpochInfos
1335
+ * @memberof org.dash.platform.dapi.v0.Platform
1336
+ * @instance
1337
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest} request GetFinalizedEpochInfosRequest message or plain object
1338
+ * @param {org.dash.platform.dapi.v0.Platform.getFinalizedEpochInfosCallback} callback Node-style callback called with the error, if any, and GetFinalizedEpochInfosResponse
1339
+ * @returns {undefined}
1340
+ * @variation 1
1341
+ */
1342
+ Object.defineProperty(Platform.prototype.getFinalizedEpochInfos = function getFinalizedEpochInfos(request, callback) {
1343
+ return this.rpcCall(getFinalizedEpochInfos, $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest, $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse, request, callback);
1344
+ }, "name", { value: "getFinalizedEpochInfos" });
1345
+
1346
+ /**
1347
+ * Calls getFinalizedEpochInfos.
1348
+ * @function getFinalizedEpochInfos
1349
+ * @memberof org.dash.platform.dapi.v0.Platform
1350
+ * @instance
1351
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest} request GetFinalizedEpochInfosRequest message or plain object
1352
+ * @returns {Promise<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse>} Promise
1353
+ * @variation 2
1354
+ */
1355
+
1323
1356
  /**
1324
1357
  * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getContestedResources}.
1325
1358
  * @memberof org.dash.platform.dapi.v0.Platform
@@ -29278,6 +29311,1976 @@ $root.org = (function() {
29278
29311
  return GetEpochsInfoResponse;
29279
29312
  })();
29280
29313
 
29314
+ v0.GetFinalizedEpochInfosRequest = (function() {
29315
+
29316
+ /**
29317
+ * Properties of a GetFinalizedEpochInfosRequest.
29318
+ * @memberof org.dash.platform.dapi.v0
29319
+ * @interface IGetFinalizedEpochInfosRequest
29320
+ * @property {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0|null} [v0] GetFinalizedEpochInfosRequest v0
29321
+ */
29322
+
29323
+ /**
29324
+ * Constructs a new GetFinalizedEpochInfosRequest.
29325
+ * @memberof org.dash.platform.dapi.v0
29326
+ * @classdesc Represents a GetFinalizedEpochInfosRequest.
29327
+ * @implements IGetFinalizedEpochInfosRequest
29328
+ * @constructor
29329
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest=} [properties] Properties to set
29330
+ */
29331
+ function GetFinalizedEpochInfosRequest(properties) {
29332
+ if (properties)
29333
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29334
+ if (properties[keys[i]] != null)
29335
+ this[keys[i]] = properties[keys[i]];
29336
+ }
29337
+
29338
+ /**
29339
+ * GetFinalizedEpochInfosRequest v0.
29340
+ * @member {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0|null|undefined} v0
29341
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29342
+ * @instance
29343
+ */
29344
+ GetFinalizedEpochInfosRequest.prototype.v0 = null;
29345
+
29346
+ // OneOf field names bound to virtual getters and setters
29347
+ var $oneOfFields;
29348
+
29349
+ /**
29350
+ * GetFinalizedEpochInfosRequest version.
29351
+ * @member {"v0"|undefined} version
29352
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29353
+ * @instance
29354
+ */
29355
+ Object.defineProperty(GetFinalizedEpochInfosRequest.prototype, "version", {
29356
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
29357
+ set: $util.oneOfSetter($oneOfFields)
29358
+ });
29359
+
29360
+ /**
29361
+ * Creates a new GetFinalizedEpochInfosRequest instance using the specified properties.
29362
+ * @function create
29363
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29364
+ * @static
29365
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest=} [properties] Properties to set
29366
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} GetFinalizedEpochInfosRequest instance
29367
+ */
29368
+ GetFinalizedEpochInfosRequest.create = function create(properties) {
29369
+ return new GetFinalizedEpochInfosRequest(properties);
29370
+ };
29371
+
29372
+ /**
29373
+ * Encodes the specified GetFinalizedEpochInfosRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.verify|verify} messages.
29374
+ * @function encode
29375
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29376
+ * @static
29377
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest} message GetFinalizedEpochInfosRequest message or plain object to encode
29378
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29379
+ * @returns {$protobuf.Writer} Writer
29380
+ */
29381
+ GetFinalizedEpochInfosRequest.encode = function encode(message, writer) {
29382
+ if (!writer)
29383
+ writer = $Writer.create();
29384
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
29385
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
29386
+ return writer;
29387
+ };
29388
+
29389
+ /**
29390
+ * Encodes the specified GetFinalizedEpochInfosRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.verify|verify} messages.
29391
+ * @function encodeDelimited
29392
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29393
+ * @static
29394
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest} message GetFinalizedEpochInfosRequest message or plain object to encode
29395
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29396
+ * @returns {$protobuf.Writer} Writer
29397
+ */
29398
+ GetFinalizedEpochInfosRequest.encodeDelimited = function encodeDelimited(message, writer) {
29399
+ return this.encode(message, writer).ldelim();
29400
+ };
29401
+
29402
+ /**
29403
+ * Decodes a GetFinalizedEpochInfosRequest message from the specified reader or buffer.
29404
+ * @function decode
29405
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29406
+ * @static
29407
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29408
+ * @param {number} [length] Message length if known beforehand
29409
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} GetFinalizedEpochInfosRequest
29410
+ * @throws {Error} If the payload is not a reader or valid buffer
29411
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29412
+ */
29413
+ GetFinalizedEpochInfosRequest.decode = function decode(reader, length) {
29414
+ if (!(reader instanceof $Reader))
29415
+ reader = $Reader.create(reader);
29416
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest();
29417
+ while (reader.pos < end) {
29418
+ var tag = reader.uint32();
29419
+ switch (tag >>> 3) {
29420
+ case 1:
29421
+ message.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.decode(reader, reader.uint32());
29422
+ break;
29423
+ default:
29424
+ reader.skipType(tag & 7);
29425
+ break;
29426
+ }
29427
+ }
29428
+ return message;
29429
+ };
29430
+
29431
+ /**
29432
+ * Decodes a GetFinalizedEpochInfosRequest message from the specified reader or buffer, length delimited.
29433
+ * @function decodeDelimited
29434
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29435
+ * @static
29436
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29437
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} GetFinalizedEpochInfosRequest
29438
+ * @throws {Error} If the payload is not a reader or valid buffer
29439
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29440
+ */
29441
+ GetFinalizedEpochInfosRequest.decodeDelimited = function decodeDelimited(reader) {
29442
+ if (!(reader instanceof $Reader))
29443
+ reader = new $Reader(reader);
29444
+ return this.decode(reader, reader.uint32());
29445
+ };
29446
+
29447
+ /**
29448
+ * Verifies a GetFinalizedEpochInfosRequest message.
29449
+ * @function verify
29450
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29451
+ * @static
29452
+ * @param {Object.<string,*>} message Plain object to verify
29453
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29454
+ */
29455
+ GetFinalizedEpochInfosRequest.verify = function verify(message) {
29456
+ if (typeof message !== "object" || message === null)
29457
+ return "object expected";
29458
+ var properties = {};
29459
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
29460
+ properties.version = 1;
29461
+ {
29462
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.verify(message.v0);
29463
+ if (error)
29464
+ return "v0." + error;
29465
+ }
29466
+ }
29467
+ return null;
29468
+ };
29469
+
29470
+ /**
29471
+ * Creates a GetFinalizedEpochInfosRequest message from a plain object. Also converts values to their respective internal types.
29472
+ * @function fromObject
29473
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29474
+ * @static
29475
+ * @param {Object.<string,*>} object Plain object
29476
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} GetFinalizedEpochInfosRequest
29477
+ */
29478
+ GetFinalizedEpochInfosRequest.fromObject = function fromObject(object) {
29479
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest)
29480
+ return object;
29481
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest();
29482
+ if (object.v0 != null) {
29483
+ if (typeof object.v0 !== "object")
29484
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.v0: object expected");
29485
+ message.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.fromObject(object.v0);
29486
+ }
29487
+ return message;
29488
+ };
29489
+
29490
+ /**
29491
+ * Creates a plain object from a GetFinalizedEpochInfosRequest message. Also converts values to other types if specified.
29492
+ * @function toObject
29493
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29494
+ * @static
29495
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} message GetFinalizedEpochInfosRequest
29496
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29497
+ * @returns {Object.<string,*>} Plain object
29498
+ */
29499
+ GetFinalizedEpochInfosRequest.toObject = function toObject(message, options) {
29500
+ if (!options)
29501
+ options = {};
29502
+ var object = {};
29503
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
29504
+ object.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.toObject(message.v0, options);
29505
+ if (options.oneofs)
29506
+ object.version = "v0";
29507
+ }
29508
+ return object;
29509
+ };
29510
+
29511
+ /**
29512
+ * Converts this GetFinalizedEpochInfosRequest to JSON.
29513
+ * @function toJSON
29514
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29515
+ * @instance
29516
+ * @returns {Object.<string,*>} JSON object
29517
+ */
29518
+ GetFinalizedEpochInfosRequest.prototype.toJSON = function toJSON() {
29519
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29520
+ };
29521
+
29522
+ GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0 = (function() {
29523
+
29524
+ /**
29525
+ * Properties of a GetFinalizedEpochInfosRequestV0.
29526
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29527
+ * @interface IGetFinalizedEpochInfosRequestV0
29528
+ * @property {number|null} [startEpochIndex] GetFinalizedEpochInfosRequestV0 startEpochIndex
29529
+ * @property {boolean|null} [startEpochIndexIncluded] GetFinalizedEpochInfosRequestV0 startEpochIndexIncluded
29530
+ * @property {number|null} [endEpochIndex] GetFinalizedEpochInfosRequestV0 endEpochIndex
29531
+ * @property {boolean|null} [endEpochIndexIncluded] GetFinalizedEpochInfosRequestV0 endEpochIndexIncluded
29532
+ * @property {boolean|null} [prove] GetFinalizedEpochInfosRequestV0 prove
29533
+ */
29534
+
29535
+ /**
29536
+ * Constructs a new GetFinalizedEpochInfosRequestV0.
29537
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29538
+ * @classdesc Represents a GetFinalizedEpochInfosRequestV0.
29539
+ * @implements IGetFinalizedEpochInfosRequestV0
29540
+ * @constructor
29541
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0=} [properties] Properties to set
29542
+ */
29543
+ function GetFinalizedEpochInfosRequestV0(properties) {
29544
+ if (properties)
29545
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29546
+ if (properties[keys[i]] != null)
29547
+ this[keys[i]] = properties[keys[i]];
29548
+ }
29549
+
29550
+ /**
29551
+ * GetFinalizedEpochInfosRequestV0 startEpochIndex.
29552
+ * @member {number} startEpochIndex
29553
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29554
+ * @instance
29555
+ */
29556
+ GetFinalizedEpochInfosRequestV0.prototype.startEpochIndex = 0;
29557
+
29558
+ /**
29559
+ * GetFinalizedEpochInfosRequestV0 startEpochIndexIncluded.
29560
+ * @member {boolean} startEpochIndexIncluded
29561
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29562
+ * @instance
29563
+ */
29564
+ GetFinalizedEpochInfosRequestV0.prototype.startEpochIndexIncluded = false;
29565
+
29566
+ /**
29567
+ * GetFinalizedEpochInfosRequestV0 endEpochIndex.
29568
+ * @member {number} endEpochIndex
29569
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29570
+ * @instance
29571
+ */
29572
+ GetFinalizedEpochInfosRequestV0.prototype.endEpochIndex = 0;
29573
+
29574
+ /**
29575
+ * GetFinalizedEpochInfosRequestV0 endEpochIndexIncluded.
29576
+ * @member {boolean} endEpochIndexIncluded
29577
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29578
+ * @instance
29579
+ */
29580
+ GetFinalizedEpochInfosRequestV0.prototype.endEpochIndexIncluded = false;
29581
+
29582
+ /**
29583
+ * GetFinalizedEpochInfosRequestV0 prove.
29584
+ * @member {boolean} prove
29585
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29586
+ * @instance
29587
+ */
29588
+ GetFinalizedEpochInfosRequestV0.prototype.prove = false;
29589
+
29590
+ /**
29591
+ * Creates a new GetFinalizedEpochInfosRequestV0 instance using the specified properties.
29592
+ * @function create
29593
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29594
+ * @static
29595
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0=} [properties] Properties to set
29596
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} GetFinalizedEpochInfosRequestV0 instance
29597
+ */
29598
+ GetFinalizedEpochInfosRequestV0.create = function create(properties) {
29599
+ return new GetFinalizedEpochInfosRequestV0(properties);
29600
+ };
29601
+
29602
+ /**
29603
+ * Encodes the specified GetFinalizedEpochInfosRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.verify|verify} messages.
29604
+ * @function encode
29605
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29606
+ * @static
29607
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0} message GetFinalizedEpochInfosRequestV0 message or plain object to encode
29608
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29609
+ * @returns {$protobuf.Writer} Writer
29610
+ */
29611
+ GetFinalizedEpochInfosRequestV0.encode = function encode(message, writer) {
29612
+ if (!writer)
29613
+ writer = $Writer.create();
29614
+ if (message.startEpochIndex != null && Object.hasOwnProperty.call(message, "startEpochIndex"))
29615
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.startEpochIndex);
29616
+ if (message.startEpochIndexIncluded != null && Object.hasOwnProperty.call(message, "startEpochIndexIncluded"))
29617
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.startEpochIndexIncluded);
29618
+ if (message.endEpochIndex != null && Object.hasOwnProperty.call(message, "endEpochIndex"))
29619
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endEpochIndex);
29620
+ if (message.endEpochIndexIncluded != null && Object.hasOwnProperty.call(message, "endEpochIndexIncluded"))
29621
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.endEpochIndexIncluded);
29622
+ if (message.prove != null && Object.hasOwnProperty.call(message, "prove"))
29623
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prove);
29624
+ return writer;
29625
+ };
29626
+
29627
+ /**
29628
+ * Encodes the specified GetFinalizedEpochInfosRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.verify|verify} messages.
29629
+ * @function encodeDelimited
29630
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29631
+ * @static
29632
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0} message GetFinalizedEpochInfosRequestV0 message or plain object to encode
29633
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29634
+ * @returns {$protobuf.Writer} Writer
29635
+ */
29636
+ GetFinalizedEpochInfosRequestV0.encodeDelimited = function encodeDelimited(message, writer) {
29637
+ return this.encode(message, writer).ldelim();
29638
+ };
29639
+
29640
+ /**
29641
+ * Decodes a GetFinalizedEpochInfosRequestV0 message from the specified reader or buffer.
29642
+ * @function decode
29643
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29644
+ * @static
29645
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29646
+ * @param {number} [length] Message length if known beforehand
29647
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} GetFinalizedEpochInfosRequestV0
29648
+ * @throws {Error} If the payload is not a reader or valid buffer
29649
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29650
+ */
29651
+ GetFinalizedEpochInfosRequestV0.decode = function decode(reader, length) {
29652
+ if (!(reader instanceof $Reader))
29653
+ reader = $Reader.create(reader);
29654
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0();
29655
+ while (reader.pos < end) {
29656
+ var tag = reader.uint32();
29657
+ switch (tag >>> 3) {
29658
+ case 1:
29659
+ message.startEpochIndex = reader.uint32();
29660
+ break;
29661
+ case 2:
29662
+ message.startEpochIndexIncluded = reader.bool();
29663
+ break;
29664
+ case 3:
29665
+ message.endEpochIndex = reader.uint32();
29666
+ break;
29667
+ case 4:
29668
+ message.endEpochIndexIncluded = reader.bool();
29669
+ break;
29670
+ case 5:
29671
+ message.prove = reader.bool();
29672
+ break;
29673
+ default:
29674
+ reader.skipType(tag & 7);
29675
+ break;
29676
+ }
29677
+ }
29678
+ return message;
29679
+ };
29680
+
29681
+ /**
29682
+ * Decodes a GetFinalizedEpochInfosRequestV0 message from the specified reader or buffer, length delimited.
29683
+ * @function decodeDelimited
29684
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29685
+ * @static
29686
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29687
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} GetFinalizedEpochInfosRequestV0
29688
+ * @throws {Error} If the payload is not a reader or valid buffer
29689
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29690
+ */
29691
+ GetFinalizedEpochInfosRequestV0.decodeDelimited = function decodeDelimited(reader) {
29692
+ if (!(reader instanceof $Reader))
29693
+ reader = new $Reader(reader);
29694
+ return this.decode(reader, reader.uint32());
29695
+ };
29696
+
29697
+ /**
29698
+ * Verifies a GetFinalizedEpochInfosRequestV0 message.
29699
+ * @function verify
29700
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29701
+ * @static
29702
+ * @param {Object.<string,*>} message Plain object to verify
29703
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29704
+ */
29705
+ GetFinalizedEpochInfosRequestV0.verify = function verify(message) {
29706
+ if (typeof message !== "object" || message === null)
29707
+ return "object expected";
29708
+ if (message.startEpochIndex != null && message.hasOwnProperty("startEpochIndex"))
29709
+ if (!$util.isInteger(message.startEpochIndex))
29710
+ return "startEpochIndex: integer expected";
29711
+ if (message.startEpochIndexIncluded != null && message.hasOwnProperty("startEpochIndexIncluded"))
29712
+ if (typeof message.startEpochIndexIncluded !== "boolean")
29713
+ return "startEpochIndexIncluded: boolean expected";
29714
+ if (message.endEpochIndex != null && message.hasOwnProperty("endEpochIndex"))
29715
+ if (!$util.isInteger(message.endEpochIndex))
29716
+ return "endEpochIndex: integer expected";
29717
+ if (message.endEpochIndexIncluded != null && message.hasOwnProperty("endEpochIndexIncluded"))
29718
+ if (typeof message.endEpochIndexIncluded !== "boolean")
29719
+ return "endEpochIndexIncluded: boolean expected";
29720
+ if (message.prove != null && message.hasOwnProperty("prove"))
29721
+ if (typeof message.prove !== "boolean")
29722
+ return "prove: boolean expected";
29723
+ return null;
29724
+ };
29725
+
29726
+ /**
29727
+ * Creates a GetFinalizedEpochInfosRequestV0 message from a plain object. Also converts values to their respective internal types.
29728
+ * @function fromObject
29729
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29730
+ * @static
29731
+ * @param {Object.<string,*>} object Plain object
29732
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} GetFinalizedEpochInfosRequestV0
29733
+ */
29734
+ GetFinalizedEpochInfosRequestV0.fromObject = function fromObject(object) {
29735
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0)
29736
+ return object;
29737
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0();
29738
+ if (object.startEpochIndex != null)
29739
+ message.startEpochIndex = object.startEpochIndex >>> 0;
29740
+ if (object.startEpochIndexIncluded != null)
29741
+ message.startEpochIndexIncluded = Boolean(object.startEpochIndexIncluded);
29742
+ if (object.endEpochIndex != null)
29743
+ message.endEpochIndex = object.endEpochIndex >>> 0;
29744
+ if (object.endEpochIndexIncluded != null)
29745
+ message.endEpochIndexIncluded = Boolean(object.endEpochIndexIncluded);
29746
+ if (object.prove != null)
29747
+ message.prove = Boolean(object.prove);
29748
+ return message;
29749
+ };
29750
+
29751
+ /**
29752
+ * Creates a plain object from a GetFinalizedEpochInfosRequestV0 message. Also converts values to other types if specified.
29753
+ * @function toObject
29754
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29755
+ * @static
29756
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} message GetFinalizedEpochInfosRequestV0
29757
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29758
+ * @returns {Object.<string,*>} Plain object
29759
+ */
29760
+ GetFinalizedEpochInfosRequestV0.toObject = function toObject(message, options) {
29761
+ if (!options)
29762
+ options = {};
29763
+ var object = {};
29764
+ if (options.defaults) {
29765
+ object.startEpochIndex = 0;
29766
+ object.startEpochIndexIncluded = false;
29767
+ object.endEpochIndex = 0;
29768
+ object.endEpochIndexIncluded = false;
29769
+ object.prove = false;
29770
+ }
29771
+ if (message.startEpochIndex != null && message.hasOwnProperty("startEpochIndex"))
29772
+ object.startEpochIndex = message.startEpochIndex;
29773
+ if (message.startEpochIndexIncluded != null && message.hasOwnProperty("startEpochIndexIncluded"))
29774
+ object.startEpochIndexIncluded = message.startEpochIndexIncluded;
29775
+ if (message.endEpochIndex != null && message.hasOwnProperty("endEpochIndex"))
29776
+ object.endEpochIndex = message.endEpochIndex;
29777
+ if (message.endEpochIndexIncluded != null && message.hasOwnProperty("endEpochIndexIncluded"))
29778
+ object.endEpochIndexIncluded = message.endEpochIndexIncluded;
29779
+ if (message.prove != null && message.hasOwnProperty("prove"))
29780
+ object.prove = message.prove;
29781
+ return object;
29782
+ };
29783
+
29784
+ /**
29785
+ * Converts this GetFinalizedEpochInfosRequestV0 to JSON.
29786
+ * @function toJSON
29787
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29788
+ * @instance
29789
+ * @returns {Object.<string,*>} JSON object
29790
+ */
29791
+ GetFinalizedEpochInfosRequestV0.prototype.toJSON = function toJSON() {
29792
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29793
+ };
29794
+
29795
+ return GetFinalizedEpochInfosRequestV0;
29796
+ })();
29797
+
29798
+ return GetFinalizedEpochInfosRequest;
29799
+ })();
29800
+
29801
+ v0.GetFinalizedEpochInfosResponse = (function() {
29802
+
29803
+ /**
29804
+ * Properties of a GetFinalizedEpochInfosResponse.
29805
+ * @memberof org.dash.platform.dapi.v0
29806
+ * @interface IGetFinalizedEpochInfosResponse
29807
+ * @property {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0|null} [v0] GetFinalizedEpochInfosResponse v0
29808
+ */
29809
+
29810
+ /**
29811
+ * Constructs a new GetFinalizedEpochInfosResponse.
29812
+ * @memberof org.dash.platform.dapi.v0
29813
+ * @classdesc Represents a GetFinalizedEpochInfosResponse.
29814
+ * @implements IGetFinalizedEpochInfosResponse
29815
+ * @constructor
29816
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosResponse=} [properties] Properties to set
29817
+ */
29818
+ function GetFinalizedEpochInfosResponse(properties) {
29819
+ if (properties)
29820
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29821
+ if (properties[keys[i]] != null)
29822
+ this[keys[i]] = properties[keys[i]];
29823
+ }
29824
+
29825
+ /**
29826
+ * GetFinalizedEpochInfosResponse v0.
29827
+ * @member {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0|null|undefined} v0
29828
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29829
+ * @instance
29830
+ */
29831
+ GetFinalizedEpochInfosResponse.prototype.v0 = null;
29832
+
29833
+ // OneOf field names bound to virtual getters and setters
29834
+ var $oneOfFields;
29835
+
29836
+ /**
29837
+ * GetFinalizedEpochInfosResponse version.
29838
+ * @member {"v0"|undefined} version
29839
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29840
+ * @instance
29841
+ */
29842
+ Object.defineProperty(GetFinalizedEpochInfosResponse.prototype, "version", {
29843
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
29844
+ set: $util.oneOfSetter($oneOfFields)
29845
+ });
29846
+
29847
+ /**
29848
+ * Creates a new GetFinalizedEpochInfosResponse instance using the specified properties.
29849
+ * @function create
29850
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29851
+ * @static
29852
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosResponse=} [properties] Properties to set
29853
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} GetFinalizedEpochInfosResponse instance
29854
+ */
29855
+ GetFinalizedEpochInfosResponse.create = function create(properties) {
29856
+ return new GetFinalizedEpochInfosResponse(properties);
29857
+ };
29858
+
29859
+ /**
29860
+ * Encodes the specified GetFinalizedEpochInfosResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.verify|verify} messages.
29861
+ * @function encode
29862
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29863
+ * @static
29864
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosResponse} message GetFinalizedEpochInfosResponse message or plain object to encode
29865
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29866
+ * @returns {$protobuf.Writer} Writer
29867
+ */
29868
+ GetFinalizedEpochInfosResponse.encode = function encode(message, writer) {
29869
+ if (!writer)
29870
+ writer = $Writer.create();
29871
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
29872
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
29873
+ return writer;
29874
+ };
29875
+
29876
+ /**
29877
+ * Encodes the specified GetFinalizedEpochInfosResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.verify|verify} messages.
29878
+ * @function encodeDelimited
29879
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29880
+ * @static
29881
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosResponse} message GetFinalizedEpochInfosResponse message or plain object to encode
29882
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29883
+ * @returns {$protobuf.Writer} Writer
29884
+ */
29885
+ GetFinalizedEpochInfosResponse.encodeDelimited = function encodeDelimited(message, writer) {
29886
+ return this.encode(message, writer).ldelim();
29887
+ };
29888
+
29889
+ /**
29890
+ * Decodes a GetFinalizedEpochInfosResponse message from the specified reader or buffer.
29891
+ * @function decode
29892
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29893
+ * @static
29894
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29895
+ * @param {number} [length] Message length if known beforehand
29896
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} GetFinalizedEpochInfosResponse
29897
+ * @throws {Error} If the payload is not a reader or valid buffer
29898
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29899
+ */
29900
+ GetFinalizedEpochInfosResponse.decode = function decode(reader, length) {
29901
+ if (!(reader instanceof $Reader))
29902
+ reader = $Reader.create(reader);
29903
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse();
29904
+ while (reader.pos < end) {
29905
+ var tag = reader.uint32();
29906
+ switch (tag >>> 3) {
29907
+ case 1:
29908
+ message.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.decode(reader, reader.uint32());
29909
+ break;
29910
+ default:
29911
+ reader.skipType(tag & 7);
29912
+ break;
29913
+ }
29914
+ }
29915
+ return message;
29916
+ };
29917
+
29918
+ /**
29919
+ * Decodes a GetFinalizedEpochInfosResponse message from the specified reader or buffer, length delimited.
29920
+ * @function decodeDelimited
29921
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29922
+ * @static
29923
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29924
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} GetFinalizedEpochInfosResponse
29925
+ * @throws {Error} If the payload is not a reader or valid buffer
29926
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29927
+ */
29928
+ GetFinalizedEpochInfosResponse.decodeDelimited = function decodeDelimited(reader) {
29929
+ if (!(reader instanceof $Reader))
29930
+ reader = new $Reader(reader);
29931
+ return this.decode(reader, reader.uint32());
29932
+ };
29933
+
29934
+ /**
29935
+ * Verifies a GetFinalizedEpochInfosResponse message.
29936
+ * @function verify
29937
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29938
+ * @static
29939
+ * @param {Object.<string,*>} message Plain object to verify
29940
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29941
+ */
29942
+ GetFinalizedEpochInfosResponse.verify = function verify(message) {
29943
+ if (typeof message !== "object" || message === null)
29944
+ return "object expected";
29945
+ var properties = {};
29946
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
29947
+ properties.version = 1;
29948
+ {
29949
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.verify(message.v0);
29950
+ if (error)
29951
+ return "v0." + error;
29952
+ }
29953
+ }
29954
+ return null;
29955
+ };
29956
+
29957
+ /**
29958
+ * Creates a GetFinalizedEpochInfosResponse message from a plain object. Also converts values to their respective internal types.
29959
+ * @function fromObject
29960
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29961
+ * @static
29962
+ * @param {Object.<string,*>} object Plain object
29963
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} GetFinalizedEpochInfosResponse
29964
+ */
29965
+ GetFinalizedEpochInfosResponse.fromObject = function fromObject(object) {
29966
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse)
29967
+ return object;
29968
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse();
29969
+ if (object.v0 != null) {
29970
+ if (typeof object.v0 !== "object")
29971
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.v0: object expected");
29972
+ message.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.fromObject(object.v0);
29973
+ }
29974
+ return message;
29975
+ };
29976
+
29977
+ /**
29978
+ * Creates a plain object from a GetFinalizedEpochInfosResponse message. Also converts values to other types if specified.
29979
+ * @function toObject
29980
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29981
+ * @static
29982
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} message GetFinalizedEpochInfosResponse
29983
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29984
+ * @returns {Object.<string,*>} Plain object
29985
+ */
29986
+ GetFinalizedEpochInfosResponse.toObject = function toObject(message, options) {
29987
+ if (!options)
29988
+ options = {};
29989
+ var object = {};
29990
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
29991
+ object.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.toObject(message.v0, options);
29992
+ if (options.oneofs)
29993
+ object.version = "v0";
29994
+ }
29995
+ return object;
29996
+ };
29997
+
29998
+ /**
29999
+ * Converts this GetFinalizedEpochInfosResponse to JSON.
30000
+ * @function toJSON
30001
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
30002
+ * @instance
30003
+ * @returns {Object.<string,*>} JSON object
30004
+ */
30005
+ GetFinalizedEpochInfosResponse.prototype.toJSON = function toJSON() {
30006
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
30007
+ };
30008
+
30009
+ GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0 = (function() {
30010
+
30011
+ /**
30012
+ * Properties of a GetFinalizedEpochInfosResponseV0.
30013
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
30014
+ * @interface IGetFinalizedEpochInfosResponseV0
30015
+ * @property {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos|null} [epochs] GetFinalizedEpochInfosResponseV0 epochs
30016
+ * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetFinalizedEpochInfosResponseV0 proof
30017
+ * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetFinalizedEpochInfosResponseV0 metadata
30018
+ */
30019
+
30020
+ /**
30021
+ * Constructs a new GetFinalizedEpochInfosResponseV0.
30022
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
30023
+ * @classdesc Represents a GetFinalizedEpochInfosResponseV0.
30024
+ * @implements IGetFinalizedEpochInfosResponseV0
30025
+ * @constructor
30026
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0=} [properties] Properties to set
30027
+ */
30028
+ function GetFinalizedEpochInfosResponseV0(properties) {
30029
+ if (properties)
30030
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
30031
+ if (properties[keys[i]] != null)
30032
+ this[keys[i]] = properties[keys[i]];
30033
+ }
30034
+
30035
+ /**
30036
+ * GetFinalizedEpochInfosResponseV0 epochs.
30037
+ * @member {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos|null|undefined} epochs
30038
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30039
+ * @instance
30040
+ */
30041
+ GetFinalizedEpochInfosResponseV0.prototype.epochs = null;
30042
+
30043
+ /**
30044
+ * GetFinalizedEpochInfosResponseV0 proof.
30045
+ * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof
30046
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30047
+ * @instance
30048
+ */
30049
+ GetFinalizedEpochInfosResponseV0.prototype.proof = null;
30050
+
30051
+ /**
30052
+ * GetFinalizedEpochInfosResponseV0 metadata.
30053
+ * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata
30054
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30055
+ * @instance
30056
+ */
30057
+ GetFinalizedEpochInfosResponseV0.prototype.metadata = null;
30058
+
30059
+ // OneOf field names bound to virtual getters and setters
30060
+ var $oneOfFields;
30061
+
30062
+ /**
30063
+ * GetFinalizedEpochInfosResponseV0 result.
30064
+ * @member {"epochs"|"proof"|undefined} result
30065
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30066
+ * @instance
30067
+ */
30068
+ Object.defineProperty(GetFinalizedEpochInfosResponseV0.prototype, "result", {
30069
+ get: $util.oneOfGetter($oneOfFields = ["epochs", "proof"]),
30070
+ set: $util.oneOfSetter($oneOfFields)
30071
+ });
30072
+
30073
+ /**
30074
+ * Creates a new GetFinalizedEpochInfosResponseV0 instance using the specified properties.
30075
+ * @function create
30076
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30077
+ * @static
30078
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0=} [properties] Properties to set
30079
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} GetFinalizedEpochInfosResponseV0 instance
30080
+ */
30081
+ GetFinalizedEpochInfosResponseV0.create = function create(properties) {
30082
+ return new GetFinalizedEpochInfosResponseV0(properties);
30083
+ };
30084
+
30085
+ /**
30086
+ * Encodes the specified GetFinalizedEpochInfosResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.verify|verify} messages.
30087
+ * @function encode
30088
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30089
+ * @static
30090
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0} message GetFinalizedEpochInfosResponseV0 message or plain object to encode
30091
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30092
+ * @returns {$protobuf.Writer} Writer
30093
+ */
30094
+ GetFinalizedEpochInfosResponseV0.encode = function encode(message, writer) {
30095
+ if (!writer)
30096
+ writer = $Writer.create();
30097
+ if (message.epochs != null && Object.hasOwnProperty.call(message, "epochs"))
30098
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.encode(message.epochs, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
30099
+ if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
30100
+ $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
30101
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
30102
+ $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
30103
+ return writer;
30104
+ };
30105
+
30106
+ /**
30107
+ * Encodes the specified GetFinalizedEpochInfosResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.verify|verify} messages.
30108
+ * @function encodeDelimited
30109
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30110
+ * @static
30111
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0} message GetFinalizedEpochInfosResponseV0 message or plain object to encode
30112
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30113
+ * @returns {$protobuf.Writer} Writer
30114
+ */
30115
+ GetFinalizedEpochInfosResponseV0.encodeDelimited = function encodeDelimited(message, writer) {
30116
+ return this.encode(message, writer).ldelim();
30117
+ };
30118
+
30119
+ /**
30120
+ * Decodes a GetFinalizedEpochInfosResponseV0 message from the specified reader or buffer.
30121
+ * @function decode
30122
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30123
+ * @static
30124
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30125
+ * @param {number} [length] Message length if known beforehand
30126
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} GetFinalizedEpochInfosResponseV0
30127
+ * @throws {Error} If the payload is not a reader or valid buffer
30128
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30129
+ */
30130
+ GetFinalizedEpochInfosResponseV0.decode = function decode(reader, length) {
30131
+ if (!(reader instanceof $Reader))
30132
+ reader = $Reader.create(reader);
30133
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0();
30134
+ while (reader.pos < end) {
30135
+ var tag = reader.uint32();
30136
+ switch (tag >>> 3) {
30137
+ case 1:
30138
+ message.epochs = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.decode(reader, reader.uint32());
30139
+ break;
30140
+ case 2:
30141
+ message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
30142
+ break;
30143
+ case 3:
30144
+ message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32());
30145
+ break;
30146
+ default:
30147
+ reader.skipType(tag & 7);
30148
+ break;
30149
+ }
30150
+ }
30151
+ return message;
30152
+ };
30153
+
30154
+ /**
30155
+ * Decodes a GetFinalizedEpochInfosResponseV0 message from the specified reader or buffer, length delimited.
30156
+ * @function decodeDelimited
30157
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30158
+ * @static
30159
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30160
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} GetFinalizedEpochInfosResponseV0
30161
+ * @throws {Error} If the payload is not a reader or valid buffer
30162
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30163
+ */
30164
+ GetFinalizedEpochInfosResponseV0.decodeDelimited = function decodeDelimited(reader) {
30165
+ if (!(reader instanceof $Reader))
30166
+ reader = new $Reader(reader);
30167
+ return this.decode(reader, reader.uint32());
30168
+ };
30169
+
30170
+ /**
30171
+ * Verifies a GetFinalizedEpochInfosResponseV0 message.
30172
+ * @function verify
30173
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30174
+ * @static
30175
+ * @param {Object.<string,*>} message Plain object to verify
30176
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
30177
+ */
30178
+ GetFinalizedEpochInfosResponseV0.verify = function verify(message) {
30179
+ if (typeof message !== "object" || message === null)
30180
+ return "object expected";
30181
+ var properties = {};
30182
+ if (message.epochs != null && message.hasOwnProperty("epochs")) {
30183
+ properties.result = 1;
30184
+ {
30185
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.verify(message.epochs);
30186
+ if (error)
30187
+ return "epochs." + error;
30188
+ }
30189
+ }
30190
+ if (message.proof != null && message.hasOwnProperty("proof")) {
30191
+ if (properties.result === 1)
30192
+ return "result: multiple values";
30193
+ properties.result = 1;
30194
+ {
30195
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
30196
+ if (error)
30197
+ return "proof." + error;
30198
+ }
30199
+ }
30200
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
30201
+ var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
30202
+ if (error)
30203
+ return "metadata." + error;
30204
+ }
30205
+ return null;
30206
+ };
30207
+
30208
+ /**
30209
+ * Creates a GetFinalizedEpochInfosResponseV0 message from a plain object. Also converts values to their respective internal types.
30210
+ * @function fromObject
30211
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30212
+ * @static
30213
+ * @param {Object.<string,*>} object Plain object
30214
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} GetFinalizedEpochInfosResponseV0
30215
+ */
30216
+ GetFinalizedEpochInfosResponseV0.fromObject = function fromObject(object) {
30217
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0)
30218
+ return object;
30219
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0();
30220
+ if (object.epochs != null) {
30221
+ if (typeof object.epochs !== "object")
30222
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.epochs: object expected");
30223
+ message.epochs = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.fromObject(object.epochs);
30224
+ }
30225
+ if (object.proof != null) {
30226
+ if (typeof object.proof !== "object")
30227
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.proof: object expected");
30228
+ message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof);
30229
+ }
30230
+ if (object.metadata != null) {
30231
+ if (typeof object.metadata !== "object")
30232
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.metadata: object expected");
30233
+ message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata);
30234
+ }
30235
+ return message;
30236
+ };
30237
+
30238
+ /**
30239
+ * Creates a plain object from a GetFinalizedEpochInfosResponseV0 message. Also converts values to other types if specified.
30240
+ * @function toObject
30241
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30242
+ * @static
30243
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} message GetFinalizedEpochInfosResponseV0
30244
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
30245
+ * @returns {Object.<string,*>} Plain object
30246
+ */
30247
+ GetFinalizedEpochInfosResponseV0.toObject = function toObject(message, options) {
30248
+ if (!options)
30249
+ options = {};
30250
+ var object = {};
30251
+ if (options.defaults)
30252
+ object.metadata = null;
30253
+ if (message.epochs != null && message.hasOwnProperty("epochs")) {
30254
+ object.epochs = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.toObject(message.epochs, options);
30255
+ if (options.oneofs)
30256
+ object.result = "epochs";
30257
+ }
30258
+ if (message.proof != null && message.hasOwnProperty("proof")) {
30259
+ object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
30260
+ if (options.oneofs)
30261
+ object.result = "proof";
30262
+ }
30263
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
30264
+ object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
30265
+ return object;
30266
+ };
30267
+
30268
+ /**
30269
+ * Converts this GetFinalizedEpochInfosResponseV0 to JSON.
30270
+ * @function toJSON
30271
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30272
+ * @instance
30273
+ * @returns {Object.<string,*>} JSON object
30274
+ */
30275
+ GetFinalizedEpochInfosResponseV0.prototype.toJSON = function toJSON() {
30276
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
30277
+ };
30278
+
30279
+ GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos = (function() {
30280
+
30281
+ /**
30282
+ * Properties of a FinalizedEpochInfos.
30283
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30284
+ * @interface IFinalizedEpochInfos
30285
+ * @property {Array.<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo>|null} [finalizedEpochInfos] FinalizedEpochInfos finalizedEpochInfos
30286
+ */
30287
+
30288
+ /**
30289
+ * Constructs a new FinalizedEpochInfos.
30290
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30291
+ * @classdesc Represents a FinalizedEpochInfos.
30292
+ * @implements IFinalizedEpochInfos
30293
+ * @constructor
30294
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos=} [properties] Properties to set
30295
+ */
30296
+ function FinalizedEpochInfos(properties) {
30297
+ this.finalizedEpochInfos = [];
30298
+ if (properties)
30299
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
30300
+ if (properties[keys[i]] != null)
30301
+ this[keys[i]] = properties[keys[i]];
30302
+ }
30303
+
30304
+ /**
30305
+ * FinalizedEpochInfos finalizedEpochInfos.
30306
+ * @member {Array.<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo>} finalizedEpochInfos
30307
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30308
+ * @instance
30309
+ */
30310
+ FinalizedEpochInfos.prototype.finalizedEpochInfos = $util.emptyArray;
30311
+
30312
+ /**
30313
+ * Creates a new FinalizedEpochInfos instance using the specified properties.
30314
+ * @function create
30315
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30316
+ * @static
30317
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos=} [properties] Properties to set
30318
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} FinalizedEpochInfos instance
30319
+ */
30320
+ FinalizedEpochInfos.create = function create(properties) {
30321
+ return new FinalizedEpochInfos(properties);
30322
+ };
30323
+
30324
+ /**
30325
+ * Encodes the specified FinalizedEpochInfos message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.verify|verify} messages.
30326
+ * @function encode
30327
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30328
+ * @static
30329
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos} message FinalizedEpochInfos message or plain object to encode
30330
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30331
+ * @returns {$protobuf.Writer} Writer
30332
+ */
30333
+ FinalizedEpochInfos.encode = function encode(message, writer) {
30334
+ if (!writer)
30335
+ writer = $Writer.create();
30336
+ if (message.finalizedEpochInfos != null && message.finalizedEpochInfos.length)
30337
+ for (var i = 0; i < message.finalizedEpochInfos.length; ++i)
30338
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.encode(message.finalizedEpochInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
30339
+ return writer;
30340
+ };
30341
+
30342
+ /**
30343
+ * Encodes the specified FinalizedEpochInfos message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.verify|verify} messages.
30344
+ * @function encodeDelimited
30345
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30346
+ * @static
30347
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos} message FinalizedEpochInfos message or plain object to encode
30348
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30349
+ * @returns {$protobuf.Writer} Writer
30350
+ */
30351
+ FinalizedEpochInfos.encodeDelimited = function encodeDelimited(message, writer) {
30352
+ return this.encode(message, writer).ldelim();
30353
+ };
30354
+
30355
+ /**
30356
+ * Decodes a FinalizedEpochInfos message from the specified reader or buffer.
30357
+ * @function decode
30358
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30359
+ * @static
30360
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30361
+ * @param {number} [length] Message length if known beforehand
30362
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} FinalizedEpochInfos
30363
+ * @throws {Error} If the payload is not a reader or valid buffer
30364
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30365
+ */
30366
+ FinalizedEpochInfos.decode = function decode(reader, length) {
30367
+ if (!(reader instanceof $Reader))
30368
+ reader = $Reader.create(reader);
30369
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos();
30370
+ while (reader.pos < end) {
30371
+ var tag = reader.uint32();
30372
+ switch (tag >>> 3) {
30373
+ case 1:
30374
+ if (!(message.finalizedEpochInfos && message.finalizedEpochInfos.length))
30375
+ message.finalizedEpochInfos = [];
30376
+ message.finalizedEpochInfos.push($root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.decode(reader, reader.uint32()));
30377
+ break;
30378
+ default:
30379
+ reader.skipType(tag & 7);
30380
+ break;
30381
+ }
30382
+ }
30383
+ return message;
30384
+ };
30385
+
30386
+ /**
30387
+ * Decodes a FinalizedEpochInfos message from the specified reader or buffer, length delimited.
30388
+ * @function decodeDelimited
30389
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30390
+ * @static
30391
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30392
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} FinalizedEpochInfos
30393
+ * @throws {Error} If the payload is not a reader or valid buffer
30394
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30395
+ */
30396
+ FinalizedEpochInfos.decodeDelimited = function decodeDelimited(reader) {
30397
+ if (!(reader instanceof $Reader))
30398
+ reader = new $Reader(reader);
30399
+ return this.decode(reader, reader.uint32());
30400
+ };
30401
+
30402
+ /**
30403
+ * Verifies a FinalizedEpochInfos message.
30404
+ * @function verify
30405
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30406
+ * @static
30407
+ * @param {Object.<string,*>} message Plain object to verify
30408
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
30409
+ */
30410
+ FinalizedEpochInfos.verify = function verify(message) {
30411
+ if (typeof message !== "object" || message === null)
30412
+ return "object expected";
30413
+ if (message.finalizedEpochInfos != null && message.hasOwnProperty("finalizedEpochInfos")) {
30414
+ if (!Array.isArray(message.finalizedEpochInfos))
30415
+ return "finalizedEpochInfos: array expected";
30416
+ for (var i = 0; i < message.finalizedEpochInfos.length; ++i) {
30417
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.verify(message.finalizedEpochInfos[i]);
30418
+ if (error)
30419
+ return "finalizedEpochInfos." + error;
30420
+ }
30421
+ }
30422
+ return null;
30423
+ };
30424
+
30425
+ /**
30426
+ * Creates a FinalizedEpochInfos message from a plain object. Also converts values to their respective internal types.
30427
+ * @function fromObject
30428
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30429
+ * @static
30430
+ * @param {Object.<string,*>} object Plain object
30431
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} FinalizedEpochInfos
30432
+ */
30433
+ FinalizedEpochInfos.fromObject = function fromObject(object) {
30434
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos)
30435
+ return object;
30436
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos();
30437
+ if (object.finalizedEpochInfos) {
30438
+ if (!Array.isArray(object.finalizedEpochInfos))
30439
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.finalizedEpochInfos: array expected");
30440
+ message.finalizedEpochInfos = [];
30441
+ for (var i = 0; i < object.finalizedEpochInfos.length; ++i) {
30442
+ if (typeof object.finalizedEpochInfos[i] !== "object")
30443
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.finalizedEpochInfos: object expected");
30444
+ message.finalizedEpochInfos[i] = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.fromObject(object.finalizedEpochInfos[i]);
30445
+ }
30446
+ }
30447
+ return message;
30448
+ };
30449
+
30450
+ /**
30451
+ * Creates a plain object from a FinalizedEpochInfos message. Also converts values to other types if specified.
30452
+ * @function toObject
30453
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30454
+ * @static
30455
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} message FinalizedEpochInfos
30456
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
30457
+ * @returns {Object.<string,*>} Plain object
30458
+ */
30459
+ FinalizedEpochInfos.toObject = function toObject(message, options) {
30460
+ if (!options)
30461
+ options = {};
30462
+ var object = {};
30463
+ if (options.arrays || options.defaults)
30464
+ object.finalizedEpochInfos = [];
30465
+ if (message.finalizedEpochInfos && message.finalizedEpochInfos.length) {
30466
+ object.finalizedEpochInfos = [];
30467
+ for (var j = 0; j < message.finalizedEpochInfos.length; ++j)
30468
+ object.finalizedEpochInfos[j] = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.toObject(message.finalizedEpochInfos[j], options);
30469
+ }
30470
+ return object;
30471
+ };
30472
+
30473
+ /**
30474
+ * Converts this FinalizedEpochInfos to JSON.
30475
+ * @function toJSON
30476
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
30477
+ * @instance
30478
+ * @returns {Object.<string,*>} JSON object
30479
+ */
30480
+ FinalizedEpochInfos.prototype.toJSON = function toJSON() {
30481
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
30482
+ };
30483
+
30484
+ return FinalizedEpochInfos;
30485
+ })();
30486
+
30487
+ GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo = (function() {
30488
+
30489
+ /**
30490
+ * Properties of a FinalizedEpochInfo.
30491
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30492
+ * @interface IFinalizedEpochInfo
30493
+ * @property {number|null} [number] FinalizedEpochInfo number
30494
+ * @property {number|Long|null} [firstBlockHeight] FinalizedEpochInfo firstBlockHeight
30495
+ * @property {number|null} [firstCoreBlockHeight] FinalizedEpochInfo firstCoreBlockHeight
30496
+ * @property {number|Long|null} [firstBlockTime] FinalizedEpochInfo firstBlockTime
30497
+ * @property {number|null} [feeMultiplier] FinalizedEpochInfo feeMultiplier
30498
+ * @property {number|null} [protocolVersion] FinalizedEpochInfo protocolVersion
30499
+ * @property {number|Long|null} [totalBlocksInEpoch] FinalizedEpochInfo totalBlocksInEpoch
30500
+ * @property {number|null} [nextEpochStartCoreBlockHeight] FinalizedEpochInfo nextEpochStartCoreBlockHeight
30501
+ * @property {number|Long|null} [totalProcessingFees] FinalizedEpochInfo totalProcessingFees
30502
+ * @property {number|Long|null} [totalDistributedStorageFees] FinalizedEpochInfo totalDistributedStorageFees
30503
+ * @property {number|Long|null} [totalCreatedStorageFees] FinalizedEpochInfo totalCreatedStorageFees
30504
+ * @property {number|Long|null} [coreBlockRewards] FinalizedEpochInfo coreBlockRewards
30505
+ * @property {Array.<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer>|null} [blockProposers] FinalizedEpochInfo blockProposers
30506
+ */
30507
+
30508
+ /**
30509
+ * Constructs a new FinalizedEpochInfo.
30510
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30511
+ * @classdesc Represents a FinalizedEpochInfo.
30512
+ * @implements IFinalizedEpochInfo
30513
+ * @constructor
30514
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo=} [properties] Properties to set
30515
+ */
30516
+ function FinalizedEpochInfo(properties) {
30517
+ this.blockProposers = [];
30518
+ if (properties)
30519
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
30520
+ if (properties[keys[i]] != null)
30521
+ this[keys[i]] = properties[keys[i]];
30522
+ }
30523
+
30524
+ /**
30525
+ * FinalizedEpochInfo number.
30526
+ * @member {number} number
30527
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30528
+ * @instance
30529
+ */
30530
+ FinalizedEpochInfo.prototype.number = 0;
30531
+
30532
+ /**
30533
+ * FinalizedEpochInfo firstBlockHeight.
30534
+ * @member {number|Long} firstBlockHeight
30535
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30536
+ * @instance
30537
+ */
30538
+ FinalizedEpochInfo.prototype.firstBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30539
+
30540
+ /**
30541
+ * FinalizedEpochInfo firstCoreBlockHeight.
30542
+ * @member {number} firstCoreBlockHeight
30543
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30544
+ * @instance
30545
+ */
30546
+ FinalizedEpochInfo.prototype.firstCoreBlockHeight = 0;
30547
+
30548
+ /**
30549
+ * FinalizedEpochInfo firstBlockTime.
30550
+ * @member {number|Long} firstBlockTime
30551
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30552
+ * @instance
30553
+ */
30554
+ FinalizedEpochInfo.prototype.firstBlockTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30555
+
30556
+ /**
30557
+ * FinalizedEpochInfo feeMultiplier.
30558
+ * @member {number} feeMultiplier
30559
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30560
+ * @instance
30561
+ */
30562
+ FinalizedEpochInfo.prototype.feeMultiplier = 0;
30563
+
30564
+ /**
30565
+ * FinalizedEpochInfo protocolVersion.
30566
+ * @member {number} protocolVersion
30567
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30568
+ * @instance
30569
+ */
30570
+ FinalizedEpochInfo.prototype.protocolVersion = 0;
30571
+
30572
+ /**
30573
+ * FinalizedEpochInfo totalBlocksInEpoch.
30574
+ * @member {number|Long} totalBlocksInEpoch
30575
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30576
+ * @instance
30577
+ */
30578
+ FinalizedEpochInfo.prototype.totalBlocksInEpoch = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30579
+
30580
+ /**
30581
+ * FinalizedEpochInfo nextEpochStartCoreBlockHeight.
30582
+ * @member {number} nextEpochStartCoreBlockHeight
30583
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30584
+ * @instance
30585
+ */
30586
+ FinalizedEpochInfo.prototype.nextEpochStartCoreBlockHeight = 0;
30587
+
30588
+ /**
30589
+ * FinalizedEpochInfo totalProcessingFees.
30590
+ * @member {number|Long} totalProcessingFees
30591
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30592
+ * @instance
30593
+ */
30594
+ FinalizedEpochInfo.prototype.totalProcessingFees = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30595
+
30596
+ /**
30597
+ * FinalizedEpochInfo totalDistributedStorageFees.
30598
+ * @member {number|Long} totalDistributedStorageFees
30599
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30600
+ * @instance
30601
+ */
30602
+ FinalizedEpochInfo.prototype.totalDistributedStorageFees = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30603
+
30604
+ /**
30605
+ * FinalizedEpochInfo totalCreatedStorageFees.
30606
+ * @member {number|Long} totalCreatedStorageFees
30607
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30608
+ * @instance
30609
+ */
30610
+ FinalizedEpochInfo.prototype.totalCreatedStorageFees = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30611
+
30612
+ /**
30613
+ * FinalizedEpochInfo coreBlockRewards.
30614
+ * @member {number|Long} coreBlockRewards
30615
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30616
+ * @instance
30617
+ */
30618
+ FinalizedEpochInfo.prototype.coreBlockRewards = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30619
+
30620
+ /**
30621
+ * FinalizedEpochInfo blockProposers.
30622
+ * @member {Array.<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer>} blockProposers
30623
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30624
+ * @instance
30625
+ */
30626
+ FinalizedEpochInfo.prototype.blockProposers = $util.emptyArray;
30627
+
30628
+ /**
30629
+ * Creates a new FinalizedEpochInfo instance using the specified properties.
30630
+ * @function create
30631
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30632
+ * @static
30633
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo=} [properties] Properties to set
30634
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} FinalizedEpochInfo instance
30635
+ */
30636
+ FinalizedEpochInfo.create = function create(properties) {
30637
+ return new FinalizedEpochInfo(properties);
30638
+ };
30639
+
30640
+ /**
30641
+ * Encodes the specified FinalizedEpochInfo message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.verify|verify} messages.
30642
+ * @function encode
30643
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30644
+ * @static
30645
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo} message FinalizedEpochInfo message or plain object to encode
30646
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30647
+ * @returns {$protobuf.Writer} Writer
30648
+ */
30649
+ FinalizedEpochInfo.encode = function encode(message, writer) {
30650
+ if (!writer)
30651
+ writer = $Writer.create();
30652
+ if (message.number != null && Object.hasOwnProperty.call(message, "number"))
30653
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.number);
30654
+ if (message.firstBlockHeight != null && Object.hasOwnProperty.call(message, "firstBlockHeight"))
30655
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.firstBlockHeight);
30656
+ if (message.firstCoreBlockHeight != null && Object.hasOwnProperty.call(message, "firstCoreBlockHeight"))
30657
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.firstCoreBlockHeight);
30658
+ if (message.firstBlockTime != null && Object.hasOwnProperty.call(message, "firstBlockTime"))
30659
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.firstBlockTime);
30660
+ if (message.feeMultiplier != null && Object.hasOwnProperty.call(message, "feeMultiplier"))
30661
+ writer.uint32(/* id 5, wireType 1 =*/41).double(message.feeMultiplier);
30662
+ if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion"))
30663
+ writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.protocolVersion);
30664
+ if (message.totalBlocksInEpoch != null && Object.hasOwnProperty.call(message, "totalBlocksInEpoch"))
30665
+ writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.totalBlocksInEpoch);
30666
+ if (message.nextEpochStartCoreBlockHeight != null && Object.hasOwnProperty.call(message, "nextEpochStartCoreBlockHeight"))
30667
+ writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.nextEpochStartCoreBlockHeight);
30668
+ if (message.totalProcessingFees != null && Object.hasOwnProperty.call(message, "totalProcessingFees"))
30669
+ writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.totalProcessingFees);
30670
+ if (message.totalDistributedStorageFees != null && Object.hasOwnProperty.call(message, "totalDistributedStorageFees"))
30671
+ writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.totalDistributedStorageFees);
30672
+ if (message.totalCreatedStorageFees != null && Object.hasOwnProperty.call(message, "totalCreatedStorageFees"))
30673
+ writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.totalCreatedStorageFees);
30674
+ if (message.coreBlockRewards != null && Object.hasOwnProperty.call(message, "coreBlockRewards"))
30675
+ writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.coreBlockRewards);
30676
+ if (message.blockProposers != null && message.blockProposers.length)
30677
+ for (var i = 0; i < message.blockProposers.length; ++i)
30678
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.encode(message.blockProposers[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
30679
+ return writer;
30680
+ };
30681
+
30682
+ /**
30683
+ * Encodes the specified FinalizedEpochInfo message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.verify|verify} messages.
30684
+ * @function encodeDelimited
30685
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30686
+ * @static
30687
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo} message FinalizedEpochInfo message or plain object to encode
30688
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30689
+ * @returns {$protobuf.Writer} Writer
30690
+ */
30691
+ FinalizedEpochInfo.encodeDelimited = function encodeDelimited(message, writer) {
30692
+ return this.encode(message, writer).ldelim();
30693
+ };
30694
+
30695
+ /**
30696
+ * Decodes a FinalizedEpochInfo message from the specified reader or buffer.
30697
+ * @function decode
30698
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30699
+ * @static
30700
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30701
+ * @param {number} [length] Message length if known beforehand
30702
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} FinalizedEpochInfo
30703
+ * @throws {Error} If the payload is not a reader or valid buffer
30704
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30705
+ */
30706
+ FinalizedEpochInfo.decode = function decode(reader, length) {
30707
+ if (!(reader instanceof $Reader))
30708
+ reader = $Reader.create(reader);
30709
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo();
30710
+ while (reader.pos < end) {
30711
+ var tag = reader.uint32();
30712
+ switch (tag >>> 3) {
30713
+ case 1:
30714
+ message.number = reader.uint32();
30715
+ break;
30716
+ case 2:
30717
+ message.firstBlockHeight = reader.uint64();
30718
+ break;
30719
+ case 3:
30720
+ message.firstCoreBlockHeight = reader.uint32();
30721
+ break;
30722
+ case 4:
30723
+ message.firstBlockTime = reader.uint64();
30724
+ break;
30725
+ case 5:
30726
+ message.feeMultiplier = reader.double();
30727
+ break;
30728
+ case 6:
30729
+ message.protocolVersion = reader.uint32();
30730
+ break;
30731
+ case 7:
30732
+ message.totalBlocksInEpoch = reader.uint64();
30733
+ break;
30734
+ case 8:
30735
+ message.nextEpochStartCoreBlockHeight = reader.uint32();
30736
+ break;
30737
+ case 9:
30738
+ message.totalProcessingFees = reader.uint64();
30739
+ break;
30740
+ case 10:
30741
+ message.totalDistributedStorageFees = reader.uint64();
30742
+ break;
30743
+ case 11:
30744
+ message.totalCreatedStorageFees = reader.uint64();
30745
+ break;
30746
+ case 12:
30747
+ message.coreBlockRewards = reader.uint64();
30748
+ break;
30749
+ case 13:
30750
+ if (!(message.blockProposers && message.blockProposers.length))
30751
+ message.blockProposers = [];
30752
+ message.blockProposers.push($root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.decode(reader, reader.uint32()));
30753
+ break;
30754
+ default:
30755
+ reader.skipType(tag & 7);
30756
+ break;
30757
+ }
30758
+ }
30759
+ return message;
30760
+ };
30761
+
30762
+ /**
30763
+ * Decodes a FinalizedEpochInfo message from the specified reader or buffer, length delimited.
30764
+ * @function decodeDelimited
30765
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30766
+ * @static
30767
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30768
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} FinalizedEpochInfo
30769
+ * @throws {Error} If the payload is not a reader or valid buffer
30770
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30771
+ */
30772
+ FinalizedEpochInfo.decodeDelimited = function decodeDelimited(reader) {
30773
+ if (!(reader instanceof $Reader))
30774
+ reader = new $Reader(reader);
30775
+ return this.decode(reader, reader.uint32());
30776
+ };
30777
+
30778
+ /**
30779
+ * Verifies a FinalizedEpochInfo message.
30780
+ * @function verify
30781
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30782
+ * @static
30783
+ * @param {Object.<string,*>} message Plain object to verify
30784
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
30785
+ */
30786
+ FinalizedEpochInfo.verify = function verify(message) {
30787
+ if (typeof message !== "object" || message === null)
30788
+ return "object expected";
30789
+ if (message.number != null && message.hasOwnProperty("number"))
30790
+ if (!$util.isInteger(message.number))
30791
+ return "number: integer expected";
30792
+ if (message.firstBlockHeight != null && message.hasOwnProperty("firstBlockHeight"))
30793
+ if (!$util.isInteger(message.firstBlockHeight) && !(message.firstBlockHeight && $util.isInteger(message.firstBlockHeight.low) && $util.isInteger(message.firstBlockHeight.high)))
30794
+ return "firstBlockHeight: integer|Long expected";
30795
+ if (message.firstCoreBlockHeight != null && message.hasOwnProperty("firstCoreBlockHeight"))
30796
+ if (!$util.isInteger(message.firstCoreBlockHeight))
30797
+ return "firstCoreBlockHeight: integer expected";
30798
+ if (message.firstBlockTime != null && message.hasOwnProperty("firstBlockTime"))
30799
+ if (!$util.isInteger(message.firstBlockTime) && !(message.firstBlockTime && $util.isInteger(message.firstBlockTime.low) && $util.isInteger(message.firstBlockTime.high)))
30800
+ return "firstBlockTime: integer|Long expected";
30801
+ if (message.feeMultiplier != null && message.hasOwnProperty("feeMultiplier"))
30802
+ if (typeof message.feeMultiplier !== "number")
30803
+ return "feeMultiplier: number expected";
30804
+ if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion"))
30805
+ if (!$util.isInteger(message.protocolVersion))
30806
+ return "protocolVersion: integer expected";
30807
+ if (message.totalBlocksInEpoch != null && message.hasOwnProperty("totalBlocksInEpoch"))
30808
+ if (!$util.isInteger(message.totalBlocksInEpoch) && !(message.totalBlocksInEpoch && $util.isInteger(message.totalBlocksInEpoch.low) && $util.isInteger(message.totalBlocksInEpoch.high)))
30809
+ return "totalBlocksInEpoch: integer|Long expected";
30810
+ if (message.nextEpochStartCoreBlockHeight != null && message.hasOwnProperty("nextEpochStartCoreBlockHeight"))
30811
+ if (!$util.isInteger(message.nextEpochStartCoreBlockHeight))
30812
+ return "nextEpochStartCoreBlockHeight: integer expected";
30813
+ if (message.totalProcessingFees != null && message.hasOwnProperty("totalProcessingFees"))
30814
+ if (!$util.isInteger(message.totalProcessingFees) && !(message.totalProcessingFees && $util.isInteger(message.totalProcessingFees.low) && $util.isInteger(message.totalProcessingFees.high)))
30815
+ return "totalProcessingFees: integer|Long expected";
30816
+ if (message.totalDistributedStorageFees != null && message.hasOwnProperty("totalDistributedStorageFees"))
30817
+ if (!$util.isInteger(message.totalDistributedStorageFees) && !(message.totalDistributedStorageFees && $util.isInteger(message.totalDistributedStorageFees.low) && $util.isInteger(message.totalDistributedStorageFees.high)))
30818
+ return "totalDistributedStorageFees: integer|Long expected";
30819
+ if (message.totalCreatedStorageFees != null && message.hasOwnProperty("totalCreatedStorageFees"))
30820
+ if (!$util.isInteger(message.totalCreatedStorageFees) && !(message.totalCreatedStorageFees && $util.isInteger(message.totalCreatedStorageFees.low) && $util.isInteger(message.totalCreatedStorageFees.high)))
30821
+ return "totalCreatedStorageFees: integer|Long expected";
30822
+ if (message.coreBlockRewards != null && message.hasOwnProperty("coreBlockRewards"))
30823
+ if (!$util.isInteger(message.coreBlockRewards) && !(message.coreBlockRewards && $util.isInteger(message.coreBlockRewards.low) && $util.isInteger(message.coreBlockRewards.high)))
30824
+ return "coreBlockRewards: integer|Long expected";
30825
+ if (message.blockProposers != null && message.hasOwnProperty("blockProposers")) {
30826
+ if (!Array.isArray(message.blockProposers))
30827
+ return "blockProposers: array expected";
30828
+ for (var i = 0; i < message.blockProposers.length; ++i) {
30829
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.verify(message.blockProposers[i]);
30830
+ if (error)
30831
+ return "blockProposers." + error;
30832
+ }
30833
+ }
30834
+ return null;
30835
+ };
30836
+
30837
+ /**
30838
+ * Creates a FinalizedEpochInfo message from a plain object. Also converts values to their respective internal types.
30839
+ * @function fromObject
30840
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30841
+ * @static
30842
+ * @param {Object.<string,*>} object Plain object
30843
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} FinalizedEpochInfo
30844
+ */
30845
+ FinalizedEpochInfo.fromObject = function fromObject(object) {
30846
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo)
30847
+ return object;
30848
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo();
30849
+ if (object.number != null)
30850
+ message.number = object.number >>> 0;
30851
+ if (object.firstBlockHeight != null)
30852
+ if ($util.Long)
30853
+ (message.firstBlockHeight = $util.Long.fromValue(object.firstBlockHeight)).unsigned = true;
30854
+ else if (typeof object.firstBlockHeight === "string")
30855
+ message.firstBlockHeight = parseInt(object.firstBlockHeight, 10);
30856
+ else if (typeof object.firstBlockHeight === "number")
30857
+ message.firstBlockHeight = object.firstBlockHeight;
30858
+ else if (typeof object.firstBlockHeight === "object")
30859
+ message.firstBlockHeight = new $util.LongBits(object.firstBlockHeight.low >>> 0, object.firstBlockHeight.high >>> 0).toNumber(true);
30860
+ if (object.firstCoreBlockHeight != null)
30861
+ message.firstCoreBlockHeight = object.firstCoreBlockHeight >>> 0;
30862
+ if (object.firstBlockTime != null)
30863
+ if ($util.Long)
30864
+ (message.firstBlockTime = $util.Long.fromValue(object.firstBlockTime)).unsigned = true;
30865
+ else if (typeof object.firstBlockTime === "string")
30866
+ message.firstBlockTime = parseInt(object.firstBlockTime, 10);
30867
+ else if (typeof object.firstBlockTime === "number")
30868
+ message.firstBlockTime = object.firstBlockTime;
30869
+ else if (typeof object.firstBlockTime === "object")
30870
+ message.firstBlockTime = new $util.LongBits(object.firstBlockTime.low >>> 0, object.firstBlockTime.high >>> 0).toNumber(true);
30871
+ if (object.feeMultiplier != null)
30872
+ message.feeMultiplier = Number(object.feeMultiplier);
30873
+ if (object.protocolVersion != null)
30874
+ message.protocolVersion = object.protocolVersion >>> 0;
30875
+ if (object.totalBlocksInEpoch != null)
30876
+ if ($util.Long)
30877
+ (message.totalBlocksInEpoch = $util.Long.fromValue(object.totalBlocksInEpoch)).unsigned = true;
30878
+ else if (typeof object.totalBlocksInEpoch === "string")
30879
+ message.totalBlocksInEpoch = parseInt(object.totalBlocksInEpoch, 10);
30880
+ else if (typeof object.totalBlocksInEpoch === "number")
30881
+ message.totalBlocksInEpoch = object.totalBlocksInEpoch;
30882
+ else if (typeof object.totalBlocksInEpoch === "object")
30883
+ message.totalBlocksInEpoch = new $util.LongBits(object.totalBlocksInEpoch.low >>> 0, object.totalBlocksInEpoch.high >>> 0).toNumber(true);
30884
+ if (object.nextEpochStartCoreBlockHeight != null)
30885
+ message.nextEpochStartCoreBlockHeight = object.nextEpochStartCoreBlockHeight >>> 0;
30886
+ if (object.totalProcessingFees != null)
30887
+ if ($util.Long)
30888
+ (message.totalProcessingFees = $util.Long.fromValue(object.totalProcessingFees)).unsigned = true;
30889
+ else if (typeof object.totalProcessingFees === "string")
30890
+ message.totalProcessingFees = parseInt(object.totalProcessingFees, 10);
30891
+ else if (typeof object.totalProcessingFees === "number")
30892
+ message.totalProcessingFees = object.totalProcessingFees;
30893
+ else if (typeof object.totalProcessingFees === "object")
30894
+ message.totalProcessingFees = new $util.LongBits(object.totalProcessingFees.low >>> 0, object.totalProcessingFees.high >>> 0).toNumber(true);
30895
+ if (object.totalDistributedStorageFees != null)
30896
+ if ($util.Long)
30897
+ (message.totalDistributedStorageFees = $util.Long.fromValue(object.totalDistributedStorageFees)).unsigned = true;
30898
+ else if (typeof object.totalDistributedStorageFees === "string")
30899
+ message.totalDistributedStorageFees = parseInt(object.totalDistributedStorageFees, 10);
30900
+ else if (typeof object.totalDistributedStorageFees === "number")
30901
+ message.totalDistributedStorageFees = object.totalDistributedStorageFees;
30902
+ else if (typeof object.totalDistributedStorageFees === "object")
30903
+ message.totalDistributedStorageFees = new $util.LongBits(object.totalDistributedStorageFees.low >>> 0, object.totalDistributedStorageFees.high >>> 0).toNumber(true);
30904
+ if (object.totalCreatedStorageFees != null)
30905
+ if ($util.Long)
30906
+ (message.totalCreatedStorageFees = $util.Long.fromValue(object.totalCreatedStorageFees)).unsigned = true;
30907
+ else if (typeof object.totalCreatedStorageFees === "string")
30908
+ message.totalCreatedStorageFees = parseInt(object.totalCreatedStorageFees, 10);
30909
+ else if (typeof object.totalCreatedStorageFees === "number")
30910
+ message.totalCreatedStorageFees = object.totalCreatedStorageFees;
30911
+ else if (typeof object.totalCreatedStorageFees === "object")
30912
+ message.totalCreatedStorageFees = new $util.LongBits(object.totalCreatedStorageFees.low >>> 0, object.totalCreatedStorageFees.high >>> 0).toNumber(true);
30913
+ if (object.coreBlockRewards != null)
30914
+ if ($util.Long)
30915
+ (message.coreBlockRewards = $util.Long.fromValue(object.coreBlockRewards)).unsigned = true;
30916
+ else if (typeof object.coreBlockRewards === "string")
30917
+ message.coreBlockRewards = parseInt(object.coreBlockRewards, 10);
30918
+ else if (typeof object.coreBlockRewards === "number")
30919
+ message.coreBlockRewards = object.coreBlockRewards;
30920
+ else if (typeof object.coreBlockRewards === "object")
30921
+ message.coreBlockRewards = new $util.LongBits(object.coreBlockRewards.low >>> 0, object.coreBlockRewards.high >>> 0).toNumber(true);
30922
+ if (object.blockProposers) {
30923
+ if (!Array.isArray(object.blockProposers))
30924
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.blockProposers: array expected");
30925
+ message.blockProposers = [];
30926
+ for (var i = 0; i < object.blockProposers.length; ++i) {
30927
+ if (typeof object.blockProposers[i] !== "object")
30928
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.blockProposers: object expected");
30929
+ message.blockProposers[i] = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.fromObject(object.blockProposers[i]);
30930
+ }
30931
+ }
30932
+ return message;
30933
+ };
30934
+
30935
+ /**
30936
+ * Creates a plain object from a FinalizedEpochInfo message. Also converts values to other types if specified.
30937
+ * @function toObject
30938
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30939
+ * @static
30940
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} message FinalizedEpochInfo
30941
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
30942
+ * @returns {Object.<string,*>} Plain object
30943
+ */
30944
+ FinalizedEpochInfo.toObject = function toObject(message, options) {
30945
+ if (!options)
30946
+ options = {};
30947
+ var object = {};
30948
+ if (options.arrays || options.defaults)
30949
+ object.blockProposers = [];
30950
+ if (options.defaults) {
30951
+ object.number = 0;
30952
+ if ($util.Long) {
30953
+ var long = new $util.Long(0, 0, true);
30954
+ object.firstBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30955
+ } else
30956
+ object.firstBlockHeight = options.longs === String ? "0" : 0;
30957
+ object.firstCoreBlockHeight = 0;
30958
+ if ($util.Long) {
30959
+ var long = new $util.Long(0, 0, true);
30960
+ object.firstBlockTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30961
+ } else
30962
+ object.firstBlockTime = options.longs === String ? "0" : 0;
30963
+ object.feeMultiplier = 0;
30964
+ object.protocolVersion = 0;
30965
+ if ($util.Long) {
30966
+ var long = new $util.Long(0, 0, true);
30967
+ object.totalBlocksInEpoch = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30968
+ } else
30969
+ object.totalBlocksInEpoch = options.longs === String ? "0" : 0;
30970
+ object.nextEpochStartCoreBlockHeight = 0;
30971
+ if ($util.Long) {
30972
+ var long = new $util.Long(0, 0, true);
30973
+ object.totalProcessingFees = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30974
+ } else
30975
+ object.totalProcessingFees = options.longs === String ? "0" : 0;
30976
+ if ($util.Long) {
30977
+ var long = new $util.Long(0, 0, true);
30978
+ object.totalDistributedStorageFees = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30979
+ } else
30980
+ object.totalDistributedStorageFees = options.longs === String ? "0" : 0;
30981
+ if ($util.Long) {
30982
+ var long = new $util.Long(0, 0, true);
30983
+ object.totalCreatedStorageFees = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30984
+ } else
30985
+ object.totalCreatedStorageFees = options.longs === String ? "0" : 0;
30986
+ if ($util.Long) {
30987
+ var long = new $util.Long(0, 0, true);
30988
+ object.coreBlockRewards = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30989
+ } else
30990
+ object.coreBlockRewards = options.longs === String ? "0" : 0;
30991
+ }
30992
+ if (message.number != null && message.hasOwnProperty("number"))
30993
+ object.number = message.number;
30994
+ if (message.firstBlockHeight != null && message.hasOwnProperty("firstBlockHeight"))
30995
+ if (typeof message.firstBlockHeight === "number")
30996
+ object.firstBlockHeight = options.longs === String ? String(message.firstBlockHeight) : message.firstBlockHeight;
30997
+ else
30998
+ object.firstBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.firstBlockHeight) : options.longs === Number ? new $util.LongBits(message.firstBlockHeight.low >>> 0, message.firstBlockHeight.high >>> 0).toNumber(true) : message.firstBlockHeight;
30999
+ if (message.firstCoreBlockHeight != null && message.hasOwnProperty("firstCoreBlockHeight"))
31000
+ object.firstCoreBlockHeight = message.firstCoreBlockHeight;
31001
+ if (message.firstBlockTime != null && message.hasOwnProperty("firstBlockTime"))
31002
+ if (typeof message.firstBlockTime === "number")
31003
+ object.firstBlockTime = options.longs === String ? String(message.firstBlockTime) : message.firstBlockTime;
31004
+ else
31005
+ object.firstBlockTime = options.longs === String ? $util.Long.prototype.toString.call(message.firstBlockTime) : options.longs === Number ? new $util.LongBits(message.firstBlockTime.low >>> 0, message.firstBlockTime.high >>> 0).toNumber(true) : message.firstBlockTime;
31006
+ if (message.feeMultiplier != null && message.hasOwnProperty("feeMultiplier"))
31007
+ object.feeMultiplier = options.json && !isFinite(message.feeMultiplier) ? String(message.feeMultiplier) : message.feeMultiplier;
31008
+ if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion"))
31009
+ object.protocolVersion = message.protocolVersion;
31010
+ if (message.totalBlocksInEpoch != null && message.hasOwnProperty("totalBlocksInEpoch"))
31011
+ if (typeof message.totalBlocksInEpoch === "number")
31012
+ object.totalBlocksInEpoch = options.longs === String ? String(message.totalBlocksInEpoch) : message.totalBlocksInEpoch;
31013
+ else
31014
+ object.totalBlocksInEpoch = options.longs === String ? $util.Long.prototype.toString.call(message.totalBlocksInEpoch) : options.longs === Number ? new $util.LongBits(message.totalBlocksInEpoch.low >>> 0, message.totalBlocksInEpoch.high >>> 0).toNumber(true) : message.totalBlocksInEpoch;
31015
+ if (message.nextEpochStartCoreBlockHeight != null && message.hasOwnProperty("nextEpochStartCoreBlockHeight"))
31016
+ object.nextEpochStartCoreBlockHeight = message.nextEpochStartCoreBlockHeight;
31017
+ if (message.totalProcessingFees != null && message.hasOwnProperty("totalProcessingFees"))
31018
+ if (typeof message.totalProcessingFees === "number")
31019
+ object.totalProcessingFees = options.longs === String ? String(message.totalProcessingFees) : message.totalProcessingFees;
31020
+ else
31021
+ object.totalProcessingFees = options.longs === String ? $util.Long.prototype.toString.call(message.totalProcessingFees) : options.longs === Number ? new $util.LongBits(message.totalProcessingFees.low >>> 0, message.totalProcessingFees.high >>> 0).toNumber(true) : message.totalProcessingFees;
31022
+ if (message.totalDistributedStorageFees != null && message.hasOwnProperty("totalDistributedStorageFees"))
31023
+ if (typeof message.totalDistributedStorageFees === "number")
31024
+ object.totalDistributedStorageFees = options.longs === String ? String(message.totalDistributedStorageFees) : message.totalDistributedStorageFees;
31025
+ else
31026
+ object.totalDistributedStorageFees = options.longs === String ? $util.Long.prototype.toString.call(message.totalDistributedStorageFees) : options.longs === Number ? new $util.LongBits(message.totalDistributedStorageFees.low >>> 0, message.totalDistributedStorageFees.high >>> 0).toNumber(true) : message.totalDistributedStorageFees;
31027
+ if (message.totalCreatedStorageFees != null && message.hasOwnProperty("totalCreatedStorageFees"))
31028
+ if (typeof message.totalCreatedStorageFees === "number")
31029
+ object.totalCreatedStorageFees = options.longs === String ? String(message.totalCreatedStorageFees) : message.totalCreatedStorageFees;
31030
+ else
31031
+ object.totalCreatedStorageFees = options.longs === String ? $util.Long.prototype.toString.call(message.totalCreatedStorageFees) : options.longs === Number ? new $util.LongBits(message.totalCreatedStorageFees.low >>> 0, message.totalCreatedStorageFees.high >>> 0).toNumber(true) : message.totalCreatedStorageFees;
31032
+ if (message.coreBlockRewards != null && message.hasOwnProperty("coreBlockRewards"))
31033
+ if (typeof message.coreBlockRewards === "number")
31034
+ object.coreBlockRewards = options.longs === String ? String(message.coreBlockRewards) : message.coreBlockRewards;
31035
+ else
31036
+ object.coreBlockRewards = options.longs === String ? $util.Long.prototype.toString.call(message.coreBlockRewards) : options.longs === Number ? new $util.LongBits(message.coreBlockRewards.low >>> 0, message.coreBlockRewards.high >>> 0).toNumber(true) : message.coreBlockRewards;
31037
+ if (message.blockProposers && message.blockProposers.length) {
31038
+ object.blockProposers = [];
31039
+ for (var j = 0; j < message.blockProposers.length; ++j)
31040
+ object.blockProposers[j] = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.toObject(message.blockProposers[j], options);
31041
+ }
31042
+ return object;
31043
+ };
31044
+
31045
+ /**
31046
+ * Converts this FinalizedEpochInfo to JSON.
31047
+ * @function toJSON
31048
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
31049
+ * @instance
31050
+ * @returns {Object.<string,*>} JSON object
31051
+ */
31052
+ FinalizedEpochInfo.prototype.toJSON = function toJSON() {
31053
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
31054
+ };
31055
+
31056
+ return FinalizedEpochInfo;
31057
+ })();
31058
+
31059
+ GetFinalizedEpochInfosResponseV0.BlockProposer = (function() {
31060
+
31061
+ /**
31062
+ * Properties of a BlockProposer.
31063
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
31064
+ * @interface IBlockProposer
31065
+ * @property {Uint8Array|null} [proposerId] BlockProposer proposerId
31066
+ * @property {number|null} [blockCount] BlockProposer blockCount
31067
+ */
31068
+
31069
+ /**
31070
+ * Constructs a new BlockProposer.
31071
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
31072
+ * @classdesc Represents a BlockProposer.
31073
+ * @implements IBlockProposer
31074
+ * @constructor
31075
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer=} [properties] Properties to set
31076
+ */
31077
+ function BlockProposer(properties) {
31078
+ if (properties)
31079
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
31080
+ if (properties[keys[i]] != null)
31081
+ this[keys[i]] = properties[keys[i]];
31082
+ }
31083
+
31084
+ /**
31085
+ * BlockProposer proposerId.
31086
+ * @member {Uint8Array} proposerId
31087
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31088
+ * @instance
31089
+ */
31090
+ BlockProposer.prototype.proposerId = $util.newBuffer([]);
31091
+
31092
+ /**
31093
+ * BlockProposer blockCount.
31094
+ * @member {number} blockCount
31095
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31096
+ * @instance
31097
+ */
31098
+ BlockProposer.prototype.blockCount = 0;
31099
+
31100
+ /**
31101
+ * Creates a new BlockProposer instance using the specified properties.
31102
+ * @function create
31103
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31104
+ * @static
31105
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer=} [properties] Properties to set
31106
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} BlockProposer instance
31107
+ */
31108
+ BlockProposer.create = function create(properties) {
31109
+ return new BlockProposer(properties);
31110
+ };
31111
+
31112
+ /**
31113
+ * Encodes the specified BlockProposer message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.verify|verify} messages.
31114
+ * @function encode
31115
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31116
+ * @static
31117
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer} message BlockProposer message or plain object to encode
31118
+ * @param {$protobuf.Writer} [writer] Writer to encode to
31119
+ * @returns {$protobuf.Writer} Writer
31120
+ */
31121
+ BlockProposer.encode = function encode(message, writer) {
31122
+ if (!writer)
31123
+ writer = $Writer.create();
31124
+ if (message.proposerId != null && Object.hasOwnProperty.call(message, "proposerId"))
31125
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.proposerId);
31126
+ if (message.blockCount != null && Object.hasOwnProperty.call(message, "blockCount"))
31127
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.blockCount);
31128
+ return writer;
31129
+ };
31130
+
31131
+ /**
31132
+ * Encodes the specified BlockProposer message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.verify|verify} messages.
31133
+ * @function encodeDelimited
31134
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31135
+ * @static
31136
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer} message BlockProposer message or plain object to encode
31137
+ * @param {$protobuf.Writer} [writer] Writer to encode to
31138
+ * @returns {$protobuf.Writer} Writer
31139
+ */
31140
+ BlockProposer.encodeDelimited = function encodeDelimited(message, writer) {
31141
+ return this.encode(message, writer).ldelim();
31142
+ };
31143
+
31144
+ /**
31145
+ * Decodes a BlockProposer message from the specified reader or buffer.
31146
+ * @function decode
31147
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31148
+ * @static
31149
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
31150
+ * @param {number} [length] Message length if known beforehand
31151
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} BlockProposer
31152
+ * @throws {Error} If the payload is not a reader or valid buffer
31153
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
31154
+ */
31155
+ BlockProposer.decode = function decode(reader, length) {
31156
+ if (!(reader instanceof $Reader))
31157
+ reader = $Reader.create(reader);
31158
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer();
31159
+ while (reader.pos < end) {
31160
+ var tag = reader.uint32();
31161
+ switch (tag >>> 3) {
31162
+ case 1:
31163
+ message.proposerId = reader.bytes();
31164
+ break;
31165
+ case 2:
31166
+ message.blockCount = reader.uint32();
31167
+ break;
31168
+ default:
31169
+ reader.skipType(tag & 7);
31170
+ break;
31171
+ }
31172
+ }
31173
+ return message;
31174
+ };
31175
+
31176
+ /**
31177
+ * Decodes a BlockProposer message from the specified reader or buffer, length delimited.
31178
+ * @function decodeDelimited
31179
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31180
+ * @static
31181
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
31182
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} BlockProposer
31183
+ * @throws {Error} If the payload is not a reader or valid buffer
31184
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
31185
+ */
31186
+ BlockProposer.decodeDelimited = function decodeDelimited(reader) {
31187
+ if (!(reader instanceof $Reader))
31188
+ reader = new $Reader(reader);
31189
+ return this.decode(reader, reader.uint32());
31190
+ };
31191
+
31192
+ /**
31193
+ * Verifies a BlockProposer message.
31194
+ * @function verify
31195
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31196
+ * @static
31197
+ * @param {Object.<string,*>} message Plain object to verify
31198
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
31199
+ */
31200
+ BlockProposer.verify = function verify(message) {
31201
+ if (typeof message !== "object" || message === null)
31202
+ return "object expected";
31203
+ if (message.proposerId != null && message.hasOwnProperty("proposerId"))
31204
+ if (!(message.proposerId && typeof message.proposerId.length === "number" || $util.isString(message.proposerId)))
31205
+ return "proposerId: buffer expected";
31206
+ if (message.blockCount != null && message.hasOwnProperty("blockCount"))
31207
+ if (!$util.isInteger(message.blockCount))
31208
+ return "blockCount: integer expected";
31209
+ return null;
31210
+ };
31211
+
31212
+ /**
31213
+ * Creates a BlockProposer message from a plain object. Also converts values to their respective internal types.
31214
+ * @function fromObject
31215
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31216
+ * @static
31217
+ * @param {Object.<string,*>} object Plain object
31218
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} BlockProposer
31219
+ */
31220
+ BlockProposer.fromObject = function fromObject(object) {
31221
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer)
31222
+ return object;
31223
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer();
31224
+ if (object.proposerId != null)
31225
+ if (typeof object.proposerId === "string")
31226
+ $util.base64.decode(object.proposerId, message.proposerId = $util.newBuffer($util.base64.length(object.proposerId)), 0);
31227
+ else if (object.proposerId.length >= 0)
31228
+ message.proposerId = object.proposerId;
31229
+ if (object.blockCount != null)
31230
+ message.blockCount = object.blockCount >>> 0;
31231
+ return message;
31232
+ };
31233
+
31234
+ /**
31235
+ * Creates a plain object from a BlockProposer message. Also converts values to other types if specified.
31236
+ * @function toObject
31237
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31238
+ * @static
31239
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} message BlockProposer
31240
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
31241
+ * @returns {Object.<string,*>} Plain object
31242
+ */
31243
+ BlockProposer.toObject = function toObject(message, options) {
31244
+ if (!options)
31245
+ options = {};
31246
+ var object = {};
31247
+ if (options.defaults) {
31248
+ if (options.bytes === String)
31249
+ object.proposerId = "";
31250
+ else {
31251
+ object.proposerId = [];
31252
+ if (options.bytes !== Array)
31253
+ object.proposerId = $util.newBuffer(object.proposerId);
31254
+ }
31255
+ object.blockCount = 0;
31256
+ }
31257
+ if (message.proposerId != null && message.hasOwnProperty("proposerId"))
31258
+ object.proposerId = options.bytes === String ? $util.base64.encode(message.proposerId, 0, message.proposerId.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposerId) : message.proposerId;
31259
+ if (message.blockCount != null && message.hasOwnProperty("blockCount"))
31260
+ object.blockCount = message.blockCount;
31261
+ return object;
31262
+ };
31263
+
31264
+ /**
31265
+ * Converts this BlockProposer to JSON.
31266
+ * @function toJSON
31267
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
31268
+ * @instance
31269
+ * @returns {Object.<string,*>} JSON object
31270
+ */
31271
+ BlockProposer.prototype.toJSON = function toJSON() {
31272
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
31273
+ };
31274
+
31275
+ return BlockProposer;
31276
+ })();
31277
+
31278
+ return GetFinalizedEpochInfosResponseV0;
31279
+ })();
31280
+
31281
+ return GetFinalizedEpochInfosResponse;
31282
+ })();
31283
+
29281
31284
  v0.GetContestedResourcesRequest = (function() {
29282
31285
 
29283
31286
  /**