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

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.
@@ -812,6 +812,39 @@ $root.org = (function() {
812
812
  * @variation 2
813
813
  */
814
814
 
815
+ /**
816
+ * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getFinalizedEpochInfos}.
817
+ * @memberof org.dash.platform.dapi.v0.Platform
818
+ * @typedef getFinalizedEpochInfosCallback
819
+ * @type {function}
820
+ * @param {Error|null} error Error, if any
821
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} [response] GetFinalizedEpochInfosResponse
822
+ */
823
+
824
+ /**
825
+ * Calls getFinalizedEpochInfos.
826
+ * @function getFinalizedEpochInfos
827
+ * @memberof org.dash.platform.dapi.v0.Platform
828
+ * @instance
829
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest} request GetFinalizedEpochInfosRequest message or plain object
830
+ * @param {org.dash.platform.dapi.v0.Platform.getFinalizedEpochInfosCallback} callback Node-style callback called with the error, if any, and GetFinalizedEpochInfosResponse
831
+ * @returns {undefined}
832
+ * @variation 1
833
+ */
834
+ Object.defineProperty(Platform.prototype.getFinalizedEpochInfos = function getFinalizedEpochInfos(request, callback) {
835
+ return this.rpcCall(getFinalizedEpochInfos, $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest, $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse, request, callback);
836
+ }, "name", { value: "getFinalizedEpochInfos" });
837
+
838
+ /**
839
+ * Calls getFinalizedEpochInfos.
840
+ * @function getFinalizedEpochInfos
841
+ * @memberof org.dash.platform.dapi.v0.Platform
842
+ * @instance
843
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest} request GetFinalizedEpochInfosRequest message or plain object
844
+ * @returns {Promise<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse>} Promise
845
+ * @variation 2
846
+ */
847
+
815
848
  /**
816
849
  * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getContestedResources}.
817
850
  * @memberof org.dash.platform.dapi.v0.Platform
@@ -28770,6 +28803,1976 @@ $root.org = (function() {
28770
28803
  return GetEpochsInfoResponse;
28771
28804
  })();
28772
28805
 
28806
+ v0.GetFinalizedEpochInfosRequest = (function() {
28807
+
28808
+ /**
28809
+ * Properties of a GetFinalizedEpochInfosRequest.
28810
+ * @memberof org.dash.platform.dapi.v0
28811
+ * @interface IGetFinalizedEpochInfosRequest
28812
+ * @property {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0|null} [v0] GetFinalizedEpochInfosRequest v0
28813
+ */
28814
+
28815
+ /**
28816
+ * Constructs a new GetFinalizedEpochInfosRequest.
28817
+ * @memberof org.dash.platform.dapi.v0
28818
+ * @classdesc Represents a GetFinalizedEpochInfosRequest.
28819
+ * @implements IGetFinalizedEpochInfosRequest
28820
+ * @constructor
28821
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest=} [properties] Properties to set
28822
+ */
28823
+ function GetFinalizedEpochInfosRequest(properties) {
28824
+ if (properties)
28825
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
28826
+ if (properties[keys[i]] != null)
28827
+ this[keys[i]] = properties[keys[i]];
28828
+ }
28829
+
28830
+ /**
28831
+ * GetFinalizedEpochInfosRequest v0.
28832
+ * @member {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0|null|undefined} v0
28833
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28834
+ * @instance
28835
+ */
28836
+ GetFinalizedEpochInfosRequest.prototype.v0 = null;
28837
+
28838
+ // OneOf field names bound to virtual getters and setters
28839
+ var $oneOfFields;
28840
+
28841
+ /**
28842
+ * GetFinalizedEpochInfosRequest version.
28843
+ * @member {"v0"|undefined} version
28844
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28845
+ * @instance
28846
+ */
28847
+ Object.defineProperty(GetFinalizedEpochInfosRequest.prototype, "version", {
28848
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
28849
+ set: $util.oneOfSetter($oneOfFields)
28850
+ });
28851
+
28852
+ /**
28853
+ * Creates a new GetFinalizedEpochInfosRequest instance using the specified properties.
28854
+ * @function create
28855
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28856
+ * @static
28857
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest=} [properties] Properties to set
28858
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} GetFinalizedEpochInfosRequest instance
28859
+ */
28860
+ GetFinalizedEpochInfosRequest.create = function create(properties) {
28861
+ return new GetFinalizedEpochInfosRequest(properties);
28862
+ };
28863
+
28864
+ /**
28865
+ * Encodes the specified GetFinalizedEpochInfosRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.verify|verify} messages.
28866
+ * @function encode
28867
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28868
+ * @static
28869
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest} message GetFinalizedEpochInfosRequest message or plain object to encode
28870
+ * @param {$protobuf.Writer} [writer] Writer to encode to
28871
+ * @returns {$protobuf.Writer} Writer
28872
+ */
28873
+ GetFinalizedEpochInfosRequest.encode = function encode(message, writer) {
28874
+ if (!writer)
28875
+ writer = $Writer.create();
28876
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
28877
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
28878
+ return writer;
28879
+ };
28880
+
28881
+ /**
28882
+ * Encodes the specified GetFinalizedEpochInfosRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.verify|verify} messages.
28883
+ * @function encodeDelimited
28884
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28885
+ * @static
28886
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosRequest} message GetFinalizedEpochInfosRequest message or plain object to encode
28887
+ * @param {$protobuf.Writer} [writer] Writer to encode to
28888
+ * @returns {$protobuf.Writer} Writer
28889
+ */
28890
+ GetFinalizedEpochInfosRequest.encodeDelimited = function encodeDelimited(message, writer) {
28891
+ return this.encode(message, writer).ldelim();
28892
+ };
28893
+
28894
+ /**
28895
+ * Decodes a GetFinalizedEpochInfosRequest message from the specified reader or buffer.
28896
+ * @function decode
28897
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28898
+ * @static
28899
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
28900
+ * @param {number} [length] Message length if known beforehand
28901
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} GetFinalizedEpochInfosRequest
28902
+ * @throws {Error} If the payload is not a reader or valid buffer
28903
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
28904
+ */
28905
+ GetFinalizedEpochInfosRequest.decode = function decode(reader, length) {
28906
+ if (!(reader instanceof $Reader))
28907
+ reader = $Reader.create(reader);
28908
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest();
28909
+ while (reader.pos < end) {
28910
+ var tag = reader.uint32();
28911
+ switch (tag >>> 3) {
28912
+ case 1:
28913
+ message.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.decode(reader, reader.uint32());
28914
+ break;
28915
+ default:
28916
+ reader.skipType(tag & 7);
28917
+ break;
28918
+ }
28919
+ }
28920
+ return message;
28921
+ };
28922
+
28923
+ /**
28924
+ * Decodes a GetFinalizedEpochInfosRequest message from the specified reader or buffer, length delimited.
28925
+ * @function decodeDelimited
28926
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28927
+ * @static
28928
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
28929
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} GetFinalizedEpochInfosRequest
28930
+ * @throws {Error} If the payload is not a reader or valid buffer
28931
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
28932
+ */
28933
+ GetFinalizedEpochInfosRequest.decodeDelimited = function decodeDelimited(reader) {
28934
+ if (!(reader instanceof $Reader))
28935
+ reader = new $Reader(reader);
28936
+ return this.decode(reader, reader.uint32());
28937
+ };
28938
+
28939
+ /**
28940
+ * Verifies a GetFinalizedEpochInfosRequest message.
28941
+ * @function verify
28942
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28943
+ * @static
28944
+ * @param {Object.<string,*>} message Plain object to verify
28945
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
28946
+ */
28947
+ GetFinalizedEpochInfosRequest.verify = function verify(message) {
28948
+ if (typeof message !== "object" || message === null)
28949
+ return "object expected";
28950
+ var properties = {};
28951
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
28952
+ properties.version = 1;
28953
+ {
28954
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.verify(message.v0);
28955
+ if (error)
28956
+ return "v0." + error;
28957
+ }
28958
+ }
28959
+ return null;
28960
+ };
28961
+
28962
+ /**
28963
+ * Creates a GetFinalizedEpochInfosRequest message from a plain object. Also converts values to their respective internal types.
28964
+ * @function fromObject
28965
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28966
+ * @static
28967
+ * @param {Object.<string,*>} object Plain object
28968
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} GetFinalizedEpochInfosRequest
28969
+ */
28970
+ GetFinalizedEpochInfosRequest.fromObject = function fromObject(object) {
28971
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest)
28972
+ return object;
28973
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest();
28974
+ if (object.v0 != null) {
28975
+ if (typeof object.v0 !== "object")
28976
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.v0: object expected");
28977
+ message.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.fromObject(object.v0);
28978
+ }
28979
+ return message;
28980
+ };
28981
+
28982
+ /**
28983
+ * Creates a plain object from a GetFinalizedEpochInfosRequest message. Also converts values to other types if specified.
28984
+ * @function toObject
28985
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
28986
+ * @static
28987
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest} message GetFinalizedEpochInfosRequest
28988
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
28989
+ * @returns {Object.<string,*>} Plain object
28990
+ */
28991
+ GetFinalizedEpochInfosRequest.toObject = function toObject(message, options) {
28992
+ if (!options)
28993
+ options = {};
28994
+ var object = {};
28995
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
28996
+ object.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.toObject(message.v0, options);
28997
+ if (options.oneofs)
28998
+ object.version = "v0";
28999
+ }
29000
+ return object;
29001
+ };
29002
+
29003
+ /**
29004
+ * Converts this GetFinalizedEpochInfosRequest to JSON.
29005
+ * @function toJSON
29006
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29007
+ * @instance
29008
+ * @returns {Object.<string,*>} JSON object
29009
+ */
29010
+ GetFinalizedEpochInfosRequest.prototype.toJSON = function toJSON() {
29011
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29012
+ };
29013
+
29014
+ GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0 = (function() {
29015
+
29016
+ /**
29017
+ * Properties of a GetFinalizedEpochInfosRequestV0.
29018
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29019
+ * @interface IGetFinalizedEpochInfosRequestV0
29020
+ * @property {number|null} [startEpochIndex] GetFinalizedEpochInfosRequestV0 startEpochIndex
29021
+ * @property {boolean|null} [startEpochIndexIncluded] GetFinalizedEpochInfosRequestV0 startEpochIndexIncluded
29022
+ * @property {number|null} [endEpochIndex] GetFinalizedEpochInfosRequestV0 endEpochIndex
29023
+ * @property {boolean|null} [endEpochIndexIncluded] GetFinalizedEpochInfosRequestV0 endEpochIndexIncluded
29024
+ * @property {boolean|null} [prove] GetFinalizedEpochInfosRequestV0 prove
29025
+ */
29026
+
29027
+ /**
29028
+ * Constructs a new GetFinalizedEpochInfosRequestV0.
29029
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest
29030
+ * @classdesc Represents a GetFinalizedEpochInfosRequestV0.
29031
+ * @implements IGetFinalizedEpochInfosRequestV0
29032
+ * @constructor
29033
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0=} [properties] Properties to set
29034
+ */
29035
+ function GetFinalizedEpochInfosRequestV0(properties) {
29036
+ if (properties)
29037
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29038
+ if (properties[keys[i]] != null)
29039
+ this[keys[i]] = properties[keys[i]];
29040
+ }
29041
+
29042
+ /**
29043
+ * GetFinalizedEpochInfosRequestV0 startEpochIndex.
29044
+ * @member {number} startEpochIndex
29045
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29046
+ * @instance
29047
+ */
29048
+ GetFinalizedEpochInfosRequestV0.prototype.startEpochIndex = 0;
29049
+
29050
+ /**
29051
+ * GetFinalizedEpochInfosRequestV0 startEpochIndexIncluded.
29052
+ * @member {boolean} startEpochIndexIncluded
29053
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29054
+ * @instance
29055
+ */
29056
+ GetFinalizedEpochInfosRequestV0.prototype.startEpochIndexIncluded = false;
29057
+
29058
+ /**
29059
+ * GetFinalizedEpochInfosRequestV0 endEpochIndex.
29060
+ * @member {number} endEpochIndex
29061
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29062
+ * @instance
29063
+ */
29064
+ GetFinalizedEpochInfosRequestV0.prototype.endEpochIndex = 0;
29065
+
29066
+ /**
29067
+ * GetFinalizedEpochInfosRequestV0 endEpochIndexIncluded.
29068
+ * @member {boolean} endEpochIndexIncluded
29069
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29070
+ * @instance
29071
+ */
29072
+ GetFinalizedEpochInfosRequestV0.prototype.endEpochIndexIncluded = false;
29073
+
29074
+ /**
29075
+ * GetFinalizedEpochInfosRequestV0 prove.
29076
+ * @member {boolean} prove
29077
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29078
+ * @instance
29079
+ */
29080
+ GetFinalizedEpochInfosRequestV0.prototype.prove = false;
29081
+
29082
+ /**
29083
+ * Creates a new GetFinalizedEpochInfosRequestV0 instance using the specified properties.
29084
+ * @function create
29085
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29086
+ * @static
29087
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0=} [properties] Properties to set
29088
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} GetFinalizedEpochInfosRequestV0 instance
29089
+ */
29090
+ GetFinalizedEpochInfosRequestV0.create = function create(properties) {
29091
+ return new GetFinalizedEpochInfosRequestV0(properties);
29092
+ };
29093
+
29094
+ /**
29095
+ * Encodes the specified GetFinalizedEpochInfosRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.verify|verify} messages.
29096
+ * @function encode
29097
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29098
+ * @static
29099
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0} message GetFinalizedEpochInfosRequestV0 message or plain object to encode
29100
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29101
+ * @returns {$protobuf.Writer} Writer
29102
+ */
29103
+ GetFinalizedEpochInfosRequestV0.encode = function encode(message, writer) {
29104
+ if (!writer)
29105
+ writer = $Writer.create();
29106
+ if (message.startEpochIndex != null && Object.hasOwnProperty.call(message, "startEpochIndex"))
29107
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.startEpochIndex);
29108
+ if (message.startEpochIndexIncluded != null && Object.hasOwnProperty.call(message, "startEpochIndexIncluded"))
29109
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.startEpochIndexIncluded);
29110
+ if (message.endEpochIndex != null && Object.hasOwnProperty.call(message, "endEpochIndex"))
29111
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endEpochIndex);
29112
+ if (message.endEpochIndexIncluded != null && Object.hasOwnProperty.call(message, "endEpochIndexIncluded"))
29113
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.endEpochIndexIncluded);
29114
+ if (message.prove != null && Object.hasOwnProperty.call(message, "prove"))
29115
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prove);
29116
+ return writer;
29117
+ };
29118
+
29119
+ /**
29120
+ * Encodes the specified GetFinalizedEpochInfosRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0.verify|verify} messages.
29121
+ * @function encodeDelimited
29122
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29123
+ * @static
29124
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.IGetFinalizedEpochInfosRequestV0} message GetFinalizedEpochInfosRequestV0 message or plain object to encode
29125
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29126
+ * @returns {$protobuf.Writer} Writer
29127
+ */
29128
+ GetFinalizedEpochInfosRequestV0.encodeDelimited = function encodeDelimited(message, writer) {
29129
+ return this.encode(message, writer).ldelim();
29130
+ };
29131
+
29132
+ /**
29133
+ * Decodes a GetFinalizedEpochInfosRequestV0 message from the specified reader or buffer.
29134
+ * @function decode
29135
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29136
+ * @static
29137
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29138
+ * @param {number} [length] Message length if known beforehand
29139
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} GetFinalizedEpochInfosRequestV0
29140
+ * @throws {Error} If the payload is not a reader or valid buffer
29141
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29142
+ */
29143
+ GetFinalizedEpochInfosRequestV0.decode = function decode(reader, length) {
29144
+ if (!(reader instanceof $Reader))
29145
+ reader = $Reader.create(reader);
29146
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0();
29147
+ while (reader.pos < end) {
29148
+ var tag = reader.uint32();
29149
+ switch (tag >>> 3) {
29150
+ case 1:
29151
+ message.startEpochIndex = reader.uint32();
29152
+ break;
29153
+ case 2:
29154
+ message.startEpochIndexIncluded = reader.bool();
29155
+ break;
29156
+ case 3:
29157
+ message.endEpochIndex = reader.uint32();
29158
+ break;
29159
+ case 4:
29160
+ message.endEpochIndexIncluded = reader.bool();
29161
+ break;
29162
+ case 5:
29163
+ message.prove = reader.bool();
29164
+ break;
29165
+ default:
29166
+ reader.skipType(tag & 7);
29167
+ break;
29168
+ }
29169
+ }
29170
+ return message;
29171
+ };
29172
+
29173
+ /**
29174
+ * Decodes a GetFinalizedEpochInfosRequestV0 message from the specified reader or buffer, length delimited.
29175
+ * @function decodeDelimited
29176
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29177
+ * @static
29178
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29179
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} GetFinalizedEpochInfosRequestV0
29180
+ * @throws {Error} If the payload is not a reader or valid buffer
29181
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29182
+ */
29183
+ GetFinalizedEpochInfosRequestV0.decodeDelimited = function decodeDelimited(reader) {
29184
+ if (!(reader instanceof $Reader))
29185
+ reader = new $Reader(reader);
29186
+ return this.decode(reader, reader.uint32());
29187
+ };
29188
+
29189
+ /**
29190
+ * Verifies a GetFinalizedEpochInfosRequestV0 message.
29191
+ * @function verify
29192
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29193
+ * @static
29194
+ * @param {Object.<string,*>} message Plain object to verify
29195
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29196
+ */
29197
+ GetFinalizedEpochInfosRequestV0.verify = function verify(message) {
29198
+ if (typeof message !== "object" || message === null)
29199
+ return "object expected";
29200
+ if (message.startEpochIndex != null && message.hasOwnProperty("startEpochIndex"))
29201
+ if (!$util.isInteger(message.startEpochIndex))
29202
+ return "startEpochIndex: integer expected";
29203
+ if (message.startEpochIndexIncluded != null && message.hasOwnProperty("startEpochIndexIncluded"))
29204
+ if (typeof message.startEpochIndexIncluded !== "boolean")
29205
+ return "startEpochIndexIncluded: boolean expected";
29206
+ if (message.endEpochIndex != null && message.hasOwnProperty("endEpochIndex"))
29207
+ if (!$util.isInteger(message.endEpochIndex))
29208
+ return "endEpochIndex: integer expected";
29209
+ if (message.endEpochIndexIncluded != null && message.hasOwnProperty("endEpochIndexIncluded"))
29210
+ if (typeof message.endEpochIndexIncluded !== "boolean")
29211
+ return "endEpochIndexIncluded: boolean expected";
29212
+ if (message.prove != null && message.hasOwnProperty("prove"))
29213
+ if (typeof message.prove !== "boolean")
29214
+ return "prove: boolean expected";
29215
+ return null;
29216
+ };
29217
+
29218
+ /**
29219
+ * Creates a GetFinalizedEpochInfosRequestV0 message from a plain object. Also converts values to their respective internal types.
29220
+ * @function fromObject
29221
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29222
+ * @static
29223
+ * @param {Object.<string,*>} object Plain object
29224
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} GetFinalizedEpochInfosRequestV0
29225
+ */
29226
+ GetFinalizedEpochInfosRequestV0.fromObject = function fromObject(object) {
29227
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0)
29228
+ return object;
29229
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0();
29230
+ if (object.startEpochIndex != null)
29231
+ message.startEpochIndex = object.startEpochIndex >>> 0;
29232
+ if (object.startEpochIndexIncluded != null)
29233
+ message.startEpochIndexIncluded = Boolean(object.startEpochIndexIncluded);
29234
+ if (object.endEpochIndex != null)
29235
+ message.endEpochIndex = object.endEpochIndex >>> 0;
29236
+ if (object.endEpochIndexIncluded != null)
29237
+ message.endEpochIndexIncluded = Boolean(object.endEpochIndexIncluded);
29238
+ if (object.prove != null)
29239
+ message.prove = Boolean(object.prove);
29240
+ return message;
29241
+ };
29242
+
29243
+ /**
29244
+ * Creates a plain object from a GetFinalizedEpochInfosRequestV0 message. Also converts values to other types if specified.
29245
+ * @function toObject
29246
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29247
+ * @static
29248
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0} message GetFinalizedEpochInfosRequestV0
29249
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29250
+ * @returns {Object.<string,*>} Plain object
29251
+ */
29252
+ GetFinalizedEpochInfosRequestV0.toObject = function toObject(message, options) {
29253
+ if (!options)
29254
+ options = {};
29255
+ var object = {};
29256
+ if (options.defaults) {
29257
+ object.startEpochIndex = 0;
29258
+ object.startEpochIndexIncluded = false;
29259
+ object.endEpochIndex = 0;
29260
+ object.endEpochIndexIncluded = false;
29261
+ object.prove = false;
29262
+ }
29263
+ if (message.startEpochIndex != null && message.hasOwnProperty("startEpochIndex"))
29264
+ object.startEpochIndex = message.startEpochIndex;
29265
+ if (message.startEpochIndexIncluded != null && message.hasOwnProperty("startEpochIndexIncluded"))
29266
+ object.startEpochIndexIncluded = message.startEpochIndexIncluded;
29267
+ if (message.endEpochIndex != null && message.hasOwnProperty("endEpochIndex"))
29268
+ object.endEpochIndex = message.endEpochIndex;
29269
+ if (message.endEpochIndexIncluded != null && message.hasOwnProperty("endEpochIndexIncluded"))
29270
+ object.endEpochIndexIncluded = message.endEpochIndexIncluded;
29271
+ if (message.prove != null && message.hasOwnProperty("prove"))
29272
+ object.prove = message.prove;
29273
+ return object;
29274
+ };
29275
+
29276
+ /**
29277
+ * Converts this GetFinalizedEpochInfosRequestV0 to JSON.
29278
+ * @function toJSON
29279
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0
29280
+ * @instance
29281
+ * @returns {Object.<string,*>} JSON object
29282
+ */
29283
+ GetFinalizedEpochInfosRequestV0.prototype.toJSON = function toJSON() {
29284
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29285
+ };
29286
+
29287
+ return GetFinalizedEpochInfosRequestV0;
29288
+ })();
29289
+
29290
+ return GetFinalizedEpochInfosRequest;
29291
+ })();
29292
+
29293
+ v0.GetFinalizedEpochInfosResponse = (function() {
29294
+
29295
+ /**
29296
+ * Properties of a GetFinalizedEpochInfosResponse.
29297
+ * @memberof org.dash.platform.dapi.v0
29298
+ * @interface IGetFinalizedEpochInfosResponse
29299
+ * @property {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0|null} [v0] GetFinalizedEpochInfosResponse v0
29300
+ */
29301
+
29302
+ /**
29303
+ * Constructs a new GetFinalizedEpochInfosResponse.
29304
+ * @memberof org.dash.platform.dapi.v0
29305
+ * @classdesc Represents a GetFinalizedEpochInfosResponse.
29306
+ * @implements IGetFinalizedEpochInfosResponse
29307
+ * @constructor
29308
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosResponse=} [properties] Properties to set
29309
+ */
29310
+ function GetFinalizedEpochInfosResponse(properties) {
29311
+ if (properties)
29312
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29313
+ if (properties[keys[i]] != null)
29314
+ this[keys[i]] = properties[keys[i]];
29315
+ }
29316
+
29317
+ /**
29318
+ * GetFinalizedEpochInfosResponse v0.
29319
+ * @member {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0|null|undefined} v0
29320
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29321
+ * @instance
29322
+ */
29323
+ GetFinalizedEpochInfosResponse.prototype.v0 = null;
29324
+
29325
+ // OneOf field names bound to virtual getters and setters
29326
+ var $oneOfFields;
29327
+
29328
+ /**
29329
+ * GetFinalizedEpochInfosResponse version.
29330
+ * @member {"v0"|undefined} version
29331
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29332
+ * @instance
29333
+ */
29334
+ Object.defineProperty(GetFinalizedEpochInfosResponse.prototype, "version", {
29335
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
29336
+ set: $util.oneOfSetter($oneOfFields)
29337
+ });
29338
+
29339
+ /**
29340
+ * Creates a new GetFinalizedEpochInfosResponse instance using the specified properties.
29341
+ * @function create
29342
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29343
+ * @static
29344
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosResponse=} [properties] Properties to set
29345
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} GetFinalizedEpochInfosResponse instance
29346
+ */
29347
+ GetFinalizedEpochInfosResponse.create = function create(properties) {
29348
+ return new GetFinalizedEpochInfosResponse(properties);
29349
+ };
29350
+
29351
+ /**
29352
+ * Encodes the specified GetFinalizedEpochInfosResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.verify|verify} messages.
29353
+ * @function encode
29354
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29355
+ * @static
29356
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosResponse} message GetFinalizedEpochInfosResponse message or plain object to encode
29357
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29358
+ * @returns {$protobuf.Writer} Writer
29359
+ */
29360
+ GetFinalizedEpochInfosResponse.encode = function encode(message, writer) {
29361
+ if (!writer)
29362
+ writer = $Writer.create();
29363
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
29364
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
29365
+ return writer;
29366
+ };
29367
+
29368
+ /**
29369
+ * Encodes the specified GetFinalizedEpochInfosResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.verify|verify} messages.
29370
+ * @function encodeDelimited
29371
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29372
+ * @static
29373
+ * @param {org.dash.platform.dapi.v0.IGetFinalizedEpochInfosResponse} message GetFinalizedEpochInfosResponse message or plain object to encode
29374
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29375
+ * @returns {$protobuf.Writer} Writer
29376
+ */
29377
+ GetFinalizedEpochInfosResponse.encodeDelimited = function encodeDelimited(message, writer) {
29378
+ return this.encode(message, writer).ldelim();
29379
+ };
29380
+
29381
+ /**
29382
+ * Decodes a GetFinalizedEpochInfosResponse message from the specified reader or buffer.
29383
+ * @function decode
29384
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29385
+ * @static
29386
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29387
+ * @param {number} [length] Message length if known beforehand
29388
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} GetFinalizedEpochInfosResponse
29389
+ * @throws {Error} If the payload is not a reader or valid buffer
29390
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29391
+ */
29392
+ GetFinalizedEpochInfosResponse.decode = function decode(reader, length) {
29393
+ if (!(reader instanceof $Reader))
29394
+ reader = $Reader.create(reader);
29395
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse();
29396
+ while (reader.pos < end) {
29397
+ var tag = reader.uint32();
29398
+ switch (tag >>> 3) {
29399
+ case 1:
29400
+ message.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.decode(reader, reader.uint32());
29401
+ break;
29402
+ default:
29403
+ reader.skipType(tag & 7);
29404
+ break;
29405
+ }
29406
+ }
29407
+ return message;
29408
+ };
29409
+
29410
+ /**
29411
+ * Decodes a GetFinalizedEpochInfosResponse message from the specified reader or buffer, length delimited.
29412
+ * @function decodeDelimited
29413
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29414
+ * @static
29415
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29416
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} GetFinalizedEpochInfosResponse
29417
+ * @throws {Error} If the payload is not a reader or valid buffer
29418
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29419
+ */
29420
+ GetFinalizedEpochInfosResponse.decodeDelimited = function decodeDelimited(reader) {
29421
+ if (!(reader instanceof $Reader))
29422
+ reader = new $Reader(reader);
29423
+ return this.decode(reader, reader.uint32());
29424
+ };
29425
+
29426
+ /**
29427
+ * Verifies a GetFinalizedEpochInfosResponse message.
29428
+ * @function verify
29429
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29430
+ * @static
29431
+ * @param {Object.<string,*>} message Plain object to verify
29432
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29433
+ */
29434
+ GetFinalizedEpochInfosResponse.verify = function verify(message) {
29435
+ if (typeof message !== "object" || message === null)
29436
+ return "object expected";
29437
+ var properties = {};
29438
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
29439
+ properties.version = 1;
29440
+ {
29441
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.verify(message.v0);
29442
+ if (error)
29443
+ return "v0." + error;
29444
+ }
29445
+ }
29446
+ return null;
29447
+ };
29448
+
29449
+ /**
29450
+ * Creates a GetFinalizedEpochInfosResponse message from a plain object. Also converts values to their respective internal types.
29451
+ * @function fromObject
29452
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29453
+ * @static
29454
+ * @param {Object.<string,*>} object Plain object
29455
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} GetFinalizedEpochInfosResponse
29456
+ */
29457
+ GetFinalizedEpochInfosResponse.fromObject = function fromObject(object) {
29458
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse)
29459
+ return object;
29460
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse();
29461
+ if (object.v0 != null) {
29462
+ if (typeof object.v0 !== "object")
29463
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.v0: object expected");
29464
+ message.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.fromObject(object.v0);
29465
+ }
29466
+ return message;
29467
+ };
29468
+
29469
+ /**
29470
+ * Creates a plain object from a GetFinalizedEpochInfosResponse message. Also converts values to other types if specified.
29471
+ * @function toObject
29472
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29473
+ * @static
29474
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse} message GetFinalizedEpochInfosResponse
29475
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29476
+ * @returns {Object.<string,*>} Plain object
29477
+ */
29478
+ GetFinalizedEpochInfosResponse.toObject = function toObject(message, options) {
29479
+ if (!options)
29480
+ options = {};
29481
+ var object = {};
29482
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
29483
+ object.v0 = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.toObject(message.v0, options);
29484
+ if (options.oneofs)
29485
+ object.version = "v0";
29486
+ }
29487
+ return object;
29488
+ };
29489
+
29490
+ /**
29491
+ * Converts this GetFinalizedEpochInfosResponse to JSON.
29492
+ * @function toJSON
29493
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29494
+ * @instance
29495
+ * @returns {Object.<string,*>} JSON object
29496
+ */
29497
+ GetFinalizedEpochInfosResponse.prototype.toJSON = function toJSON() {
29498
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29499
+ };
29500
+
29501
+ GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0 = (function() {
29502
+
29503
+ /**
29504
+ * Properties of a GetFinalizedEpochInfosResponseV0.
29505
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29506
+ * @interface IGetFinalizedEpochInfosResponseV0
29507
+ * @property {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos|null} [epochs] GetFinalizedEpochInfosResponseV0 epochs
29508
+ * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetFinalizedEpochInfosResponseV0 proof
29509
+ * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetFinalizedEpochInfosResponseV0 metadata
29510
+ */
29511
+
29512
+ /**
29513
+ * Constructs a new GetFinalizedEpochInfosResponseV0.
29514
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse
29515
+ * @classdesc Represents a GetFinalizedEpochInfosResponseV0.
29516
+ * @implements IGetFinalizedEpochInfosResponseV0
29517
+ * @constructor
29518
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0=} [properties] Properties to set
29519
+ */
29520
+ function GetFinalizedEpochInfosResponseV0(properties) {
29521
+ if (properties)
29522
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29523
+ if (properties[keys[i]] != null)
29524
+ this[keys[i]] = properties[keys[i]];
29525
+ }
29526
+
29527
+ /**
29528
+ * GetFinalizedEpochInfosResponseV0 epochs.
29529
+ * @member {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos|null|undefined} epochs
29530
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29531
+ * @instance
29532
+ */
29533
+ GetFinalizedEpochInfosResponseV0.prototype.epochs = null;
29534
+
29535
+ /**
29536
+ * GetFinalizedEpochInfosResponseV0 proof.
29537
+ * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof
29538
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29539
+ * @instance
29540
+ */
29541
+ GetFinalizedEpochInfosResponseV0.prototype.proof = null;
29542
+
29543
+ /**
29544
+ * GetFinalizedEpochInfosResponseV0 metadata.
29545
+ * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata
29546
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29547
+ * @instance
29548
+ */
29549
+ GetFinalizedEpochInfosResponseV0.prototype.metadata = null;
29550
+
29551
+ // OneOf field names bound to virtual getters and setters
29552
+ var $oneOfFields;
29553
+
29554
+ /**
29555
+ * GetFinalizedEpochInfosResponseV0 result.
29556
+ * @member {"epochs"|"proof"|undefined} result
29557
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29558
+ * @instance
29559
+ */
29560
+ Object.defineProperty(GetFinalizedEpochInfosResponseV0.prototype, "result", {
29561
+ get: $util.oneOfGetter($oneOfFields = ["epochs", "proof"]),
29562
+ set: $util.oneOfSetter($oneOfFields)
29563
+ });
29564
+
29565
+ /**
29566
+ * Creates a new GetFinalizedEpochInfosResponseV0 instance using the specified properties.
29567
+ * @function create
29568
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29569
+ * @static
29570
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0=} [properties] Properties to set
29571
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} GetFinalizedEpochInfosResponseV0 instance
29572
+ */
29573
+ GetFinalizedEpochInfosResponseV0.create = function create(properties) {
29574
+ return new GetFinalizedEpochInfosResponseV0(properties);
29575
+ };
29576
+
29577
+ /**
29578
+ * Encodes the specified GetFinalizedEpochInfosResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.verify|verify} messages.
29579
+ * @function encode
29580
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29581
+ * @static
29582
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0} message GetFinalizedEpochInfosResponseV0 message or plain object to encode
29583
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29584
+ * @returns {$protobuf.Writer} Writer
29585
+ */
29586
+ GetFinalizedEpochInfosResponseV0.encode = function encode(message, writer) {
29587
+ if (!writer)
29588
+ writer = $Writer.create();
29589
+ if (message.epochs != null && Object.hasOwnProperty.call(message, "epochs"))
29590
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.encode(message.epochs, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
29591
+ if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
29592
+ $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
29593
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
29594
+ $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
29595
+ return writer;
29596
+ };
29597
+
29598
+ /**
29599
+ * Encodes the specified GetFinalizedEpochInfosResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.verify|verify} messages.
29600
+ * @function encodeDelimited
29601
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29602
+ * @static
29603
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.IGetFinalizedEpochInfosResponseV0} message GetFinalizedEpochInfosResponseV0 message or plain object to encode
29604
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29605
+ * @returns {$protobuf.Writer} Writer
29606
+ */
29607
+ GetFinalizedEpochInfosResponseV0.encodeDelimited = function encodeDelimited(message, writer) {
29608
+ return this.encode(message, writer).ldelim();
29609
+ };
29610
+
29611
+ /**
29612
+ * Decodes a GetFinalizedEpochInfosResponseV0 message from the specified reader or buffer.
29613
+ * @function decode
29614
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29615
+ * @static
29616
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29617
+ * @param {number} [length] Message length if known beforehand
29618
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} GetFinalizedEpochInfosResponseV0
29619
+ * @throws {Error} If the payload is not a reader or valid buffer
29620
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29621
+ */
29622
+ GetFinalizedEpochInfosResponseV0.decode = function decode(reader, length) {
29623
+ if (!(reader instanceof $Reader))
29624
+ reader = $Reader.create(reader);
29625
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0();
29626
+ while (reader.pos < end) {
29627
+ var tag = reader.uint32();
29628
+ switch (tag >>> 3) {
29629
+ case 1:
29630
+ message.epochs = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.decode(reader, reader.uint32());
29631
+ break;
29632
+ case 2:
29633
+ message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
29634
+ break;
29635
+ case 3:
29636
+ message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32());
29637
+ break;
29638
+ default:
29639
+ reader.skipType(tag & 7);
29640
+ break;
29641
+ }
29642
+ }
29643
+ return message;
29644
+ };
29645
+
29646
+ /**
29647
+ * Decodes a GetFinalizedEpochInfosResponseV0 message from the specified reader or buffer, length delimited.
29648
+ * @function decodeDelimited
29649
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29650
+ * @static
29651
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29652
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} GetFinalizedEpochInfosResponseV0
29653
+ * @throws {Error} If the payload is not a reader or valid buffer
29654
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29655
+ */
29656
+ GetFinalizedEpochInfosResponseV0.decodeDelimited = function decodeDelimited(reader) {
29657
+ if (!(reader instanceof $Reader))
29658
+ reader = new $Reader(reader);
29659
+ return this.decode(reader, reader.uint32());
29660
+ };
29661
+
29662
+ /**
29663
+ * Verifies a GetFinalizedEpochInfosResponseV0 message.
29664
+ * @function verify
29665
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29666
+ * @static
29667
+ * @param {Object.<string,*>} message Plain object to verify
29668
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29669
+ */
29670
+ GetFinalizedEpochInfosResponseV0.verify = function verify(message) {
29671
+ if (typeof message !== "object" || message === null)
29672
+ return "object expected";
29673
+ var properties = {};
29674
+ if (message.epochs != null && message.hasOwnProperty("epochs")) {
29675
+ properties.result = 1;
29676
+ {
29677
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.verify(message.epochs);
29678
+ if (error)
29679
+ return "epochs." + error;
29680
+ }
29681
+ }
29682
+ if (message.proof != null && message.hasOwnProperty("proof")) {
29683
+ if (properties.result === 1)
29684
+ return "result: multiple values";
29685
+ properties.result = 1;
29686
+ {
29687
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
29688
+ if (error)
29689
+ return "proof." + error;
29690
+ }
29691
+ }
29692
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
29693
+ var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
29694
+ if (error)
29695
+ return "metadata." + error;
29696
+ }
29697
+ return null;
29698
+ };
29699
+
29700
+ /**
29701
+ * Creates a GetFinalizedEpochInfosResponseV0 message from a plain object. Also converts values to their respective internal types.
29702
+ * @function fromObject
29703
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29704
+ * @static
29705
+ * @param {Object.<string,*>} object Plain object
29706
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} GetFinalizedEpochInfosResponseV0
29707
+ */
29708
+ GetFinalizedEpochInfosResponseV0.fromObject = function fromObject(object) {
29709
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0)
29710
+ return object;
29711
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0();
29712
+ if (object.epochs != null) {
29713
+ if (typeof object.epochs !== "object")
29714
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.epochs: object expected");
29715
+ message.epochs = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.fromObject(object.epochs);
29716
+ }
29717
+ if (object.proof != null) {
29718
+ if (typeof object.proof !== "object")
29719
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.proof: object expected");
29720
+ message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof);
29721
+ }
29722
+ if (object.metadata != null) {
29723
+ if (typeof object.metadata !== "object")
29724
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.metadata: object expected");
29725
+ message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata);
29726
+ }
29727
+ return message;
29728
+ };
29729
+
29730
+ /**
29731
+ * Creates a plain object from a GetFinalizedEpochInfosResponseV0 message. Also converts values to other types if specified.
29732
+ * @function toObject
29733
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29734
+ * @static
29735
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0} message GetFinalizedEpochInfosResponseV0
29736
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29737
+ * @returns {Object.<string,*>} Plain object
29738
+ */
29739
+ GetFinalizedEpochInfosResponseV0.toObject = function toObject(message, options) {
29740
+ if (!options)
29741
+ options = {};
29742
+ var object = {};
29743
+ if (options.defaults)
29744
+ object.metadata = null;
29745
+ if (message.epochs != null && message.hasOwnProperty("epochs")) {
29746
+ object.epochs = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.toObject(message.epochs, options);
29747
+ if (options.oneofs)
29748
+ object.result = "epochs";
29749
+ }
29750
+ if (message.proof != null && message.hasOwnProperty("proof")) {
29751
+ object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
29752
+ if (options.oneofs)
29753
+ object.result = "proof";
29754
+ }
29755
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
29756
+ object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
29757
+ return object;
29758
+ };
29759
+
29760
+ /**
29761
+ * Converts this GetFinalizedEpochInfosResponseV0 to JSON.
29762
+ * @function toJSON
29763
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29764
+ * @instance
29765
+ * @returns {Object.<string,*>} JSON object
29766
+ */
29767
+ GetFinalizedEpochInfosResponseV0.prototype.toJSON = function toJSON() {
29768
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29769
+ };
29770
+
29771
+ GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos = (function() {
29772
+
29773
+ /**
29774
+ * Properties of a FinalizedEpochInfos.
29775
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29776
+ * @interface IFinalizedEpochInfos
29777
+ * @property {Array.<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo>|null} [finalizedEpochInfos] FinalizedEpochInfos finalizedEpochInfos
29778
+ */
29779
+
29780
+ /**
29781
+ * Constructs a new FinalizedEpochInfos.
29782
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29783
+ * @classdesc Represents a FinalizedEpochInfos.
29784
+ * @implements IFinalizedEpochInfos
29785
+ * @constructor
29786
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos=} [properties] Properties to set
29787
+ */
29788
+ function FinalizedEpochInfos(properties) {
29789
+ this.finalizedEpochInfos = [];
29790
+ if (properties)
29791
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29792
+ if (properties[keys[i]] != null)
29793
+ this[keys[i]] = properties[keys[i]];
29794
+ }
29795
+
29796
+ /**
29797
+ * FinalizedEpochInfos finalizedEpochInfos.
29798
+ * @member {Array.<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo>} finalizedEpochInfos
29799
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29800
+ * @instance
29801
+ */
29802
+ FinalizedEpochInfos.prototype.finalizedEpochInfos = $util.emptyArray;
29803
+
29804
+ /**
29805
+ * Creates a new FinalizedEpochInfos instance using the specified properties.
29806
+ * @function create
29807
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29808
+ * @static
29809
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos=} [properties] Properties to set
29810
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} FinalizedEpochInfos instance
29811
+ */
29812
+ FinalizedEpochInfos.create = function create(properties) {
29813
+ return new FinalizedEpochInfos(properties);
29814
+ };
29815
+
29816
+ /**
29817
+ * Encodes the specified FinalizedEpochInfos message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.verify|verify} messages.
29818
+ * @function encode
29819
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29820
+ * @static
29821
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos} message FinalizedEpochInfos message or plain object to encode
29822
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29823
+ * @returns {$protobuf.Writer} Writer
29824
+ */
29825
+ FinalizedEpochInfos.encode = function encode(message, writer) {
29826
+ if (!writer)
29827
+ writer = $Writer.create();
29828
+ if (message.finalizedEpochInfos != null && message.finalizedEpochInfos.length)
29829
+ for (var i = 0; i < message.finalizedEpochInfos.length; ++i)
29830
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.encode(message.finalizedEpochInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
29831
+ return writer;
29832
+ };
29833
+
29834
+ /**
29835
+ * Encodes the specified FinalizedEpochInfos message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.verify|verify} messages.
29836
+ * @function encodeDelimited
29837
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29838
+ * @static
29839
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfos} message FinalizedEpochInfos message or plain object to encode
29840
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29841
+ * @returns {$protobuf.Writer} Writer
29842
+ */
29843
+ FinalizedEpochInfos.encodeDelimited = function encodeDelimited(message, writer) {
29844
+ return this.encode(message, writer).ldelim();
29845
+ };
29846
+
29847
+ /**
29848
+ * Decodes a FinalizedEpochInfos message from the specified reader or buffer.
29849
+ * @function decode
29850
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29851
+ * @static
29852
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29853
+ * @param {number} [length] Message length if known beforehand
29854
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} FinalizedEpochInfos
29855
+ * @throws {Error} If the payload is not a reader or valid buffer
29856
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29857
+ */
29858
+ FinalizedEpochInfos.decode = function decode(reader, length) {
29859
+ if (!(reader instanceof $Reader))
29860
+ reader = $Reader.create(reader);
29861
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos();
29862
+ while (reader.pos < end) {
29863
+ var tag = reader.uint32();
29864
+ switch (tag >>> 3) {
29865
+ case 1:
29866
+ if (!(message.finalizedEpochInfos && message.finalizedEpochInfos.length))
29867
+ message.finalizedEpochInfos = [];
29868
+ message.finalizedEpochInfos.push($root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.decode(reader, reader.uint32()));
29869
+ break;
29870
+ default:
29871
+ reader.skipType(tag & 7);
29872
+ break;
29873
+ }
29874
+ }
29875
+ return message;
29876
+ };
29877
+
29878
+ /**
29879
+ * Decodes a FinalizedEpochInfos message from the specified reader or buffer, length delimited.
29880
+ * @function decodeDelimited
29881
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29882
+ * @static
29883
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29884
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} FinalizedEpochInfos
29885
+ * @throws {Error} If the payload is not a reader or valid buffer
29886
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29887
+ */
29888
+ FinalizedEpochInfos.decodeDelimited = function decodeDelimited(reader) {
29889
+ if (!(reader instanceof $Reader))
29890
+ reader = new $Reader(reader);
29891
+ return this.decode(reader, reader.uint32());
29892
+ };
29893
+
29894
+ /**
29895
+ * Verifies a FinalizedEpochInfos message.
29896
+ * @function verify
29897
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29898
+ * @static
29899
+ * @param {Object.<string,*>} message Plain object to verify
29900
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29901
+ */
29902
+ FinalizedEpochInfos.verify = function verify(message) {
29903
+ if (typeof message !== "object" || message === null)
29904
+ return "object expected";
29905
+ if (message.finalizedEpochInfos != null && message.hasOwnProperty("finalizedEpochInfos")) {
29906
+ if (!Array.isArray(message.finalizedEpochInfos))
29907
+ return "finalizedEpochInfos: array expected";
29908
+ for (var i = 0; i < message.finalizedEpochInfos.length; ++i) {
29909
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.verify(message.finalizedEpochInfos[i]);
29910
+ if (error)
29911
+ return "finalizedEpochInfos." + error;
29912
+ }
29913
+ }
29914
+ return null;
29915
+ };
29916
+
29917
+ /**
29918
+ * Creates a FinalizedEpochInfos message from a plain object. Also converts values to their respective internal types.
29919
+ * @function fromObject
29920
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29921
+ * @static
29922
+ * @param {Object.<string,*>} object Plain object
29923
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} FinalizedEpochInfos
29924
+ */
29925
+ FinalizedEpochInfos.fromObject = function fromObject(object) {
29926
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos)
29927
+ return object;
29928
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos();
29929
+ if (object.finalizedEpochInfos) {
29930
+ if (!Array.isArray(object.finalizedEpochInfos))
29931
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.finalizedEpochInfos: array expected");
29932
+ message.finalizedEpochInfos = [];
29933
+ for (var i = 0; i < object.finalizedEpochInfos.length; ++i) {
29934
+ if (typeof object.finalizedEpochInfos[i] !== "object")
29935
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos.finalizedEpochInfos: object expected");
29936
+ message.finalizedEpochInfos[i] = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.fromObject(object.finalizedEpochInfos[i]);
29937
+ }
29938
+ }
29939
+ return message;
29940
+ };
29941
+
29942
+ /**
29943
+ * Creates a plain object from a FinalizedEpochInfos message. Also converts values to other types if specified.
29944
+ * @function toObject
29945
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29946
+ * @static
29947
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos} message FinalizedEpochInfos
29948
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29949
+ * @returns {Object.<string,*>} Plain object
29950
+ */
29951
+ FinalizedEpochInfos.toObject = function toObject(message, options) {
29952
+ if (!options)
29953
+ options = {};
29954
+ var object = {};
29955
+ if (options.arrays || options.defaults)
29956
+ object.finalizedEpochInfos = [];
29957
+ if (message.finalizedEpochInfos && message.finalizedEpochInfos.length) {
29958
+ object.finalizedEpochInfos = [];
29959
+ for (var j = 0; j < message.finalizedEpochInfos.length; ++j)
29960
+ object.finalizedEpochInfos[j] = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.toObject(message.finalizedEpochInfos[j], options);
29961
+ }
29962
+ return object;
29963
+ };
29964
+
29965
+ /**
29966
+ * Converts this FinalizedEpochInfos to JSON.
29967
+ * @function toJSON
29968
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfos
29969
+ * @instance
29970
+ * @returns {Object.<string,*>} JSON object
29971
+ */
29972
+ FinalizedEpochInfos.prototype.toJSON = function toJSON() {
29973
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29974
+ };
29975
+
29976
+ return FinalizedEpochInfos;
29977
+ })();
29978
+
29979
+ GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo = (function() {
29980
+
29981
+ /**
29982
+ * Properties of a FinalizedEpochInfo.
29983
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
29984
+ * @interface IFinalizedEpochInfo
29985
+ * @property {number|null} [number] FinalizedEpochInfo number
29986
+ * @property {number|Long|null} [firstBlockHeight] FinalizedEpochInfo firstBlockHeight
29987
+ * @property {number|null} [firstCoreBlockHeight] FinalizedEpochInfo firstCoreBlockHeight
29988
+ * @property {number|Long|null} [firstBlockTime] FinalizedEpochInfo firstBlockTime
29989
+ * @property {number|null} [feeMultiplier] FinalizedEpochInfo feeMultiplier
29990
+ * @property {number|null} [protocolVersion] FinalizedEpochInfo protocolVersion
29991
+ * @property {number|Long|null} [totalBlocksInEpoch] FinalizedEpochInfo totalBlocksInEpoch
29992
+ * @property {number|null} [nextEpochStartCoreBlockHeight] FinalizedEpochInfo nextEpochStartCoreBlockHeight
29993
+ * @property {number|Long|null} [totalProcessingFees] FinalizedEpochInfo totalProcessingFees
29994
+ * @property {number|Long|null} [totalDistributedStorageFees] FinalizedEpochInfo totalDistributedStorageFees
29995
+ * @property {number|Long|null} [totalCreatedStorageFees] FinalizedEpochInfo totalCreatedStorageFees
29996
+ * @property {number|Long|null} [coreBlockRewards] FinalizedEpochInfo coreBlockRewards
29997
+ * @property {Array.<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer>|null} [blockProposers] FinalizedEpochInfo blockProposers
29998
+ */
29999
+
30000
+ /**
30001
+ * Constructs a new FinalizedEpochInfo.
30002
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30003
+ * @classdesc Represents a FinalizedEpochInfo.
30004
+ * @implements IFinalizedEpochInfo
30005
+ * @constructor
30006
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo=} [properties] Properties to set
30007
+ */
30008
+ function FinalizedEpochInfo(properties) {
30009
+ this.blockProposers = [];
30010
+ if (properties)
30011
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
30012
+ if (properties[keys[i]] != null)
30013
+ this[keys[i]] = properties[keys[i]];
30014
+ }
30015
+
30016
+ /**
30017
+ * FinalizedEpochInfo number.
30018
+ * @member {number} number
30019
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30020
+ * @instance
30021
+ */
30022
+ FinalizedEpochInfo.prototype.number = 0;
30023
+
30024
+ /**
30025
+ * FinalizedEpochInfo firstBlockHeight.
30026
+ * @member {number|Long} firstBlockHeight
30027
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30028
+ * @instance
30029
+ */
30030
+ FinalizedEpochInfo.prototype.firstBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30031
+
30032
+ /**
30033
+ * FinalizedEpochInfo firstCoreBlockHeight.
30034
+ * @member {number} firstCoreBlockHeight
30035
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30036
+ * @instance
30037
+ */
30038
+ FinalizedEpochInfo.prototype.firstCoreBlockHeight = 0;
30039
+
30040
+ /**
30041
+ * FinalizedEpochInfo firstBlockTime.
30042
+ * @member {number|Long} firstBlockTime
30043
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30044
+ * @instance
30045
+ */
30046
+ FinalizedEpochInfo.prototype.firstBlockTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30047
+
30048
+ /**
30049
+ * FinalizedEpochInfo feeMultiplier.
30050
+ * @member {number} feeMultiplier
30051
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30052
+ * @instance
30053
+ */
30054
+ FinalizedEpochInfo.prototype.feeMultiplier = 0;
30055
+
30056
+ /**
30057
+ * FinalizedEpochInfo protocolVersion.
30058
+ * @member {number} protocolVersion
30059
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30060
+ * @instance
30061
+ */
30062
+ FinalizedEpochInfo.prototype.protocolVersion = 0;
30063
+
30064
+ /**
30065
+ * FinalizedEpochInfo totalBlocksInEpoch.
30066
+ * @member {number|Long} totalBlocksInEpoch
30067
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30068
+ * @instance
30069
+ */
30070
+ FinalizedEpochInfo.prototype.totalBlocksInEpoch = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30071
+
30072
+ /**
30073
+ * FinalizedEpochInfo nextEpochStartCoreBlockHeight.
30074
+ * @member {number} nextEpochStartCoreBlockHeight
30075
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30076
+ * @instance
30077
+ */
30078
+ FinalizedEpochInfo.prototype.nextEpochStartCoreBlockHeight = 0;
30079
+
30080
+ /**
30081
+ * FinalizedEpochInfo totalProcessingFees.
30082
+ * @member {number|Long} totalProcessingFees
30083
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30084
+ * @instance
30085
+ */
30086
+ FinalizedEpochInfo.prototype.totalProcessingFees = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30087
+
30088
+ /**
30089
+ * FinalizedEpochInfo totalDistributedStorageFees.
30090
+ * @member {number|Long} totalDistributedStorageFees
30091
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30092
+ * @instance
30093
+ */
30094
+ FinalizedEpochInfo.prototype.totalDistributedStorageFees = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30095
+
30096
+ /**
30097
+ * FinalizedEpochInfo totalCreatedStorageFees.
30098
+ * @member {number|Long} totalCreatedStorageFees
30099
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30100
+ * @instance
30101
+ */
30102
+ FinalizedEpochInfo.prototype.totalCreatedStorageFees = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30103
+
30104
+ /**
30105
+ * FinalizedEpochInfo coreBlockRewards.
30106
+ * @member {number|Long} coreBlockRewards
30107
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30108
+ * @instance
30109
+ */
30110
+ FinalizedEpochInfo.prototype.coreBlockRewards = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
30111
+
30112
+ /**
30113
+ * FinalizedEpochInfo blockProposers.
30114
+ * @member {Array.<org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer>} blockProposers
30115
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30116
+ * @instance
30117
+ */
30118
+ FinalizedEpochInfo.prototype.blockProposers = $util.emptyArray;
30119
+
30120
+ /**
30121
+ * Creates a new FinalizedEpochInfo instance using the specified properties.
30122
+ * @function create
30123
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30124
+ * @static
30125
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo=} [properties] Properties to set
30126
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} FinalizedEpochInfo instance
30127
+ */
30128
+ FinalizedEpochInfo.create = function create(properties) {
30129
+ return new FinalizedEpochInfo(properties);
30130
+ };
30131
+
30132
+ /**
30133
+ * Encodes the specified FinalizedEpochInfo message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.verify|verify} messages.
30134
+ * @function encode
30135
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30136
+ * @static
30137
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo} message FinalizedEpochInfo message or plain object to encode
30138
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30139
+ * @returns {$protobuf.Writer} Writer
30140
+ */
30141
+ FinalizedEpochInfo.encode = function encode(message, writer) {
30142
+ if (!writer)
30143
+ writer = $Writer.create();
30144
+ if (message.number != null && Object.hasOwnProperty.call(message, "number"))
30145
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.number);
30146
+ if (message.firstBlockHeight != null && Object.hasOwnProperty.call(message, "firstBlockHeight"))
30147
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.firstBlockHeight);
30148
+ if (message.firstCoreBlockHeight != null && Object.hasOwnProperty.call(message, "firstCoreBlockHeight"))
30149
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.firstCoreBlockHeight);
30150
+ if (message.firstBlockTime != null && Object.hasOwnProperty.call(message, "firstBlockTime"))
30151
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.firstBlockTime);
30152
+ if (message.feeMultiplier != null && Object.hasOwnProperty.call(message, "feeMultiplier"))
30153
+ writer.uint32(/* id 5, wireType 1 =*/41).double(message.feeMultiplier);
30154
+ if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion"))
30155
+ writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.protocolVersion);
30156
+ if (message.totalBlocksInEpoch != null && Object.hasOwnProperty.call(message, "totalBlocksInEpoch"))
30157
+ writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.totalBlocksInEpoch);
30158
+ if (message.nextEpochStartCoreBlockHeight != null && Object.hasOwnProperty.call(message, "nextEpochStartCoreBlockHeight"))
30159
+ writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.nextEpochStartCoreBlockHeight);
30160
+ if (message.totalProcessingFees != null && Object.hasOwnProperty.call(message, "totalProcessingFees"))
30161
+ writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.totalProcessingFees);
30162
+ if (message.totalDistributedStorageFees != null && Object.hasOwnProperty.call(message, "totalDistributedStorageFees"))
30163
+ writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.totalDistributedStorageFees);
30164
+ if (message.totalCreatedStorageFees != null && Object.hasOwnProperty.call(message, "totalCreatedStorageFees"))
30165
+ writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.totalCreatedStorageFees);
30166
+ if (message.coreBlockRewards != null && Object.hasOwnProperty.call(message, "coreBlockRewards"))
30167
+ writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.coreBlockRewards);
30168
+ if (message.blockProposers != null && message.blockProposers.length)
30169
+ for (var i = 0; i < message.blockProposers.length; ++i)
30170
+ $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.encode(message.blockProposers[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
30171
+ return writer;
30172
+ };
30173
+
30174
+ /**
30175
+ * Encodes the specified FinalizedEpochInfo message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.verify|verify} messages.
30176
+ * @function encodeDelimited
30177
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30178
+ * @static
30179
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IFinalizedEpochInfo} message FinalizedEpochInfo message or plain object to encode
30180
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30181
+ * @returns {$protobuf.Writer} Writer
30182
+ */
30183
+ FinalizedEpochInfo.encodeDelimited = function encodeDelimited(message, writer) {
30184
+ return this.encode(message, writer).ldelim();
30185
+ };
30186
+
30187
+ /**
30188
+ * Decodes a FinalizedEpochInfo message from the specified reader or buffer.
30189
+ * @function decode
30190
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30191
+ * @static
30192
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30193
+ * @param {number} [length] Message length if known beforehand
30194
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} FinalizedEpochInfo
30195
+ * @throws {Error} If the payload is not a reader or valid buffer
30196
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30197
+ */
30198
+ FinalizedEpochInfo.decode = function decode(reader, length) {
30199
+ if (!(reader instanceof $Reader))
30200
+ reader = $Reader.create(reader);
30201
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo();
30202
+ while (reader.pos < end) {
30203
+ var tag = reader.uint32();
30204
+ switch (tag >>> 3) {
30205
+ case 1:
30206
+ message.number = reader.uint32();
30207
+ break;
30208
+ case 2:
30209
+ message.firstBlockHeight = reader.uint64();
30210
+ break;
30211
+ case 3:
30212
+ message.firstCoreBlockHeight = reader.uint32();
30213
+ break;
30214
+ case 4:
30215
+ message.firstBlockTime = reader.uint64();
30216
+ break;
30217
+ case 5:
30218
+ message.feeMultiplier = reader.double();
30219
+ break;
30220
+ case 6:
30221
+ message.protocolVersion = reader.uint32();
30222
+ break;
30223
+ case 7:
30224
+ message.totalBlocksInEpoch = reader.uint64();
30225
+ break;
30226
+ case 8:
30227
+ message.nextEpochStartCoreBlockHeight = reader.uint32();
30228
+ break;
30229
+ case 9:
30230
+ message.totalProcessingFees = reader.uint64();
30231
+ break;
30232
+ case 10:
30233
+ message.totalDistributedStorageFees = reader.uint64();
30234
+ break;
30235
+ case 11:
30236
+ message.totalCreatedStorageFees = reader.uint64();
30237
+ break;
30238
+ case 12:
30239
+ message.coreBlockRewards = reader.uint64();
30240
+ break;
30241
+ case 13:
30242
+ if (!(message.blockProposers && message.blockProposers.length))
30243
+ message.blockProposers = [];
30244
+ message.blockProposers.push($root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.decode(reader, reader.uint32()));
30245
+ break;
30246
+ default:
30247
+ reader.skipType(tag & 7);
30248
+ break;
30249
+ }
30250
+ }
30251
+ return message;
30252
+ };
30253
+
30254
+ /**
30255
+ * Decodes a FinalizedEpochInfo message from the specified reader or buffer, length delimited.
30256
+ * @function decodeDelimited
30257
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30258
+ * @static
30259
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30260
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} FinalizedEpochInfo
30261
+ * @throws {Error} If the payload is not a reader or valid buffer
30262
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30263
+ */
30264
+ FinalizedEpochInfo.decodeDelimited = function decodeDelimited(reader) {
30265
+ if (!(reader instanceof $Reader))
30266
+ reader = new $Reader(reader);
30267
+ return this.decode(reader, reader.uint32());
30268
+ };
30269
+
30270
+ /**
30271
+ * Verifies a FinalizedEpochInfo message.
30272
+ * @function verify
30273
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30274
+ * @static
30275
+ * @param {Object.<string,*>} message Plain object to verify
30276
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
30277
+ */
30278
+ FinalizedEpochInfo.verify = function verify(message) {
30279
+ if (typeof message !== "object" || message === null)
30280
+ return "object expected";
30281
+ if (message.number != null && message.hasOwnProperty("number"))
30282
+ if (!$util.isInteger(message.number))
30283
+ return "number: integer expected";
30284
+ if (message.firstBlockHeight != null && message.hasOwnProperty("firstBlockHeight"))
30285
+ if (!$util.isInteger(message.firstBlockHeight) && !(message.firstBlockHeight && $util.isInteger(message.firstBlockHeight.low) && $util.isInteger(message.firstBlockHeight.high)))
30286
+ return "firstBlockHeight: integer|Long expected";
30287
+ if (message.firstCoreBlockHeight != null && message.hasOwnProperty("firstCoreBlockHeight"))
30288
+ if (!$util.isInteger(message.firstCoreBlockHeight))
30289
+ return "firstCoreBlockHeight: integer expected";
30290
+ if (message.firstBlockTime != null && message.hasOwnProperty("firstBlockTime"))
30291
+ if (!$util.isInteger(message.firstBlockTime) && !(message.firstBlockTime && $util.isInteger(message.firstBlockTime.low) && $util.isInteger(message.firstBlockTime.high)))
30292
+ return "firstBlockTime: integer|Long expected";
30293
+ if (message.feeMultiplier != null && message.hasOwnProperty("feeMultiplier"))
30294
+ if (typeof message.feeMultiplier !== "number")
30295
+ return "feeMultiplier: number expected";
30296
+ if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion"))
30297
+ if (!$util.isInteger(message.protocolVersion))
30298
+ return "protocolVersion: integer expected";
30299
+ if (message.totalBlocksInEpoch != null && message.hasOwnProperty("totalBlocksInEpoch"))
30300
+ if (!$util.isInteger(message.totalBlocksInEpoch) && !(message.totalBlocksInEpoch && $util.isInteger(message.totalBlocksInEpoch.low) && $util.isInteger(message.totalBlocksInEpoch.high)))
30301
+ return "totalBlocksInEpoch: integer|Long expected";
30302
+ if (message.nextEpochStartCoreBlockHeight != null && message.hasOwnProperty("nextEpochStartCoreBlockHeight"))
30303
+ if (!$util.isInteger(message.nextEpochStartCoreBlockHeight))
30304
+ return "nextEpochStartCoreBlockHeight: integer expected";
30305
+ if (message.totalProcessingFees != null && message.hasOwnProperty("totalProcessingFees"))
30306
+ if (!$util.isInteger(message.totalProcessingFees) && !(message.totalProcessingFees && $util.isInteger(message.totalProcessingFees.low) && $util.isInteger(message.totalProcessingFees.high)))
30307
+ return "totalProcessingFees: integer|Long expected";
30308
+ if (message.totalDistributedStorageFees != null && message.hasOwnProperty("totalDistributedStorageFees"))
30309
+ if (!$util.isInteger(message.totalDistributedStorageFees) && !(message.totalDistributedStorageFees && $util.isInteger(message.totalDistributedStorageFees.low) && $util.isInteger(message.totalDistributedStorageFees.high)))
30310
+ return "totalDistributedStorageFees: integer|Long expected";
30311
+ if (message.totalCreatedStorageFees != null && message.hasOwnProperty("totalCreatedStorageFees"))
30312
+ if (!$util.isInteger(message.totalCreatedStorageFees) && !(message.totalCreatedStorageFees && $util.isInteger(message.totalCreatedStorageFees.low) && $util.isInteger(message.totalCreatedStorageFees.high)))
30313
+ return "totalCreatedStorageFees: integer|Long expected";
30314
+ if (message.coreBlockRewards != null && message.hasOwnProperty("coreBlockRewards"))
30315
+ if (!$util.isInteger(message.coreBlockRewards) && !(message.coreBlockRewards && $util.isInteger(message.coreBlockRewards.low) && $util.isInteger(message.coreBlockRewards.high)))
30316
+ return "coreBlockRewards: integer|Long expected";
30317
+ if (message.blockProposers != null && message.hasOwnProperty("blockProposers")) {
30318
+ if (!Array.isArray(message.blockProposers))
30319
+ return "blockProposers: array expected";
30320
+ for (var i = 0; i < message.blockProposers.length; ++i) {
30321
+ var error = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.verify(message.blockProposers[i]);
30322
+ if (error)
30323
+ return "blockProposers." + error;
30324
+ }
30325
+ }
30326
+ return null;
30327
+ };
30328
+
30329
+ /**
30330
+ * Creates a FinalizedEpochInfo message from a plain object. Also converts values to their respective internal types.
30331
+ * @function fromObject
30332
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30333
+ * @static
30334
+ * @param {Object.<string,*>} object Plain object
30335
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} FinalizedEpochInfo
30336
+ */
30337
+ FinalizedEpochInfo.fromObject = function fromObject(object) {
30338
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo)
30339
+ return object;
30340
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo();
30341
+ if (object.number != null)
30342
+ message.number = object.number >>> 0;
30343
+ if (object.firstBlockHeight != null)
30344
+ if ($util.Long)
30345
+ (message.firstBlockHeight = $util.Long.fromValue(object.firstBlockHeight)).unsigned = true;
30346
+ else if (typeof object.firstBlockHeight === "string")
30347
+ message.firstBlockHeight = parseInt(object.firstBlockHeight, 10);
30348
+ else if (typeof object.firstBlockHeight === "number")
30349
+ message.firstBlockHeight = object.firstBlockHeight;
30350
+ else if (typeof object.firstBlockHeight === "object")
30351
+ message.firstBlockHeight = new $util.LongBits(object.firstBlockHeight.low >>> 0, object.firstBlockHeight.high >>> 0).toNumber(true);
30352
+ if (object.firstCoreBlockHeight != null)
30353
+ message.firstCoreBlockHeight = object.firstCoreBlockHeight >>> 0;
30354
+ if (object.firstBlockTime != null)
30355
+ if ($util.Long)
30356
+ (message.firstBlockTime = $util.Long.fromValue(object.firstBlockTime)).unsigned = true;
30357
+ else if (typeof object.firstBlockTime === "string")
30358
+ message.firstBlockTime = parseInt(object.firstBlockTime, 10);
30359
+ else if (typeof object.firstBlockTime === "number")
30360
+ message.firstBlockTime = object.firstBlockTime;
30361
+ else if (typeof object.firstBlockTime === "object")
30362
+ message.firstBlockTime = new $util.LongBits(object.firstBlockTime.low >>> 0, object.firstBlockTime.high >>> 0).toNumber(true);
30363
+ if (object.feeMultiplier != null)
30364
+ message.feeMultiplier = Number(object.feeMultiplier);
30365
+ if (object.protocolVersion != null)
30366
+ message.protocolVersion = object.protocolVersion >>> 0;
30367
+ if (object.totalBlocksInEpoch != null)
30368
+ if ($util.Long)
30369
+ (message.totalBlocksInEpoch = $util.Long.fromValue(object.totalBlocksInEpoch)).unsigned = true;
30370
+ else if (typeof object.totalBlocksInEpoch === "string")
30371
+ message.totalBlocksInEpoch = parseInt(object.totalBlocksInEpoch, 10);
30372
+ else if (typeof object.totalBlocksInEpoch === "number")
30373
+ message.totalBlocksInEpoch = object.totalBlocksInEpoch;
30374
+ else if (typeof object.totalBlocksInEpoch === "object")
30375
+ message.totalBlocksInEpoch = new $util.LongBits(object.totalBlocksInEpoch.low >>> 0, object.totalBlocksInEpoch.high >>> 0).toNumber(true);
30376
+ if (object.nextEpochStartCoreBlockHeight != null)
30377
+ message.nextEpochStartCoreBlockHeight = object.nextEpochStartCoreBlockHeight >>> 0;
30378
+ if (object.totalProcessingFees != null)
30379
+ if ($util.Long)
30380
+ (message.totalProcessingFees = $util.Long.fromValue(object.totalProcessingFees)).unsigned = true;
30381
+ else if (typeof object.totalProcessingFees === "string")
30382
+ message.totalProcessingFees = parseInt(object.totalProcessingFees, 10);
30383
+ else if (typeof object.totalProcessingFees === "number")
30384
+ message.totalProcessingFees = object.totalProcessingFees;
30385
+ else if (typeof object.totalProcessingFees === "object")
30386
+ message.totalProcessingFees = new $util.LongBits(object.totalProcessingFees.low >>> 0, object.totalProcessingFees.high >>> 0).toNumber(true);
30387
+ if (object.totalDistributedStorageFees != null)
30388
+ if ($util.Long)
30389
+ (message.totalDistributedStorageFees = $util.Long.fromValue(object.totalDistributedStorageFees)).unsigned = true;
30390
+ else if (typeof object.totalDistributedStorageFees === "string")
30391
+ message.totalDistributedStorageFees = parseInt(object.totalDistributedStorageFees, 10);
30392
+ else if (typeof object.totalDistributedStorageFees === "number")
30393
+ message.totalDistributedStorageFees = object.totalDistributedStorageFees;
30394
+ else if (typeof object.totalDistributedStorageFees === "object")
30395
+ message.totalDistributedStorageFees = new $util.LongBits(object.totalDistributedStorageFees.low >>> 0, object.totalDistributedStorageFees.high >>> 0).toNumber(true);
30396
+ if (object.totalCreatedStorageFees != null)
30397
+ if ($util.Long)
30398
+ (message.totalCreatedStorageFees = $util.Long.fromValue(object.totalCreatedStorageFees)).unsigned = true;
30399
+ else if (typeof object.totalCreatedStorageFees === "string")
30400
+ message.totalCreatedStorageFees = parseInt(object.totalCreatedStorageFees, 10);
30401
+ else if (typeof object.totalCreatedStorageFees === "number")
30402
+ message.totalCreatedStorageFees = object.totalCreatedStorageFees;
30403
+ else if (typeof object.totalCreatedStorageFees === "object")
30404
+ message.totalCreatedStorageFees = new $util.LongBits(object.totalCreatedStorageFees.low >>> 0, object.totalCreatedStorageFees.high >>> 0).toNumber(true);
30405
+ if (object.coreBlockRewards != null)
30406
+ if ($util.Long)
30407
+ (message.coreBlockRewards = $util.Long.fromValue(object.coreBlockRewards)).unsigned = true;
30408
+ else if (typeof object.coreBlockRewards === "string")
30409
+ message.coreBlockRewards = parseInt(object.coreBlockRewards, 10);
30410
+ else if (typeof object.coreBlockRewards === "number")
30411
+ message.coreBlockRewards = object.coreBlockRewards;
30412
+ else if (typeof object.coreBlockRewards === "object")
30413
+ message.coreBlockRewards = new $util.LongBits(object.coreBlockRewards.low >>> 0, object.coreBlockRewards.high >>> 0).toNumber(true);
30414
+ if (object.blockProposers) {
30415
+ if (!Array.isArray(object.blockProposers))
30416
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.blockProposers: array expected");
30417
+ message.blockProposers = [];
30418
+ for (var i = 0; i < object.blockProposers.length; ++i) {
30419
+ if (typeof object.blockProposers[i] !== "object")
30420
+ throw TypeError(".org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo.blockProposers: object expected");
30421
+ message.blockProposers[i] = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.fromObject(object.blockProposers[i]);
30422
+ }
30423
+ }
30424
+ return message;
30425
+ };
30426
+
30427
+ /**
30428
+ * Creates a plain object from a FinalizedEpochInfo message. Also converts values to other types if specified.
30429
+ * @function toObject
30430
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30431
+ * @static
30432
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo} message FinalizedEpochInfo
30433
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
30434
+ * @returns {Object.<string,*>} Plain object
30435
+ */
30436
+ FinalizedEpochInfo.toObject = function toObject(message, options) {
30437
+ if (!options)
30438
+ options = {};
30439
+ var object = {};
30440
+ if (options.arrays || options.defaults)
30441
+ object.blockProposers = [];
30442
+ if (options.defaults) {
30443
+ object.number = 0;
30444
+ if ($util.Long) {
30445
+ var long = new $util.Long(0, 0, true);
30446
+ object.firstBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30447
+ } else
30448
+ object.firstBlockHeight = options.longs === String ? "0" : 0;
30449
+ object.firstCoreBlockHeight = 0;
30450
+ if ($util.Long) {
30451
+ var long = new $util.Long(0, 0, true);
30452
+ object.firstBlockTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30453
+ } else
30454
+ object.firstBlockTime = options.longs === String ? "0" : 0;
30455
+ object.feeMultiplier = 0;
30456
+ object.protocolVersion = 0;
30457
+ if ($util.Long) {
30458
+ var long = new $util.Long(0, 0, true);
30459
+ object.totalBlocksInEpoch = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30460
+ } else
30461
+ object.totalBlocksInEpoch = options.longs === String ? "0" : 0;
30462
+ object.nextEpochStartCoreBlockHeight = 0;
30463
+ if ($util.Long) {
30464
+ var long = new $util.Long(0, 0, true);
30465
+ object.totalProcessingFees = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30466
+ } else
30467
+ object.totalProcessingFees = options.longs === String ? "0" : 0;
30468
+ if ($util.Long) {
30469
+ var long = new $util.Long(0, 0, true);
30470
+ object.totalDistributedStorageFees = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30471
+ } else
30472
+ object.totalDistributedStorageFees = options.longs === String ? "0" : 0;
30473
+ if ($util.Long) {
30474
+ var long = new $util.Long(0, 0, true);
30475
+ object.totalCreatedStorageFees = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30476
+ } else
30477
+ object.totalCreatedStorageFees = options.longs === String ? "0" : 0;
30478
+ if ($util.Long) {
30479
+ var long = new $util.Long(0, 0, true);
30480
+ object.coreBlockRewards = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
30481
+ } else
30482
+ object.coreBlockRewards = options.longs === String ? "0" : 0;
30483
+ }
30484
+ if (message.number != null && message.hasOwnProperty("number"))
30485
+ object.number = message.number;
30486
+ if (message.firstBlockHeight != null && message.hasOwnProperty("firstBlockHeight"))
30487
+ if (typeof message.firstBlockHeight === "number")
30488
+ object.firstBlockHeight = options.longs === String ? String(message.firstBlockHeight) : message.firstBlockHeight;
30489
+ else
30490
+ 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;
30491
+ if (message.firstCoreBlockHeight != null && message.hasOwnProperty("firstCoreBlockHeight"))
30492
+ object.firstCoreBlockHeight = message.firstCoreBlockHeight;
30493
+ if (message.firstBlockTime != null && message.hasOwnProperty("firstBlockTime"))
30494
+ if (typeof message.firstBlockTime === "number")
30495
+ object.firstBlockTime = options.longs === String ? String(message.firstBlockTime) : message.firstBlockTime;
30496
+ else
30497
+ 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;
30498
+ if (message.feeMultiplier != null && message.hasOwnProperty("feeMultiplier"))
30499
+ object.feeMultiplier = options.json && !isFinite(message.feeMultiplier) ? String(message.feeMultiplier) : message.feeMultiplier;
30500
+ if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion"))
30501
+ object.protocolVersion = message.protocolVersion;
30502
+ if (message.totalBlocksInEpoch != null && message.hasOwnProperty("totalBlocksInEpoch"))
30503
+ if (typeof message.totalBlocksInEpoch === "number")
30504
+ object.totalBlocksInEpoch = options.longs === String ? String(message.totalBlocksInEpoch) : message.totalBlocksInEpoch;
30505
+ else
30506
+ 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;
30507
+ if (message.nextEpochStartCoreBlockHeight != null && message.hasOwnProperty("nextEpochStartCoreBlockHeight"))
30508
+ object.nextEpochStartCoreBlockHeight = message.nextEpochStartCoreBlockHeight;
30509
+ if (message.totalProcessingFees != null && message.hasOwnProperty("totalProcessingFees"))
30510
+ if (typeof message.totalProcessingFees === "number")
30511
+ object.totalProcessingFees = options.longs === String ? String(message.totalProcessingFees) : message.totalProcessingFees;
30512
+ else
30513
+ 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;
30514
+ if (message.totalDistributedStorageFees != null && message.hasOwnProperty("totalDistributedStorageFees"))
30515
+ if (typeof message.totalDistributedStorageFees === "number")
30516
+ object.totalDistributedStorageFees = options.longs === String ? String(message.totalDistributedStorageFees) : message.totalDistributedStorageFees;
30517
+ else
30518
+ 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;
30519
+ if (message.totalCreatedStorageFees != null && message.hasOwnProperty("totalCreatedStorageFees"))
30520
+ if (typeof message.totalCreatedStorageFees === "number")
30521
+ object.totalCreatedStorageFees = options.longs === String ? String(message.totalCreatedStorageFees) : message.totalCreatedStorageFees;
30522
+ else
30523
+ 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;
30524
+ if (message.coreBlockRewards != null && message.hasOwnProperty("coreBlockRewards"))
30525
+ if (typeof message.coreBlockRewards === "number")
30526
+ object.coreBlockRewards = options.longs === String ? String(message.coreBlockRewards) : message.coreBlockRewards;
30527
+ else
30528
+ 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;
30529
+ if (message.blockProposers && message.blockProposers.length) {
30530
+ object.blockProposers = [];
30531
+ for (var j = 0; j < message.blockProposers.length; ++j)
30532
+ object.blockProposers[j] = $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.toObject(message.blockProposers[j], options);
30533
+ }
30534
+ return object;
30535
+ };
30536
+
30537
+ /**
30538
+ * Converts this FinalizedEpochInfo to JSON.
30539
+ * @function toJSON
30540
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo
30541
+ * @instance
30542
+ * @returns {Object.<string,*>} JSON object
30543
+ */
30544
+ FinalizedEpochInfo.prototype.toJSON = function toJSON() {
30545
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
30546
+ };
30547
+
30548
+ return FinalizedEpochInfo;
30549
+ })();
30550
+
30551
+ GetFinalizedEpochInfosResponseV0.BlockProposer = (function() {
30552
+
30553
+ /**
30554
+ * Properties of a BlockProposer.
30555
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30556
+ * @interface IBlockProposer
30557
+ * @property {Uint8Array|null} [proposerId] BlockProposer proposerId
30558
+ * @property {number|null} [blockCount] BlockProposer blockCount
30559
+ */
30560
+
30561
+ /**
30562
+ * Constructs a new BlockProposer.
30563
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0
30564
+ * @classdesc Represents a BlockProposer.
30565
+ * @implements IBlockProposer
30566
+ * @constructor
30567
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer=} [properties] Properties to set
30568
+ */
30569
+ function BlockProposer(properties) {
30570
+ if (properties)
30571
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
30572
+ if (properties[keys[i]] != null)
30573
+ this[keys[i]] = properties[keys[i]];
30574
+ }
30575
+
30576
+ /**
30577
+ * BlockProposer proposerId.
30578
+ * @member {Uint8Array} proposerId
30579
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30580
+ * @instance
30581
+ */
30582
+ BlockProposer.prototype.proposerId = $util.newBuffer([]);
30583
+
30584
+ /**
30585
+ * BlockProposer blockCount.
30586
+ * @member {number} blockCount
30587
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30588
+ * @instance
30589
+ */
30590
+ BlockProposer.prototype.blockCount = 0;
30591
+
30592
+ /**
30593
+ * Creates a new BlockProposer instance using the specified properties.
30594
+ * @function create
30595
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30596
+ * @static
30597
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer=} [properties] Properties to set
30598
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} BlockProposer instance
30599
+ */
30600
+ BlockProposer.create = function create(properties) {
30601
+ return new BlockProposer(properties);
30602
+ };
30603
+
30604
+ /**
30605
+ * Encodes the specified BlockProposer message. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.verify|verify} messages.
30606
+ * @function encode
30607
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30608
+ * @static
30609
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer} message BlockProposer message or plain object to encode
30610
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30611
+ * @returns {$protobuf.Writer} Writer
30612
+ */
30613
+ BlockProposer.encode = function encode(message, writer) {
30614
+ if (!writer)
30615
+ writer = $Writer.create();
30616
+ if (message.proposerId != null && Object.hasOwnProperty.call(message, "proposerId"))
30617
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.proposerId);
30618
+ if (message.blockCount != null && Object.hasOwnProperty.call(message, "blockCount"))
30619
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.blockCount);
30620
+ return writer;
30621
+ };
30622
+
30623
+ /**
30624
+ * Encodes the specified BlockProposer message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer.verify|verify} messages.
30625
+ * @function encodeDelimited
30626
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30627
+ * @static
30628
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.IBlockProposer} message BlockProposer message or plain object to encode
30629
+ * @param {$protobuf.Writer} [writer] Writer to encode to
30630
+ * @returns {$protobuf.Writer} Writer
30631
+ */
30632
+ BlockProposer.encodeDelimited = function encodeDelimited(message, writer) {
30633
+ return this.encode(message, writer).ldelim();
30634
+ };
30635
+
30636
+ /**
30637
+ * Decodes a BlockProposer message from the specified reader or buffer.
30638
+ * @function decode
30639
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30640
+ * @static
30641
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30642
+ * @param {number} [length] Message length if known beforehand
30643
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} BlockProposer
30644
+ * @throws {Error} If the payload is not a reader or valid buffer
30645
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30646
+ */
30647
+ BlockProposer.decode = function decode(reader, length) {
30648
+ if (!(reader instanceof $Reader))
30649
+ reader = $Reader.create(reader);
30650
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer();
30651
+ while (reader.pos < end) {
30652
+ var tag = reader.uint32();
30653
+ switch (tag >>> 3) {
30654
+ case 1:
30655
+ message.proposerId = reader.bytes();
30656
+ break;
30657
+ case 2:
30658
+ message.blockCount = reader.uint32();
30659
+ break;
30660
+ default:
30661
+ reader.skipType(tag & 7);
30662
+ break;
30663
+ }
30664
+ }
30665
+ return message;
30666
+ };
30667
+
30668
+ /**
30669
+ * Decodes a BlockProposer message from the specified reader or buffer, length delimited.
30670
+ * @function decodeDelimited
30671
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30672
+ * @static
30673
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
30674
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} BlockProposer
30675
+ * @throws {Error} If the payload is not a reader or valid buffer
30676
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30677
+ */
30678
+ BlockProposer.decodeDelimited = function decodeDelimited(reader) {
30679
+ if (!(reader instanceof $Reader))
30680
+ reader = new $Reader(reader);
30681
+ return this.decode(reader, reader.uint32());
30682
+ };
30683
+
30684
+ /**
30685
+ * Verifies a BlockProposer message.
30686
+ * @function verify
30687
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30688
+ * @static
30689
+ * @param {Object.<string,*>} message Plain object to verify
30690
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
30691
+ */
30692
+ BlockProposer.verify = function verify(message) {
30693
+ if (typeof message !== "object" || message === null)
30694
+ return "object expected";
30695
+ if (message.proposerId != null && message.hasOwnProperty("proposerId"))
30696
+ if (!(message.proposerId && typeof message.proposerId.length === "number" || $util.isString(message.proposerId)))
30697
+ return "proposerId: buffer expected";
30698
+ if (message.blockCount != null && message.hasOwnProperty("blockCount"))
30699
+ if (!$util.isInteger(message.blockCount))
30700
+ return "blockCount: integer expected";
30701
+ return null;
30702
+ };
30703
+
30704
+ /**
30705
+ * Creates a BlockProposer message from a plain object. Also converts values to their respective internal types.
30706
+ * @function fromObject
30707
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30708
+ * @static
30709
+ * @param {Object.<string,*>} object Plain object
30710
+ * @returns {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} BlockProposer
30711
+ */
30712
+ BlockProposer.fromObject = function fromObject(object) {
30713
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer)
30714
+ return object;
30715
+ var message = new $root.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer();
30716
+ if (object.proposerId != null)
30717
+ if (typeof object.proposerId === "string")
30718
+ $util.base64.decode(object.proposerId, message.proposerId = $util.newBuffer($util.base64.length(object.proposerId)), 0);
30719
+ else if (object.proposerId.length >= 0)
30720
+ message.proposerId = object.proposerId;
30721
+ if (object.blockCount != null)
30722
+ message.blockCount = object.blockCount >>> 0;
30723
+ return message;
30724
+ };
30725
+
30726
+ /**
30727
+ * Creates a plain object from a BlockProposer message. Also converts values to other types if specified.
30728
+ * @function toObject
30729
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30730
+ * @static
30731
+ * @param {org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer} message BlockProposer
30732
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
30733
+ * @returns {Object.<string,*>} Plain object
30734
+ */
30735
+ BlockProposer.toObject = function toObject(message, options) {
30736
+ if (!options)
30737
+ options = {};
30738
+ var object = {};
30739
+ if (options.defaults) {
30740
+ if (options.bytes === String)
30741
+ object.proposerId = "";
30742
+ else {
30743
+ object.proposerId = [];
30744
+ if (options.bytes !== Array)
30745
+ object.proposerId = $util.newBuffer(object.proposerId);
30746
+ }
30747
+ object.blockCount = 0;
30748
+ }
30749
+ if (message.proposerId != null && message.hasOwnProperty("proposerId"))
30750
+ 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;
30751
+ if (message.blockCount != null && message.hasOwnProperty("blockCount"))
30752
+ object.blockCount = message.blockCount;
30753
+ return object;
30754
+ };
30755
+
30756
+ /**
30757
+ * Converts this BlockProposer to JSON.
30758
+ * @function toJSON
30759
+ * @memberof org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer
30760
+ * @instance
30761
+ * @returns {Object.<string,*>} JSON object
30762
+ */
30763
+ BlockProposer.prototype.toJSON = function toJSON() {
30764
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
30765
+ };
30766
+
30767
+ return BlockProposer;
30768
+ })();
30769
+
30770
+ return GetFinalizedEpochInfosResponseV0;
30771
+ })();
30772
+
30773
+ return GetFinalizedEpochInfosResponse;
30774
+ })();
30775
+
28773
30776
  v0.GetContestedResourcesRequest = (function() {
28774
30777
 
28775
30778
  /**