@dashevo/dapi-grpc 4.2.0-dev.10 → 4.2.0-dev.11

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.
@@ -1023,6 +1023,39 @@ $root.org = (function() {
1023
1023
  * @variation 2
1024
1024
  */
1025
1025
 
1026
+ /**
1027
+ * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDataContractsLatestVersions}.
1028
+ * @memberof org.dash.platform.dapi.v0.Platform
1029
+ * @typedef getDataContractsLatestVersionsCallback
1030
+ * @type {function}
1031
+ * @param {Error|null} error Error, if any
1032
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse} [response] GetDataContractsLatestVersionsResponse
1033
+ */
1034
+
1035
+ /**
1036
+ * Calls getDataContractsLatestVersions.
1037
+ * @function getDataContractsLatestVersions
1038
+ * @memberof org.dash.platform.dapi.v0.Platform
1039
+ * @instance
1040
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsRequest} request GetDataContractsLatestVersionsRequest message or plain object
1041
+ * @param {org.dash.platform.dapi.v0.Platform.getDataContractsLatestVersionsCallback} callback Node-style callback called with the error, if any, and GetDataContractsLatestVersionsResponse
1042
+ * @returns {undefined}
1043
+ * @variation 1
1044
+ */
1045
+ Object.defineProperty(Platform.prototype.getDataContractsLatestVersions = function getDataContractsLatestVersions(request, callback) {
1046
+ return this.rpcCall(getDataContractsLatestVersions, $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest, $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse, request, callback);
1047
+ }, "name", { value: "getDataContractsLatestVersions" });
1048
+
1049
+ /**
1050
+ * Calls getDataContractsLatestVersions.
1051
+ * @function getDataContractsLatestVersions
1052
+ * @memberof org.dash.platform.dapi.v0.Platform
1053
+ * @instance
1054
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsRequest} request GetDataContractsLatestVersionsRequest message or plain object
1055
+ * @returns {Promise<org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse>} Promise
1056
+ * @variation 2
1057
+ */
1058
+
1026
1059
  /**
1027
1060
  * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDataContracts}.
1028
1061
  * @memberof org.dash.platform.dapi.v0.Platform
@@ -1056,6 +1089,39 @@ $root.org = (function() {
1056
1089
  * @variation 2
1057
1090
  */
1058
1091
 
1092
+ /**
1093
+ * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDataContractsByRange}.
1094
+ * @memberof org.dash.platform.dapi.v0.Platform
1095
+ * @typedef getDataContractsByRangeCallback
1096
+ * @type {function}
1097
+ * @param {Error|null} error Error, if any
1098
+ * @param {org.dash.platform.dapi.v0.GetDataContractsResponse} [response] GetDataContractsResponse
1099
+ */
1100
+
1101
+ /**
1102
+ * Calls getDataContractsByRange.
1103
+ * @function getDataContractsByRange
1104
+ * @memberof org.dash.platform.dapi.v0.Platform
1105
+ * @instance
1106
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsByRangeRequest} request GetDataContractsByRangeRequest message or plain object
1107
+ * @param {org.dash.platform.dapi.v0.Platform.getDataContractsByRangeCallback} callback Node-style callback called with the error, if any, and GetDataContractsResponse
1108
+ * @returns {undefined}
1109
+ * @variation 1
1110
+ */
1111
+ Object.defineProperty(Platform.prototype.getDataContractsByRange = function getDataContractsByRange(request, callback) {
1112
+ return this.rpcCall(getDataContractsByRange, $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest, $root.org.dash.platform.dapi.v0.GetDataContractsResponse, request, callback);
1113
+ }, "name", { value: "getDataContractsByRange" });
1114
+
1115
+ /**
1116
+ * Calls getDataContractsByRange.
1117
+ * @function getDataContractsByRange
1118
+ * @memberof org.dash.platform.dapi.v0.Platform
1119
+ * @instance
1120
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsByRangeRequest} request GetDataContractsByRangeRequest message or plain object
1121
+ * @returns {Promise<org.dash.platform.dapi.v0.GetDataContractsResponse>} Promise
1122
+ * @variation 2
1123
+ */
1124
+
1059
1125
  /**
1060
1126
  * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDocumentHistory}.
1061
1127
  * @memberof org.dash.platform.dapi.v0.Platform
@@ -16981,24 +17047,24 @@ $root.org = (function() {
16981
17047
  return GetDataContractResponse;
16982
17048
  })();
16983
17049
 
16984
- v0.GetDataContractsRequest = (function() {
17050
+ v0.GetDataContractsLatestVersionsRequest = (function() {
16985
17051
 
16986
17052
  /**
16987
- * Properties of a GetDataContractsRequest.
17053
+ * Properties of a GetDataContractsLatestVersionsRequest.
16988
17054
  * @memberof org.dash.platform.dapi.v0
16989
- * @interface IGetDataContractsRequest
16990
- * @property {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0|null} [v0] GetDataContractsRequest v0
17055
+ * @interface IGetDataContractsLatestVersionsRequest
17056
+ * @property {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.IGetDataContractsLatestVersionsRequestV0|null} [v0] GetDataContractsLatestVersionsRequest v0
16991
17057
  */
16992
17058
 
16993
17059
  /**
16994
- * Constructs a new GetDataContractsRequest.
17060
+ * Constructs a new GetDataContractsLatestVersionsRequest.
16995
17061
  * @memberof org.dash.platform.dapi.v0
16996
- * @classdesc Represents a GetDataContractsRequest.
16997
- * @implements IGetDataContractsRequest
17062
+ * @classdesc Represents a GetDataContractsLatestVersionsRequest.
17063
+ * @implements IGetDataContractsLatestVersionsRequest
16998
17064
  * @constructor
16999
- * @param {org.dash.platform.dapi.v0.IGetDataContractsRequest=} [properties] Properties to set
17065
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsRequest=} [properties] Properties to set
17000
17066
  */
17001
- function GetDataContractsRequest(properties) {
17067
+ function GetDataContractsLatestVersionsRequest(properties) {
17002
17068
  if (properties)
17003
17069
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
17004
17070
  if (properties[keys[i]] != null)
@@ -17006,89 +17072,89 @@ $root.org = (function() {
17006
17072
  }
17007
17073
 
17008
17074
  /**
17009
- * GetDataContractsRequest v0.
17010
- * @member {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0|null|undefined} v0
17011
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17075
+ * GetDataContractsLatestVersionsRequest v0.
17076
+ * @member {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.IGetDataContractsLatestVersionsRequestV0|null|undefined} v0
17077
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17012
17078
  * @instance
17013
17079
  */
17014
- GetDataContractsRequest.prototype.v0 = null;
17080
+ GetDataContractsLatestVersionsRequest.prototype.v0 = null;
17015
17081
 
17016
17082
  // OneOf field names bound to virtual getters and setters
17017
17083
  var $oneOfFields;
17018
17084
 
17019
17085
  /**
17020
- * GetDataContractsRequest version.
17086
+ * GetDataContractsLatestVersionsRequest version.
17021
17087
  * @member {"v0"|undefined} version
17022
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17088
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17023
17089
  * @instance
17024
17090
  */
17025
- Object.defineProperty(GetDataContractsRequest.prototype, "version", {
17091
+ Object.defineProperty(GetDataContractsLatestVersionsRequest.prototype, "version", {
17026
17092
  get: $util.oneOfGetter($oneOfFields = ["v0"]),
17027
17093
  set: $util.oneOfSetter($oneOfFields)
17028
17094
  });
17029
17095
 
17030
17096
  /**
17031
- * Creates a new GetDataContractsRequest instance using the specified properties.
17097
+ * Creates a new GetDataContractsLatestVersionsRequest instance using the specified properties.
17032
17098
  * @function create
17033
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17099
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17034
17100
  * @static
17035
- * @param {org.dash.platform.dapi.v0.IGetDataContractsRequest=} [properties] Properties to set
17036
- * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest} GetDataContractsRequest instance
17101
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsRequest=} [properties] Properties to set
17102
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest} GetDataContractsLatestVersionsRequest instance
17037
17103
  */
17038
- GetDataContractsRequest.create = function create(properties) {
17039
- return new GetDataContractsRequest(properties);
17104
+ GetDataContractsLatestVersionsRequest.create = function create(properties) {
17105
+ return new GetDataContractsLatestVersionsRequest(properties);
17040
17106
  };
17041
17107
 
17042
17108
  /**
17043
- * Encodes the specified GetDataContractsRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsRequest.verify|verify} messages.
17109
+ * Encodes the specified GetDataContractsLatestVersionsRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.verify|verify} messages.
17044
17110
  * @function encode
17045
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17111
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17046
17112
  * @static
17047
- * @param {org.dash.platform.dapi.v0.IGetDataContractsRequest} message GetDataContractsRequest message or plain object to encode
17113
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsRequest} message GetDataContractsLatestVersionsRequest message or plain object to encode
17048
17114
  * @param {$protobuf.Writer} [writer] Writer to encode to
17049
17115
  * @returns {$protobuf.Writer} Writer
17050
17116
  */
17051
- GetDataContractsRequest.encode = function encode(message, writer) {
17117
+ GetDataContractsLatestVersionsRequest.encode = function encode(message, writer) {
17052
17118
  if (!writer)
17053
17119
  writer = $Writer.create();
17054
17120
  if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
17055
- $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
17121
+ $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
17056
17122
  return writer;
17057
17123
  };
17058
17124
 
17059
17125
  /**
17060
- * Encodes the specified GetDataContractsRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsRequest.verify|verify} messages.
17126
+ * Encodes the specified GetDataContractsLatestVersionsRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.verify|verify} messages.
17061
17127
  * @function encodeDelimited
17062
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17128
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17063
17129
  * @static
17064
- * @param {org.dash.platform.dapi.v0.IGetDataContractsRequest} message GetDataContractsRequest message or plain object to encode
17130
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsRequest} message GetDataContractsLatestVersionsRequest message or plain object to encode
17065
17131
  * @param {$protobuf.Writer} [writer] Writer to encode to
17066
17132
  * @returns {$protobuf.Writer} Writer
17067
17133
  */
17068
- GetDataContractsRequest.encodeDelimited = function encodeDelimited(message, writer) {
17134
+ GetDataContractsLatestVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) {
17069
17135
  return this.encode(message, writer).ldelim();
17070
17136
  };
17071
17137
 
17072
17138
  /**
17073
- * Decodes a GetDataContractsRequest message from the specified reader or buffer.
17139
+ * Decodes a GetDataContractsLatestVersionsRequest message from the specified reader or buffer.
17074
17140
  * @function decode
17075
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17141
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17076
17142
  * @static
17077
17143
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17078
17144
  * @param {number} [length] Message length if known beforehand
17079
- * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest} GetDataContractsRequest
17145
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest} GetDataContractsLatestVersionsRequest
17080
17146
  * @throws {Error} If the payload is not a reader or valid buffer
17081
17147
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
17082
17148
  */
17083
- GetDataContractsRequest.decode = function decode(reader, length) {
17149
+ GetDataContractsLatestVersionsRequest.decode = function decode(reader, length) {
17084
17150
  if (!(reader instanceof $Reader))
17085
17151
  reader = $Reader.create(reader);
17086
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsRequest();
17152
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest();
17087
17153
  while (reader.pos < end) {
17088
17154
  var tag = reader.uint32();
17089
17155
  switch (tag >>> 3) {
17090
17156
  case 1:
17091
- message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.decode(reader, reader.uint32());
17157
+ message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0.decode(reader, reader.uint32());
17092
17158
  break;
17093
17159
  default:
17094
17160
  reader.skipType(tag & 7);
@@ -17099,37 +17165,37 @@ $root.org = (function() {
17099
17165
  };
17100
17166
 
17101
17167
  /**
17102
- * Decodes a GetDataContractsRequest message from the specified reader or buffer, length delimited.
17168
+ * Decodes a GetDataContractsLatestVersionsRequest message from the specified reader or buffer, length delimited.
17103
17169
  * @function decodeDelimited
17104
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17170
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17105
17171
  * @static
17106
17172
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17107
- * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest} GetDataContractsRequest
17173
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest} GetDataContractsLatestVersionsRequest
17108
17174
  * @throws {Error} If the payload is not a reader or valid buffer
17109
17175
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
17110
17176
  */
17111
- GetDataContractsRequest.decodeDelimited = function decodeDelimited(reader) {
17177
+ GetDataContractsLatestVersionsRequest.decodeDelimited = function decodeDelimited(reader) {
17112
17178
  if (!(reader instanceof $Reader))
17113
17179
  reader = new $Reader(reader);
17114
17180
  return this.decode(reader, reader.uint32());
17115
17181
  };
17116
17182
 
17117
17183
  /**
17118
- * Verifies a GetDataContractsRequest message.
17184
+ * Verifies a GetDataContractsLatestVersionsRequest message.
17119
17185
  * @function verify
17120
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17186
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17121
17187
  * @static
17122
17188
  * @param {Object.<string,*>} message Plain object to verify
17123
17189
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
17124
17190
  */
17125
- GetDataContractsRequest.verify = function verify(message) {
17191
+ GetDataContractsLatestVersionsRequest.verify = function verify(message) {
17126
17192
  if (typeof message !== "object" || message === null)
17127
17193
  return "object expected";
17128
17194
  var properties = {};
17129
17195
  if (message.v0 != null && message.hasOwnProperty("v0")) {
17130
17196
  properties.version = 1;
17131
17197
  {
17132
- var error = $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.verify(message.v0);
17198
+ var error = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0.verify(message.v0);
17133
17199
  if (error)
17134
17200
  return "v0." + error;
17135
17201
  }
@@ -17138,40 +17204,40 @@ $root.org = (function() {
17138
17204
  };
17139
17205
 
17140
17206
  /**
17141
- * Creates a GetDataContractsRequest message from a plain object. Also converts values to their respective internal types.
17207
+ * Creates a GetDataContractsLatestVersionsRequest message from a plain object. Also converts values to their respective internal types.
17142
17208
  * @function fromObject
17143
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17209
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17144
17210
  * @static
17145
17211
  * @param {Object.<string,*>} object Plain object
17146
- * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest} GetDataContractsRequest
17212
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest} GetDataContractsLatestVersionsRequest
17147
17213
  */
17148
- GetDataContractsRequest.fromObject = function fromObject(object) {
17149
- if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsRequest)
17214
+ GetDataContractsLatestVersionsRequest.fromObject = function fromObject(object) {
17215
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest)
17150
17216
  return object;
17151
- var message = new $root.org.dash.platform.dapi.v0.GetDataContractsRequest();
17217
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest();
17152
17218
  if (object.v0 != null) {
17153
17219
  if (typeof object.v0 !== "object")
17154
- throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsRequest.v0: object expected");
17155
- message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.fromObject(object.v0);
17220
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.v0: object expected");
17221
+ message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0.fromObject(object.v0);
17156
17222
  }
17157
17223
  return message;
17158
17224
  };
17159
17225
 
17160
17226
  /**
17161
- * Creates a plain object from a GetDataContractsRequest message. Also converts values to other types if specified.
17227
+ * Creates a plain object from a GetDataContractsLatestVersionsRequest message. Also converts values to other types if specified.
17162
17228
  * @function toObject
17163
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17229
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17164
17230
  * @static
17165
- * @param {org.dash.platform.dapi.v0.GetDataContractsRequest} message GetDataContractsRequest
17231
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest} message GetDataContractsLatestVersionsRequest
17166
17232
  * @param {$protobuf.IConversionOptions} [options] Conversion options
17167
17233
  * @returns {Object.<string,*>} Plain object
17168
17234
  */
17169
- GetDataContractsRequest.toObject = function toObject(message, options) {
17235
+ GetDataContractsLatestVersionsRequest.toObject = function toObject(message, options) {
17170
17236
  if (!options)
17171
17237
  options = {};
17172
17238
  var object = {};
17173
17239
  if (message.v0 != null && message.hasOwnProperty("v0")) {
17174
- object.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject(message.v0, options);
17240
+ object.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0.toObject(message.v0, options);
17175
17241
  if (options.oneofs)
17176
17242
  object.version = "v0";
17177
17243
  }
@@ -17179,35 +17245,36 @@ $root.org = (function() {
17179
17245
  };
17180
17246
 
17181
17247
  /**
17182
- * Converts this GetDataContractsRequest to JSON.
17248
+ * Converts this GetDataContractsLatestVersionsRequest to JSON.
17183
17249
  * @function toJSON
17184
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17250
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17185
17251
  * @instance
17186
17252
  * @returns {Object.<string,*>} JSON object
17187
17253
  */
17188
- GetDataContractsRequest.prototype.toJSON = function toJSON() {
17254
+ GetDataContractsLatestVersionsRequest.prototype.toJSON = function toJSON() {
17189
17255
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
17190
17256
  };
17191
17257
 
17192
- GetDataContractsRequest.GetDataContractsRequestV0 = (function() {
17258
+ GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0 = (function() {
17193
17259
 
17194
17260
  /**
17195
- * Properties of a GetDataContractsRequestV0.
17196
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17197
- * @interface IGetDataContractsRequestV0
17198
- * @property {Array.<Uint8Array>|null} [ids] GetDataContractsRequestV0 ids
17199
- * @property {boolean|null} [prove] GetDataContractsRequestV0 prove
17261
+ * Properties of a GetDataContractsLatestVersionsRequestV0.
17262
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17263
+ * @interface IGetDataContractsLatestVersionsRequestV0
17264
+ * @property {Array.<Uint8Array>|null} [ids] GetDataContractsLatestVersionsRequestV0 ids
17265
+ * @property {boolean|null} [includeContracts] GetDataContractsLatestVersionsRequestV0 includeContracts
17266
+ * @property {boolean|null} [prove] GetDataContractsLatestVersionsRequestV0 prove
17200
17267
  */
17201
17268
 
17202
17269
  /**
17203
- * Constructs a new GetDataContractsRequestV0.
17204
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
17205
- * @classdesc Represents a GetDataContractsRequestV0.
17206
- * @implements IGetDataContractsRequestV0
17270
+ * Constructs a new GetDataContractsLatestVersionsRequestV0.
17271
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest
17272
+ * @classdesc Represents a GetDataContractsLatestVersionsRequestV0.
17273
+ * @implements IGetDataContractsLatestVersionsRequestV0
17207
17274
  * @constructor
17208
- * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0=} [properties] Properties to set
17275
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.IGetDataContractsLatestVersionsRequestV0=} [properties] Properties to set
17209
17276
  */
17210
- function GetDataContractsRequestV0(properties) {
17277
+ function GetDataContractsLatestVersionsRequestV0(properties) {
17211
17278
  this.ids = [];
17212
17279
  if (properties)
17213
17280
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -17216,81 +17283,91 @@ $root.org = (function() {
17216
17283
  }
17217
17284
 
17218
17285
  /**
17219
- * GetDataContractsRequestV0 ids.
17286
+ * GetDataContractsLatestVersionsRequestV0 ids.
17220
17287
  * @member {Array.<Uint8Array>} ids
17221
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17288
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17222
17289
  * @instance
17223
17290
  */
17224
- GetDataContractsRequestV0.prototype.ids = $util.emptyArray;
17291
+ GetDataContractsLatestVersionsRequestV0.prototype.ids = $util.emptyArray;
17225
17292
 
17226
17293
  /**
17227
- * GetDataContractsRequestV0 prove.
17294
+ * GetDataContractsLatestVersionsRequestV0 includeContracts.
17295
+ * @member {boolean} includeContracts
17296
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17297
+ * @instance
17298
+ */
17299
+ GetDataContractsLatestVersionsRequestV0.prototype.includeContracts = false;
17300
+
17301
+ /**
17302
+ * GetDataContractsLatestVersionsRequestV0 prove.
17228
17303
  * @member {boolean} prove
17229
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17304
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17230
17305
  * @instance
17231
17306
  */
17232
- GetDataContractsRequestV0.prototype.prove = false;
17307
+ GetDataContractsLatestVersionsRequestV0.prototype.prove = false;
17233
17308
 
17234
17309
  /**
17235
- * Creates a new GetDataContractsRequestV0 instance using the specified properties.
17310
+ * Creates a new GetDataContractsLatestVersionsRequestV0 instance using the specified properties.
17236
17311
  * @function create
17237
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17312
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17238
17313
  * @static
17239
- * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0=} [properties] Properties to set
17240
- * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} GetDataContractsRequestV0 instance
17314
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.IGetDataContractsLatestVersionsRequestV0=} [properties] Properties to set
17315
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0} GetDataContractsLatestVersionsRequestV0 instance
17241
17316
  */
17242
- GetDataContractsRequestV0.create = function create(properties) {
17243
- return new GetDataContractsRequestV0(properties);
17317
+ GetDataContractsLatestVersionsRequestV0.create = function create(properties) {
17318
+ return new GetDataContractsLatestVersionsRequestV0(properties);
17244
17319
  };
17245
17320
 
17246
17321
  /**
17247
- * Encodes the specified GetDataContractsRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.verify|verify} messages.
17322
+ * Encodes the specified GetDataContractsLatestVersionsRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0.verify|verify} messages.
17248
17323
  * @function encode
17249
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17324
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17250
17325
  * @static
17251
- * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0} message GetDataContractsRequestV0 message or plain object to encode
17326
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.IGetDataContractsLatestVersionsRequestV0} message GetDataContractsLatestVersionsRequestV0 message or plain object to encode
17252
17327
  * @param {$protobuf.Writer} [writer] Writer to encode to
17253
17328
  * @returns {$protobuf.Writer} Writer
17254
17329
  */
17255
- GetDataContractsRequestV0.encode = function encode(message, writer) {
17330
+ GetDataContractsLatestVersionsRequestV0.encode = function encode(message, writer) {
17256
17331
  if (!writer)
17257
17332
  writer = $Writer.create();
17258
17333
  if (message.ids != null && message.ids.length)
17259
17334
  for (var i = 0; i < message.ids.length; ++i)
17260
17335
  writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ids[i]);
17336
+ if (message.includeContracts != null && Object.hasOwnProperty.call(message, "includeContracts"))
17337
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeContracts);
17261
17338
  if (message.prove != null && Object.hasOwnProperty.call(message, "prove"))
17262
- writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove);
17339
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.prove);
17263
17340
  return writer;
17264
17341
  };
17265
17342
 
17266
17343
  /**
17267
- * Encodes the specified GetDataContractsRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.verify|verify} messages.
17344
+ * Encodes the specified GetDataContractsLatestVersionsRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0.verify|verify} messages.
17268
17345
  * @function encodeDelimited
17269
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17346
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17270
17347
  * @static
17271
- * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0} message GetDataContractsRequestV0 message or plain object to encode
17348
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.IGetDataContractsLatestVersionsRequestV0} message GetDataContractsLatestVersionsRequestV0 message or plain object to encode
17272
17349
  * @param {$protobuf.Writer} [writer] Writer to encode to
17273
17350
  * @returns {$protobuf.Writer} Writer
17274
17351
  */
17275
- GetDataContractsRequestV0.encodeDelimited = function encodeDelimited(message, writer) {
17352
+ GetDataContractsLatestVersionsRequestV0.encodeDelimited = function encodeDelimited(message, writer) {
17276
17353
  return this.encode(message, writer).ldelim();
17277
17354
  };
17278
17355
 
17279
17356
  /**
17280
- * Decodes a GetDataContractsRequestV0 message from the specified reader or buffer.
17357
+ * Decodes a GetDataContractsLatestVersionsRequestV0 message from the specified reader or buffer.
17281
17358
  * @function decode
17282
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17359
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17283
17360
  * @static
17284
17361
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17285
17362
  * @param {number} [length] Message length if known beforehand
17286
- * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} GetDataContractsRequestV0
17363
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0} GetDataContractsLatestVersionsRequestV0
17287
17364
  * @throws {Error} If the payload is not a reader or valid buffer
17288
17365
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
17289
17366
  */
17290
- GetDataContractsRequestV0.decode = function decode(reader, length) {
17367
+ GetDataContractsLatestVersionsRequestV0.decode = function decode(reader, length) {
17291
17368
  if (!(reader instanceof $Reader))
17292
17369
  reader = $Reader.create(reader);
17293
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0();
17370
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0();
17294
17371
  while (reader.pos < end) {
17295
17372
  var tag = reader.uint32();
17296
17373
  switch (tag >>> 3) {
@@ -17300,6 +17377,9 @@ $root.org = (function() {
17300
17377
  message.ids.push(reader.bytes());
17301
17378
  break;
17302
17379
  case 2:
17380
+ message.includeContracts = reader.bool();
17381
+ break;
17382
+ case 3:
17303
17383
  message.prove = reader.bool();
17304
17384
  break;
17305
17385
  default:
@@ -17311,30 +17391,30 @@ $root.org = (function() {
17311
17391
  };
17312
17392
 
17313
17393
  /**
17314
- * Decodes a GetDataContractsRequestV0 message from the specified reader or buffer, length delimited.
17394
+ * Decodes a GetDataContractsLatestVersionsRequestV0 message from the specified reader or buffer, length delimited.
17315
17395
  * @function decodeDelimited
17316
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17396
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17317
17397
  * @static
17318
17398
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17319
- * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} GetDataContractsRequestV0
17399
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0} GetDataContractsLatestVersionsRequestV0
17320
17400
  * @throws {Error} If the payload is not a reader or valid buffer
17321
17401
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
17322
17402
  */
17323
- GetDataContractsRequestV0.decodeDelimited = function decodeDelimited(reader) {
17403
+ GetDataContractsLatestVersionsRequestV0.decodeDelimited = function decodeDelimited(reader) {
17324
17404
  if (!(reader instanceof $Reader))
17325
17405
  reader = new $Reader(reader);
17326
17406
  return this.decode(reader, reader.uint32());
17327
17407
  };
17328
17408
 
17329
17409
  /**
17330
- * Verifies a GetDataContractsRequestV0 message.
17410
+ * Verifies a GetDataContractsLatestVersionsRequestV0 message.
17331
17411
  * @function verify
17332
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17412
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17333
17413
  * @static
17334
17414
  * @param {Object.<string,*>} message Plain object to verify
17335
17415
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
17336
17416
  */
17337
- GetDataContractsRequestV0.verify = function verify(message) {
17417
+ GetDataContractsLatestVersionsRequestV0.verify = function verify(message) {
17338
17418
  if (typeof message !== "object" || message === null)
17339
17419
  return "object expected";
17340
17420
  if (message.ids != null && message.hasOwnProperty("ids")) {
@@ -17344,6 +17424,9 @@ $root.org = (function() {
17344
17424
  if (!(message.ids[i] && typeof message.ids[i].length === "number" || $util.isString(message.ids[i])))
17345
17425
  return "ids: buffer[] expected";
17346
17426
  }
17427
+ if (message.includeContracts != null && message.hasOwnProperty("includeContracts"))
17428
+ if (typeof message.includeContracts !== "boolean")
17429
+ return "includeContracts: boolean expected";
17347
17430
  if (message.prove != null && message.hasOwnProperty("prove"))
17348
17431
  if (typeof message.prove !== "boolean")
17349
17432
  return "prove: boolean expected";
@@ -17351,20 +17434,20 @@ $root.org = (function() {
17351
17434
  };
17352
17435
 
17353
17436
  /**
17354
- * Creates a GetDataContractsRequestV0 message from a plain object. Also converts values to their respective internal types.
17437
+ * Creates a GetDataContractsLatestVersionsRequestV0 message from a plain object. Also converts values to their respective internal types.
17355
17438
  * @function fromObject
17356
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17439
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17357
17440
  * @static
17358
17441
  * @param {Object.<string,*>} object Plain object
17359
- * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} GetDataContractsRequestV0
17442
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0} GetDataContractsLatestVersionsRequestV0
17360
17443
  */
17361
- GetDataContractsRequestV0.fromObject = function fromObject(object) {
17362
- if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0)
17444
+ GetDataContractsLatestVersionsRequestV0.fromObject = function fromObject(object) {
17445
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0)
17363
17446
  return object;
17364
- var message = new $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0();
17447
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0();
17365
17448
  if (object.ids) {
17366
17449
  if (!Array.isArray(object.ids))
17367
- throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.ids: array expected");
17450
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0.ids: array expected");
17368
17451
  message.ids = [];
17369
17452
  for (var i = 0; i < object.ids.length; ++i)
17370
17453
  if (typeof object.ids[i] === "string")
@@ -17372,53 +17455,1959 @@ $root.org = (function() {
17372
17455
  else if (object.ids[i].length >= 0)
17373
17456
  message.ids[i] = object.ids[i];
17374
17457
  }
17458
+ if (object.includeContracts != null)
17459
+ message.includeContracts = Boolean(object.includeContracts);
17375
17460
  if (object.prove != null)
17376
17461
  message.prove = Boolean(object.prove);
17377
17462
  return message;
17378
17463
  };
17379
17464
 
17380
17465
  /**
17381
- * Creates a plain object from a GetDataContractsRequestV0 message. Also converts values to other types if specified.
17466
+ * Creates a plain object from a GetDataContractsLatestVersionsRequestV0 message. Also converts values to other types if specified.
17382
17467
  * @function toObject
17383
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17468
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17384
17469
  * @static
17385
- * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} message GetDataContractsRequestV0
17470
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0} message GetDataContractsLatestVersionsRequestV0
17386
17471
  * @param {$protobuf.IConversionOptions} [options] Conversion options
17387
17472
  * @returns {Object.<string,*>} Plain object
17388
17473
  */
17389
- GetDataContractsRequestV0.toObject = function toObject(message, options) {
17474
+ GetDataContractsLatestVersionsRequestV0.toObject = function toObject(message, options) {
17390
17475
  if (!options)
17391
17476
  options = {};
17392
17477
  var object = {};
17393
17478
  if (options.arrays || options.defaults)
17394
17479
  object.ids = [];
17395
- if (options.defaults)
17480
+ if (options.defaults) {
17481
+ object.includeContracts = false;
17396
17482
  object.prove = false;
17483
+ }
17397
17484
  if (message.ids && message.ids.length) {
17398
17485
  object.ids = [];
17399
17486
  for (var j = 0; j < message.ids.length; ++j)
17400
17487
  object.ids[j] = options.bytes === String ? $util.base64.encode(message.ids[j], 0, message.ids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.ids[j]) : message.ids[j];
17401
17488
  }
17489
+ if (message.includeContracts != null && message.hasOwnProperty("includeContracts"))
17490
+ object.includeContracts = message.includeContracts;
17402
17491
  if (message.prove != null && message.hasOwnProperty("prove"))
17403
17492
  object.prove = message.prove;
17404
17493
  return object;
17405
17494
  };
17406
17495
 
17407
17496
  /**
17408
- * Converts this GetDataContractsRequestV0 to JSON.
17497
+ * Converts this GetDataContractsLatestVersionsRequestV0 to JSON.
17409
17498
  * @function toJSON
17410
- * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
17499
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsRequest.GetDataContractsLatestVersionsRequestV0
17411
17500
  * @instance
17412
17501
  * @returns {Object.<string,*>} JSON object
17413
17502
  */
17414
- GetDataContractsRequestV0.prototype.toJSON = function toJSON() {
17503
+ GetDataContractsLatestVersionsRequestV0.prototype.toJSON = function toJSON() {
17415
17504
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
17416
17505
  };
17417
17506
 
17418
- return GetDataContractsRequestV0;
17507
+ return GetDataContractsLatestVersionsRequestV0;
17419
17508
  })();
17420
17509
 
17421
- return GetDataContractsRequest;
17510
+ return GetDataContractsLatestVersionsRequest;
17511
+ })();
17512
+
17513
+ v0.GetDataContractsLatestVersionsResponse = (function() {
17514
+
17515
+ /**
17516
+ * Properties of a GetDataContractsLatestVersionsResponse.
17517
+ * @memberof org.dash.platform.dapi.v0
17518
+ * @interface IGetDataContractsLatestVersionsResponse
17519
+ * @property {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IGetDataContractsLatestVersionsResponseV0|null} [v0] GetDataContractsLatestVersionsResponse v0
17520
+ */
17521
+
17522
+ /**
17523
+ * Constructs a new GetDataContractsLatestVersionsResponse.
17524
+ * @memberof org.dash.platform.dapi.v0
17525
+ * @classdesc Represents a GetDataContractsLatestVersionsResponse.
17526
+ * @implements IGetDataContractsLatestVersionsResponse
17527
+ * @constructor
17528
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsResponse=} [properties] Properties to set
17529
+ */
17530
+ function GetDataContractsLatestVersionsResponse(properties) {
17531
+ if (properties)
17532
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
17533
+ if (properties[keys[i]] != null)
17534
+ this[keys[i]] = properties[keys[i]];
17535
+ }
17536
+
17537
+ /**
17538
+ * GetDataContractsLatestVersionsResponse v0.
17539
+ * @member {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IGetDataContractsLatestVersionsResponseV0|null|undefined} v0
17540
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17541
+ * @instance
17542
+ */
17543
+ GetDataContractsLatestVersionsResponse.prototype.v0 = null;
17544
+
17545
+ // OneOf field names bound to virtual getters and setters
17546
+ var $oneOfFields;
17547
+
17548
+ /**
17549
+ * GetDataContractsLatestVersionsResponse version.
17550
+ * @member {"v0"|undefined} version
17551
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17552
+ * @instance
17553
+ */
17554
+ Object.defineProperty(GetDataContractsLatestVersionsResponse.prototype, "version", {
17555
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
17556
+ set: $util.oneOfSetter($oneOfFields)
17557
+ });
17558
+
17559
+ /**
17560
+ * Creates a new GetDataContractsLatestVersionsResponse instance using the specified properties.
17561
+ * @function create
17562
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17563
+ * @static
17564
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsResponse=} [properties] Properties to set
17565
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse} GetDataContractsLatestVersionsResponse instance
17566
+ */
17567
+ GetDataContractsLatestVersionsResponse.create = function create(properties) {
17568
+ return new GetDataContractsLatestVersionsResponse(properties);
17569
+ };
17570
+
17571
+ /**
17572
+ * Encodes the specified GetDataContractsLatestVersionsResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.verify|verify} messages.
17573
+ * @function encode
17574
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17575
+ * @static
17576
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsResponse} message GetDataContractsLatestVersionsResponse message or plain object to encode
17577
+ * @param {$protobuf.Writer} [writer] Writer to encode to
17578
+ * @returns {$protobuf.Writer} Writer
17579
+ */
17580
+ GetDataContractsLatestVersionsResponse.encode = function encode(message, writer) {
17581
+ if (!writer)
17582
+ writer = $Writer.create();
17583
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
17584
+ $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
17585
+ return writer;
17586
+ };
17587
+
17588
+ /**
17589
+ * Encodes the specified GetDataContractsLatestVersionsResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.verify|verify} messages.
17590
+ * @function encodeDelimited
17591
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17592
+ * @static
17593
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsLatestVersionsResponse} message GetDataContractsLatestVersionsResponse message or plain object to encode
17594
+ * @param {$protobuf.Writer} [writer] Writer to encode to
17595
+ * @returns {$protobuf.Writer} Writer
17596
+ */
17597
+ GetDataContractsLatestVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) {
17598
+ return this.encode(message, writer).ldelim();
17599
+ };
17600
+
17601
+ /**
17602
+ * Decodes a GetDataContractsLatestVersionsResponse message from the specified reader or buffer.
17603
+ * @function decode
17604
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17605
+ * @static
17606
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17607
+ * @param {number} [length] Message length if known beforehand
17608
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse} GetDataContractsLatestVersionsResponse
17609
+ * @throws {Error} If the payload is not a reader or valid buffer
17610
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
17611
+ */
17612
+ GetDataContractsLatestVersionsResponse.decode = function decode(reader, length) {
17613
+ if (!(reader instanceof $Reader))
17614
+ reader = $Reader.create(reader);
17615
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse();
17616
+ while (reader.pos < end) {
17617
+ var tag = reader.uint32();
17618
+ switch (tag >>> 3) {
17619
+ case 1:
17620
+ message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.decode(reader, reader.uint32());
17621
+ break;
17622
+ default:
17623
+ reader.skipType(tag & 7);
17624
+ break;
17625
+ }
17626
+ }
17627
+ return message;
17628
+ };
17629
+
17630
+ /**
17631
+ * Decodes a GetDataContractsLatestVersionsResponse message from the specified reader or buffer, length delimited.
17632
+ * @function decodeDelimited
17633
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17634
+ * @static
17635
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17636
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse} GetDataContractsLatestVersionsResponse
17637
+ * @throws {Error} If the payload is not a reader or valid buffer
17638
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
17639
+ */
17640
+ GetDataContractsLatestVersionsResponse.decodeDelimited = function decodeDelimited(reader) {
17641
+ if (!(reader instanceof $Reader))
17642
+ reader = new $Reader(reader);
17643
+ return this.decode(reader, reader.uint32());
17644
+ };
17645
+
17646
+ /**
17647
+ * Verifies a GetDataContractsLatestVersionsResponse message.
17648
+ * @function verify
17649
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17650
+ * @static
17651
+ * @param {Object.<string,*>} message Plain object to verify
17652
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
17653
+ */
17654
+ GetDataContractsLatestVersionsResponse.verify = function verify(message) {
17655
+ if (typeof message !== "object" || message === null)
17656
+ return "object expected";
17657
+ var properties = {};
17658
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
17659
+ properties.version = 1;
17660
+ {
17661
+ var error = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.verify(message.v0);
17662
+ if (error)
17663
+ return "v0." + error;
17664
+ }
17665
+ }
17666
+ return null;
17667
+ };
17668
+
17669
+ /**
17670
+ * Creates a GetDataContractsLatestVersionsResponse message from a plain object. Also converts values to their respective internal types.
17671
+ * @function fromObject
17672
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17673
+ * @static
17674
+ * @param {Object.<string,*>} object Plain object
17675
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse} GetDataContractsLatestVersionsResponse
17676
+ */
17677
+ GetDataContractsLatestVersionsResponse.fromObject = function fromObject(object) {
17678
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse)
17679
+ return object;
17680
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse();
17681
+ if (object.v0 != null) {
17682
+ if (typeof object.v0 !== "object")
17683
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.v0: object expected");
17684
+ message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.fromObject(object.v0);
17685
+ }
17686
+ return message;
17687
+ };
17688
+
17689
+ /**
17690
+ * Creates a plain object from a GetDataContractsLatestVersionsResponse message. Also converts values to other types if specified.
17691
+ * @function toObject
17692
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17693
+ * @static
17694
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse} message GetDataContractsLatestVersionsResponse
17695
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
17696
+ * @returns {Object.<string,*>} Plain object
17697
+ */
17698
+ GetDataContractsLatestVersionsResponse.toObject = function toObject(message, options) {
17699
+ if (!options)
17700
+ options = {};
17701
+ var object = {};
17702
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
17703
+ object.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.toObject(message.v0, options);
17704
+ if (options.oneofs)
17705
+ object.version = "v0";
17706
+ }
17707
+ return object;
17708
+ };
17709
+
17710
+ /**
17711
+ * Converts this GetDataContractsLatestVersionsResponse to JSON.
17712
+ * @function toJSON
17713
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17714
+ * @instance
17715
+ * @returns {Object.<string,*>} JSON object
17716
+ */
17717
+ GetDataContractsLatestVersionsResponse.prototype.toJSON = function toJSON() {
17718
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
17719
+ };
17720
+
17721
+ GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry = (function() {
17722
+
17723
+ /**
17724
+ * Properties of a DataContractLatestVersionEntry.
17725
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17726
+ * @interface IDataContractLatestVersionEntry
17727
+ * @property {Uint8Array|null} [identifier] DataContractLatestVersionEntry identifier
17728
+ * @property {number|null} [version] DataContractLatestVersionEntry version
17729
+ * @property {Uint8Array|null} [dataContract] DataContractLatestVersionEntry dataContract
17730
+ */
17731
+
17732
+ /**
17733
+ * Constructs a new DataContractLatestVersionEntry.
17734
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17735
+ * @classdesc Represents a DataContractLatestVersionEntry.
17736
+ * @implements IDataContractLatestVersionEntry
17737
+ * @constructor
17738
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractLatestVersionEntry=} [properties] Properties to set
17739
+ */
17740
+ function DataContractLatestVersionEntry(properties) {
17741
+ if (properties)
17742
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
17743
+ if (properties[keys[i]] != null)
17744
+ this[keys[i]] = properties[keys[i]];
17745
+ }
17746
+
17747
+ /**
17748
+ * DataContractLatestVersionEntry identifier.
17749
+ * @member {Uint8Array} identifier
17750
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17751
+ * @instance
17752
+ */
17753
+ DataContractLatestVersionEntry.prototype.identifier = $util.newBuffer([]);
17754
+
17755
+ /**
17756
+ * DataContractLatestVersionEntry version.
17757
+ * @member {number} version
17758
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17759
+ * @instance
17760
+ */
17761
+ DataContractLatestVersionEntry.prototype.version = 0;
17762
+
17763
+ /**
17764
+ * DataContractLatestVersionEntry dataContract.
17765
+ * @member {Uint8Array} dataContract
17766
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17767
+ * @instance
17768
+ */
17769
+ DataContractLatestVersionEntry.prototype.dataContract = $util.newBuffer([]);
17770
+
17771
+ /**
17772
+ * Creates a new DataContractLatestVersionEntry instance using the specified properties.
17773
+ * @function create
17774
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17775
+ * @static
17776
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractLatestVersionEntry=} [properties] Properties to set
17777
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry} DataContractLatestVersionEntry instance
17778
+ */
17779
+ DataContractLatestVersionEntry.create = function create(properties) {
17780
+ return new DataContractLatestVersionEntry(properties);
17781
+ };
17782
+
17783
+ /**
17784
+ * Encodes the specified DataContractLatestVersionEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry.verify|verify} messages.
17785
+ * @function encode
17786
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17787
+ * @static
17788
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractLatestVersionEntry} message DataContractLatestVersionEntry message or plain object to encode
17789
+ * @param {$protobuf.Writer} [writer] Writer to encode to
17790
+ * @returns {$protobuf.Writer} Writer
17791
+ */
17792
+ DataContractLatestVersionEntry.encode = function encode(message, writer) {
17793
+ if (!writer)
17794
+ writer = $Writer.create();
17795
+ if (message.identifier != null && Object.hasOwnProperty.call(message, "identifier"))
17796
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identifier);
17797
+ if (message.version != null && Object.hasOwnProperty.call(message, "version"))
17798
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.version);
17799
+ if (message.dataContract != null && Object.hasOwnProperty.call(message, "dataContract"))
17800
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.dataContract);
17801
+ return writer;
17802
+ };
17803
+
17804
+ /**
17805
+ * Encodes the specified DataContractLatestVersionEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry.verify|verify} messages.
17806
+ * @function encodeDelimited
17807
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17808
+ * @static
17809
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractLatestVersionEntry} message DataContractLatestVersionEntry message or plain object to encode
17810
+ * @param {$protobuf.Writer} [writer] Writer to encode to
17811
+ * @returns {$protobuf.Writer} Writer
17812
+ */
17813
+ DataContractLatestVersionEntry.encodeDelimited = function encodeDelimited(message, writer) {
17814
+ return this.encode(message, writer).ldelim();
17815
+ };
17816
+
17817
+ /**
17818
+ * Decodes a DataContractLatestVersionEntry message from the specified reader or buffer.
17819
+ * @function decode
17820
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17821
+ * @static
17822
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17823
+ * @param {number} [length] Message length if known beforehand
17824
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry} DataContractLatestVersionEntry
17825
+ * @throws {Error} If the payload is not a reader or valid buffer
17826
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
17827
+ */
17828
+ DataContractLatestVersionEntry.decode = function decode(reader, length) {
17829
+ if (!(reader instanceof $Reader))
17830
+ reader = $Reader.create(reader);
17831
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry();
17832
+ while (reader.pos < end) {
17833
+ var tag = reader.uint32();
17834
+ switch (tag >>> 3) {
17835
+ case 1:
17836
+ message.identifier = reader.bytes();
17837
+ break;
17838
+ case 2:
17839
+ message.version = reader.uint32();
17840
+ break;
17841
+ case 3:
17842
+ message.dataContract = reader.bytes();
17843
+ break;
17844
+ default:
17845
+ reader.skipType(tag & 7);
17846
+ break;
17847
+ }
17848
+ }
17849
+ return message;
17850
+ };
17851
+
17852
+ /**
17853
+ * Decodes a DataContractLatestVersionEntry message from the specified reader or buffer, length delimited.
17854
+ * @function decodeDelimited
17855
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17856
+ * @static
17857
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17858
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry} DataContractLatestVersionEntry
17859
+ * @throws {Error} If the payload is not a reader or valid buffer
17860
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
17861
+ */
17862
+ DataContractLatestVersionEntry.decodeDelimited = function decodeDelimited(reader) {
17863
+ if (!(reader instanceof $Reader))
17864
+ reader = new $Reader(reader);
17865
+ return this.decode(reader, reader.uint32());
17866
+ };
17867
+
17868
+ /**
17869
+ * Verifies a DataContractLatestVersionEntry message.
17870
+ * @function verify
17871
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17872
+ * @static
17873
+ * @param {Object.<string,*>} message Plain object to verify
17874
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
17875
+ */
17876
+ DataContractLatestVersionEntry.verify = function verify(message) {
17877
+ if (typeof message !== "object" || message === null)
17878
+ return "object expected";
17879
+ if (message.identifier != null && message.hasOwnProperty("identifier"))
17880
+ if (!(message.identifier && typeof message.identifier.length === "number" || $util.isString(message.identifier)))
17881
+ return "identifier: buffer expected";
17882
+ if (message.version != null && message.hasOwnProperty("version"))
17883
+ if (!$util.isInteger(message.version))
17884
+ return "version: integer expected";
17885
+ if (message.dataContract != null && message.hasOwnProperty("dataContract"))
17886
+ if (!(message.dataContract && typeof message.dataContract.length === "number" || $util.isString(message.dataContract)))
17887
+ return "dataContract: buffer expected";
17888
+ return null;
17889
+ };
17890
+
17891
+ /**
17892
+ * Creates a DataContractLatestVersionEntry message from a plain object. Also converts values to their respective internal types.
17893
+ * @function fromObject
17894
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17895
+ * @static
17896
+ * @param {Object.<string,*>} object Plain object
17897
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry} DataContractLatestVersionEntry
17898
+ */
17899
+ DataContractLatestVersionEntry.fromObject = function fromObject(object) {
17900
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry)
17901
+ return object;
17902
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry();
17903
+ if (object.identifier != null)
17904
+ if (typeof object.identifier === "string")
17905
+ $util.base64.decode(object.identifier, message.identifier = $util.newBuffer($util.base64.length(object.identifier)), 0);
17906
+ else if (object.identifier.length >= 0)
17907
+ message.identifier = object.identifier;
17908
+ if (object.version != null)
17909
+ message.version = object.version >>> 0;
17910
+ if (object.dataContract != null)
17911
+ if (typeof object.dataContract === "string")
17912
+ $util.base64.decode(object.dataContract, message.dataContract = $util.newBuffer($util.base64.length(object.dataContract)), 0);
17913
+ else if (object.dataContract.length >= 0)
17914
+ message.dataContract = object.dataContract;
17915
+ return message;
17916
+ };
17917
+
17918
+ /**
17919
+ * Creates a plain object from a DataContractLatestVersionEntry message. Also converts values to other types if specified.
17920
+ * @function toObject
17921
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17922
+ * @static
17923
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry} message DataContractLatestVersionEntry
17924
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
17925
+ * @returns {Object.<string,*>} Plain object
17926
+ */
17927
+ DataContractLatestVersionEntry.toObject = function toObject(message, options) {
17928
+ if (!options)
17929
+ options = {};
17930
+ var object = {};
17931
+ if (options.defaults) {
17932
+ if (options.bytes === String)
17933
+ object.identifier = "";
17934
+ else {
17935
+ object.identifier = [];
17936
+ if (options.bytes !== Array)
17937
+ object.identifier = $util.newBuffer(object.identifier);
17938
+ }
17939
+ object.version = 0;
17940
+ if (options.bytes === String)
17941
+ object.dataContract = "";
17942
+ else {
17943
+ object.dataContract = [];
17944
+ if (options.bytes !== Array)
17945
+ object.dataContract = $util.newBuffer(object.dataContract);
17946
+ }
17947
+ }
17948
+ if (message.identifier != null && message.hasOwnProperty("identifier"))
17949
+ object.identifier = options.bytes === String ? $util.base64.encode(message.identifier, 0, message.identifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.identifier) : message.identifier;
17950
+ if (message.version != null && message.hasOwnProperty("version"))
17951
+ object.version = message.version;
17952
+ if (message.dataContract != null && message.hasOwnProperty("dataContract"))
17953
+ object.dataContract = options.bytes === String ? $util.base64.encode(message.dataContract, 0, message.dataContract.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContract) : message.dataContract;
17954
+ return object;
17955
+ };
17956
+
17957
+ /**
17958
+ * Converts this DataContractLatestVersionEntry to JSON.
17959
+ * @function toJSON
17960
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry
17961
+ * @instance
17962
+ * @returns {Object.<string,*>} JSON object
17963
+ */
17964
+ DataContractLatestVersionEntry.prototype.toJSON = function toJSON() {
17965
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
17966
+ };
17967
+
17968
+ return DataContractLatestVersionEntry;
17969
+ })();
17970
+
17971
+ GetDataContractsLatestVersionsResponse.DataContractsLatestVersions = (function() {
17972
+
17973
+ /**
17974
+ * Properties of a DataContractsLatestVersions.
17975
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17976
+ * @interface IDataContractsLatestVersions
17977
+ * @property {Array.<org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractLatestVersionEntry>|null} [entries] DataContractsLatestVersions entries
17978
+ */
17979
+
17980
+ /**
17981
+ * Constructs a new DataContractsLatestVersions.
17982
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
17983
+ * @classdesc Represents a DataContractsLatestVersions.
17984
+ * @implements IDataContractsLatestVersions
17985
+ * @constructor
17986
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractsLatestVersions=} [properties] Properties to set
17987
+ */
17988
+ function DataContractsLatestVersions(properties) {
17989
+ this.entries = [];
17990
+ if (properties)
17991
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
17992
+ if (properties[keys[i]] != null)
17993
+ this[keys[i]] = properties[keys[i]];
17994
+ }
17995
+
17996
+ /**
17997
+ * DataContractsLatestVersions entries.
17998
+ * @member {Array.<org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractLatestVersionEntry>} entries
17999
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18000
+ * @instance
18001
+ */
18002
+ DataContractsLatestVersions.prototype.entries = $util.emptyArray;
18003
+
18004
+ /**
18005
+ * Creates a new DataContractsLatestVersions instance using the specified properties.
18006
+ * @function create
18007
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18008
+ * @static
18009
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractsLatestVersions=} [properties] Properties to set
18010
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions} DataContractsLatestVersions instance
18011
+ */
18012
+ DataContractsLatestVersions.create = function create(properties) {
18013
+ return new DataContractsLatestVersions(properties);
18014
+ };
18015
+
18016
+ /**
18017
+ * Encodes the specified DataContractsLatestVersions message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.verify|verify} messages.
18018
+ * @function encode
18019
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18020
+ * @static
18021
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractsLatestVersions} message DataContractsLatestVersions message or plain object to encode
18022
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18023
+ * @returns {$protobuf.Writer} Writer
18024
+ */
18025
+ DataContractsLatestVersions.encode = function encode(message, writer) {
18026
+ if (!writer)
18027
+ writer = $Writer.create();
18028
+ if (message.entries != null && message.entries.length)
18029
+ for (var i = 0; i < message.entries.length; ++i)
18030
+ $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
18031
+ return writer;
18032
+ };
18033
+
18034
+ /**
18035
+ * Encodes the specified DataContractsLatestVersions message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.verify|verify} messages.
18036
+ * @function encodeDelimited
18037
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18038
+ * @static
18039
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractsLatestVersions} message DataContractsLatestVersions message or plain object to encode
18040
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18041
+ * @returns {$protobuf.Writer} Writer
18042
+ */
18043
+ DataContractsLatestVersions.encodeDelimited = function encodeDelimited(message, writer) {
18044
+ return this.encode(message, writer).ldelim();
18045
+ };
18046
+
18047
+ /**
18048
+ * Decodes a DataContractsLatestVersions message from the specified reader or buffer.
18049
+ * @function decode
18050
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18051
+ * @static
18052
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18053
+ * @param {number} [length] Message length if known beforehand
18054
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions} DataContractsLatestVersions
18055
+ * @throws {Error} If the payload is not a reader or valid buffer
18056
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18057
+ */
18058
+ DataContractsLatestVersions.decode = function decode(reader, length) {
18059
+ if (!(reader instanceof $Reader))
18060
+ reader = $Reader.create(reader);
18061
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions();
18062
+ while (reader.pos < end) {
18063
+ var tag = reader.uint32();
18064
+ switch (tag >>> 3) {
18065
+ case 1:
18066
+ if (!(message.entries && message.entries.length))
18067
+ message.entries = [];
18068
+ message.entries.push($root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry.decode(reader, reader.uint32()));
18069
+ break;
18070
+ default:
18071
+ reader.skipType(tag & 7);
18072
+ break;
18073
+ }
18074
+ }
18075
+ return message;
18076
+ };
18077
+
18078
+ /**
18079
+ * Decodes a DataContractsLatestVersions message from the specified reader or buffer, length delimited.
18080
+ * @function decodeDelimited
18081
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18082
+ * @static
18083
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18084
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions} DataContractsLatestVersions
18085
+ * @throws {Error} If the payload is not a reader or valid buffer
18086
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18087
+ */
18088
+ DataContractsLatestVersions.decodeDelimited = function decodeDelimited(reader) {
18089
+ if (!(reader instanceof $Reader))
18090
+ reader = new $Reader(reader);
18091
+ return this.decode(reader, reader.uint32());
18092
+ };
18093
+
18094
+ /**
18095
+ * Verifies a DataContractsLatestVersions message.
18096
+ * @function verify
18097
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18098
+ * @static
18099
+ * @param {Object.<string,*>} message Plain object to verify
18100
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
18101
+ */
18102
+ DataContractsLatestVersions.verify = function verify(message) {
18103
+ if (typeof message !== "object" || message === null)
18104
+ return "object expected";
18105
+ if (message.entries != null && message.hasOwnProperty("entries")) {
18106
+ if (!Array.isArray(message.entries))
18107
+ return "entries: array expected";
18108
+ for (var i = 0; i < message.entries.length; ++i) {
18109
+ var error = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry.verify(message.entries[i]);
18110
+ if (error)
18111
+ return "entries." + error;
18112
+ }
18113
+ }
18114
+ return null;
18115
+ };
18116
+
18117
+ /**
18118
+ * Creates a DataContractsLatestVersions message from a plain object. Also converts values to their respective internal types.
18119
+ * @function fromObject
18120
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18121
+ * @static
18122
+ * @param {Object.<string,*>} object Plain object
18123
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions} DataContractsLatestVersions
18124
+ */
18125
+ DataContractsLatestVersions.fromObject = function fromObject(object) {
18126
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions)
18127
+ return object;
18128
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions();
18129
+ if (object.entries) {
18130
+ if (!Array.isArray(object.entries))
18131
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.entries: array expected");
18132
+ message.entries = [];
18133
+ for (var i = 0; i < object.entries.length; ++i) {
18134
+ if (typeof object.entries[i] !== "object")
18135
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.entries: object expected");
18136
+ message.entries[i] = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry.fromObject(object.entries[i]);
18137
+ }
18138
+ }
18139
+ return message;
18140
+ };
18141
+
18142
+ /**
18143
+ * Creates a plain object from a DataContractsLatestVersions message. Also converts values to other types if specified.
18144
+ * @function toObject
18145
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18146
+ * @static
18147
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions} message DataContractsLatestVersions
18148
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
18149
+ * @returns {Object.<string,*>} Plain object
18150
+ */
18151
+ DataContractsLatestVersions.toObject = function toObject(message, options) {
18152
+ if (!options)
18153
+ options = {};
18154
+ var object = {};
18155
+ if (options.arrays || options.defaults)
18156
+ object.entries = [];
18157
+ if (message.entries && message.entries.length) {
18158
+ object.entries = [];
18159
+ for (var j = 0; j < message.entries.length; ++j)
18160
+ object.entries[j] = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractLatestVersionEntry.toObject(message.entries[j], options);
18161
+ }
18162
+ return object;
18163
+ };
18164
+
18165
+ /**
18166
+ * Converts this DataContractsLatestVersions to JSON.
18167
+ * @function toJSON
18168
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions
18169
+ * @instance
18170
+ * @returns {Object.<string,*>} JSON object
18171
+ */
18172
+ DataContractsLatestVersions.prototype.toJSON = function toJSON() {
18173
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18174
+ };
18175
+
18176
+ return DataContractsLatestVersions;
18177
+ })();
18178
+
18179
+ GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0 = (function() {
18180
+
18181
+ /**
18182
+ * Properties of a GetDataContractsLatestVersionsResponseV0.
18183
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
18184
+ * @interface IGetDataContractsLatestVersionsResponseV0
18185
+ * @property {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractsLatestVersions|null} [dataContractsLatestVersions] GetDataContractsLatestVersionsResponseV0 dataContractsLatestVersions
18186
+ * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDataContractsLatestVersionsResponseV0 proof
18187
+ * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDataContractsLatestVersionsResponseV0 metadata
18188
+ */
18189
+
18190
+ /**
18191
+ * Constructs a new GetDataContractsLatestVersionsResponseV0.
18192
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse
18193
+ * @classdesc Represents a GetDataContractsLatestVersionsResponseV0.
18194
+ * @implements IGetDataContractsLatestVersionsResponseV0
18195
+ * @constructor
18196
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IGetDataContractsLatestVersionsResponseV0=} [properties] Properties to set
18197
+ */
18198
+ function GetDataContractsLatestVersionsResponseV0(properties) {
18199
+ if (properties)
18200
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18201
+ if (properties[keys[i]] != null)
18202
+ this[keys[i]] = properties[keys[i]];
18203
+ }
18204
+
18205
+ /**
18206
+ * GetDataContractsLatestVersionsResponseV0 dataContractsLatestVersions.
18207
+ * @member {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IDataContractsLatestVersions|null|undefined} dataContractsLatestVersions
18208
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18209
+ * @instance
18210
+ */
18211
+ GetDataContractsLatestVersionsResponseV0.prototype.dataContractsLatestVersions = null;
18212
+
18213
+ /**
18214
+ * GetDataContractsLatestVersionsResponseV0 proof.
18215
+ * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof
18216
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18217
+ * @instance
18218
+ */
18219
+ GetDataContractsLatestVersionsResponseV0.prototype.proof = null;
18220
+
18221
+ /**
18222
+ * GetDataContractsLatestVersionsResponseV0 metadata.
18223
+ * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata
18224
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18225
+ * @instance
18226
+ */
18227
+ GetDataContractsLatestVersionsResponseV0.prototype.metadata = null;
18228
+
18229
+ // OneOf field names bound to virtual getters and setters
18230
+ var $oneOfFields;
18231
+
18232
+ /**
18233
+ * GetDataContractsLatestVersionsResponseV0 result.
18234
+ * @member {"dataContractsLatestVersions"|"proof"|undefined} result
18235
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18236
+ * @instance
18237
+ */
18238
+ Object.defineProperty(GetDataContractsLatestVersionsResponseV0.prototype, "result", {
18239
+ get: $util.oneOfGetter($oneOfFields = ["dataContractsLatestVersions", "proof"]),
18240
+ set: $util.oneOfSetter($oneOfFields)
18241
+ });
18242
+
18243
+ /**
18244
+ * Creates a new GetDataContractsLatestVersionsResponseV0 instance using the specified properties.
18245
+ * @function create
18246
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18247
+ * @static
18248
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IGetDataContractsLatestVersionsResponseV0=} [properties] Properties to set
18249
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0} GetDataContractsLatestVersionsResponseV0 instance
18250
+ */
18251
+ GetDataContractsLatestVersionsResponseV0.create = function create(properties) {
18252
+ return new GetDataContractsLatestVersionsResponseV0(properties);
18253
+ };
18254
+
18255
+ /**
18256
+ * Encodes the specified GetDataContractsLatestVersionsResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.verify|verify} messages.
18257
+ * @function encode
18258
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18259
+ * @static
18260
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IGetDataContractsLatestVersionsResponseV0} message GetDataContractsLatestVersionsResponseV0 message or plain object to encode
18261
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18262
+ * @returns {$protobuf.Writer} Writer
18263
+ */
18264
+ GetDataContractsLatestVersionsResponseV0.encode = function encode(message, writer) {
18265
+ if (!writer)
18266
+ writer = $Writer.create();
18267
+ if (message.dataContractsLatestVersions != null && Object.hasOwnProperty.call(message, "dataContractsLatestVersions"))
18268
+ $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.encode(message.dataContractsLatestVersions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
18269
+ if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
18270
+ $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
18271
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
18272
+ $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
18273
+ return writer;
18274
+ };
18275
+
18276
+ /**
18277
+ * Encodes the specified GetDataContractsLatestVersionsResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.verify|verify} messages.
18278
+ * @function encodeDelimited
18279
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18280
+ * @static
18281
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.IGetDataContractsLatestVersionsResponseV0} message GetDataContractsLatestVersionsResponseV0 message or plain object to encode
18282
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18283
+ * @returns {$protobuf.Writer} Writer
18284
+ */
18285
+ GetDataContractsLatestVersionsResponseV0.encodeDelimited = function encodeDelimited(message, writer) {
18286
+ return this.encode(message, writer).ldelim();
18287
+ };
18288
+
18289
+ /**
18290
+ * Decodes a GetDataContractsLatestVersionsResponseV0 message from the specified reader or buffer.
18291
+ * @function decode
18292
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18293
+ * @static
18294
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18295
+ * @param {number} [length] Message length if known beforehand
18296
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0} GetDataContractsLatestVersionsResponseV0
18297
+ * @throws {Error} If the payload is not a reader or valid buffer
18298
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18299
+ */
18300
+ GetDataContractsLatestVersionsResponseV0.decode = function decode(reader, length) {
18301
+ if (!(reader instanceof $Reader))
18302
+ reader = $Reader.create(reader);
18303
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0();
18304
+ while (reader.pos < end) {
18305
+ var tag = reader.uint32();
18306
+ switch (tag >>> 3) {
18307
+ case 1:
18308
+ message.dataContractsLatestVersions = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.decode(reader, reader.uint32());
18309
+ break;
18310
+ case 2:
18311
+ message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
18312
+ break;
18313
+ case 3:
18314
+ message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32());
18315
+ break;
18316
+ default:
18317
+ reader.skipType(tag & 7);
18318
+ break;
18319
+ }
18320
+ }
18321
+ return message;
18322
+ };
18323
+
18324
+ /**
18325
+ * Decodes a GetDataContractsLatestVersionsResponseV0 message from the specified reader or buffer, length delimited.
18326
+ * @function decodeDelimited
18327
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18328
+ * @static
18329
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18330
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0} GetDataContractsLatestVersionsResponseV0
18331
+ * @throws {Error} If the payload is not a reader or valid buffer
18332
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18333
+ */
18334
+ GetDataContractsLatestVersionsResponseV0.decodeDelimited = function decodeDelimited(reader) {
18335
+ if (!(reader instanceof $Reader))
18336
+ reader = new $Reader(reader);
18337
+ return this.decode(reader, reader.uint32());
18338
+ };
18339
+
18340
+ /**
18341
+ * Verifies a GetDataContractsLatestVersionsResponseV0 message.
18342
+ * @function verify
18343
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18344
+ * @static
18345
+ * @param {Object.<string,*>} message Plain object to verify
18346
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
18347
+ */
18348
+ GetDataContractsLatestVersionsResponseV0.verify = function verify(message) {
18349
+ if (typeof message !== "object" || message === null)
18350
+ return "object expected";
18351
+ var properties = {};
18352
+ if (message.dataContractsLatestVersions != null && message.hasOwnProperty("dataContractsLatestVersions")) {
18353
+ properties.result = 1;
18354
+ {
18355
+ var error = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.verify(message.dataContractsLatestVersions);
18356
+ if (error)
18357
+ return "dataContractsLatestVersions." + error;
18358
+ }
18359
+ }
18360
+ if (message.proof != null && message.hasOwnProperty("proof")) {
18361
+ if (properties.result === 1)
18362
+ return "result: multiple values";
18363
+ properties.result = 1;
18364
+ {
18365
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
18366
+ if (error)
18367
+ return "proof." + error;
18368
+ }
18369
+ }
18370
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
18371
+ var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
18372
+ if (error)
18373
+ return "metadata." + error;
18374
+ }
18375
+ return null;
18376
+ };
18377
+
18378
+ /**
18379
+ * Creates a GetDataContractsLatestVersionsResponseV0 message from a plain object. Also converts values to their respective internal types.
18380
+ * @function fromObject
18381
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18382
+ * @static
18383
+ * @param {Object.<string,*>} object Plain object
18384
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0} GetDataContractsLatestVersionsResponseV0
18385
+ */
18386
+ GetDataContractsLatestVersionsResponseV0.fromObject = function fromObject(object) {
18387
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0)
18388
+ return object;
18389
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0();
18390
+ if (object.dataContractsLatestVersions != null) {
18391
+ if (typeof object.dataContractsLatestVersions !== "object")
18392
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.dataContractsLatestVersions: object expected");
18393
+ message.dataContractsLatestVersions = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.fromObject(object.dataContractsLatestVersions);
18394
+ }
18395
+ if (object.proof != null) {
18396
+ if (typeof object.proof !== "object")
18397
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.proof: object expected");
18398
+ message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof);
18399
+ }
18400
+ if (object.metadata != null) {
18401
+ if (typeof object.metadata !== "object")
18402
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0.metadata: object expected");
18403
+ message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata);
18404
+ }
18405
+ return message;
18406
+ };
18407
+
18408
+ /**
18409
+ * Creates a plain object from a GetDataContractsLatestVersionsResponseV0 message. Also converts values to other types if specified.
18410
+ * @function toObject
18411
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18412
+ * @static
18413
+ * @param {org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0} message GetDataContractsLatestVersionsResponseV0
18414
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
18415
+ * @returns {Object.<string,*>} Plain object
18416
+ */
18417
+ GetDataContractsLatestVersionsResponseV0.toObject = function toObject(message, options) {
18418
+ if (!options)
18419
+ options = {};
18420
+ var object = {};
18421
+ if (options.defaults)
18422
+ object.metadata = null;
18423
+ if (message.dataContractsLatestVersions != null && message.hasOwnProperty("dataContractsLatestVersions")) {
18424
+ object.dataContractsLatestVersions = $root.org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.DataContractsLatestVersions.toObject(message.dataContractsLatestVersions, options);
18425
+ if (options.oneofs)
18426
+ object.result = "dataContractsLatestVersions";
18427
+ }
18428
+ if (message.proof != null && message.hasOwnProperty("proof")) {
18429
+ object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
18430
+ if (options.oneofs)
18431
+ object.result = "proof";
18432
+ }
18433
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
18434
+ object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
18435
+ return object;
18436
+ };
18437
+
18438
+ /**
18439
+ * Converts this GetDataContractsLatestVersionsResponseV0 to JSON.
18440
+ * @function toJSON
18441
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsLatestVersionsResponse.GetDataContractsLatestVersionsResponseV0
18442
+ * @instance
18443
+ * @returns {Object.<string,*>} JSON object
18444
+ */
18445
+ GetDataContractsLatestVersionsResponseV0.prototype.toJSON = function toJSON() {
18446
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18447
+ };
18448
+
18449
+ return GetDataContractsLatestVersionsResponseV0;
18450
+ })();
18451
+
18452
+ return GetDataContractsLatestVersionsResponse;
18453
+ })();
18454
+
18455
+ v0.GetDataContractsRequest = (function() {
18456
+
18457
+ /**
18458
+ * Properties of a GetDataContractsRequest.
18459
+ * @memberof org.dash.platform.dapi.v0
18460
+ * @interface IGetDataContractsRequest
18461
+ * @property {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0|null} [v0] GetDataContractsRequest v0
18462
+ */
18463
+
18464
+ /**
18465
+ * Constructs a new GetDataContractsRequest.
18466
+ * @memberof org.dash.platform.dapi.v0
18467
+ * @classdesc Represents a GetDataContractsRequest.
18468
+ * @implements IGetDataContractsRequest
18469
+ * @constructor
18470
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsRequest=} [properties] Properties to set
18471
+ */
18472
+ function GetDataContractsRequest(properties) {
18473
+ if (properties)
18474
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18475
+ if (properties[keys[i]] != null)
18476
+ this[keys[i]] = properties[keys[i]];
18477
+ }
18478
+
18479
+ /**
18480
+ * GetDataContractsRequest v0.
18481
+ * @member {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0|null|undefined} v0
18482
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18483
+ * @instance
18484
+ */
18485
+ GetDataContractsRequest.prototype.v0 = null;
18486
+
18487
+ // OneOf field names bound to virtual getters and setters
18488
+ var $oneOfFields;
18489
+
18490
+ /**
18491
+ * GetDataContractsRequest version.
18492
+ * @member {"v0"|undefined} version
18493
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18494
+ * @instance
18495
+ */
18496
+ Object.defineProperty(GetDataContractsRequest.prototype, "version", {
18497
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
18498
+ set: $util.oneOfSetter($oneOfFields)
18499
+ });
18500
+
18501
+ /**
18502
+ * Creates a new GetDataContractsRequest instance using the specified properties.
18503
+ * @function create
18504
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18505
+ * @static
18506
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsRequest=} [properties] Properties to set
18507
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest} GetDataContractsRequest instance
18508
+ */
18509
+ GetDataContractsRequest.create = function create(properties) {
18510
+ return new GetDataContractsRequest(properties);
18511
+ };
18512
+
18513
+ /**
18514
+ * Encodes the specified GetDataContractsRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsRequest.verify|verify} messages.
18515
+ * @function encode
18516
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18517
+ * @static
18518
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsRequest} message GetDataContractsRequest message or plain object to encode
18519
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18520
+ * @returns {$protobuf.Writer} Writer
18521
+ */
18522
+ GetDataContractsRequest.encode = function encode(message, writer) {
18523
+ if (!writer)
18524
+ writer = $Writer.create();
18525
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
18526
+ $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
18527
+ return writer;
18528
+ };
18529
+
18530
+ /**
18531
+ * Encodes the specified GetDataContractsRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsRequest.verify|verify} messages.
18532
+ * @function encodeDelimited
18533
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18534
+ * @static
18535
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsRequest} message GetDataContractsRequest message or plain object to encode
18536
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18537
+ * @returns {$protobuf.Writer} Writer
18538
+ */
18539
+ GetDataContractsRequest.encodeDelimited = function encodeDelimited(message, writer) {
18540
+ return this.encode(message, writer).ldelim();
18541
+ };
18542
+
18543
+ /**
18544
+ * Decodes a GetDataContractsRequest message from the specified reader or buffer.
18545
+ * @function decode
18546
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18547
+ * @static
18548
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18549
+ * @param {number} [length] Message length if known beforehand
18550
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest} GetDataContractsRequest
18551
+ * @throws {Error} If the payload is not a reader or valid buffer
18552
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18553
+ */
18554
+ GetDataContractsRequest.decode = function decode(reader, length) {
18555
+ if (!(reader instanceof $Reader))
18556
+ reader = $Reader.create(reader);
18557
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsRequest();
18558
+ while (reader.pos < end) {
18559
+ var tag = reader.uint32();
18560
+ switch (tag >>> 3) {
18561
+ case 1:
18562
+ message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.decode(reader, reader.uint32());
18563
+ break;
18564
+ default:
18565
+ reader.skipType(tag & 7);
18566
+ break;
18567
+ }
18568
+ }
18569
+ return message;
18570
+ };
18571
+
18572
+ /**
18573
+ * Decodes a GetDataContractsRequest message from the specified reader or buffer, length delimited.
18574
+ * @function decodeDelimited
18575
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18576
+ * @static
18577
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18578
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest} GetDataContractsRequest
18579
+ * @throws {Error} If the payload is not a reader or valid buffer
18580
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18581
+ */
18582
+ GetDataContractsRequest.decodeDelimited = function decodeDelimited(reader) {
18583
+ if (!(reader instanceof $Reader))
18584
+ reader = new $Reader(reader);
18585
+ return this.decode(reader, reader.uint32());
18586
+ };
18587
+
18588
+ /**
18589
+ * Verifies a GetDataContractsRequest message.
18590
+ * @function verify
18591
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18592
+ * @static
18593
+ * @param {Object.<string,*>} message Plain object to verify
18594
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
18595
+ */
18596
+ GetDataContractsRequest.verify = function verify(message) {
18597
+ if (typeof message !== "object" || message === null)
18598
+ return "object expected";
18599
+ var properties = {};
18600
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
18601
+ properties.version = 1;
18602
+ {
18603
+ var error = $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.verify(message.v0);
18604
+ if (error)
18605
+ return "v0." + error;
18606
+ }
18607
+ }
18608
+ return null;
18609
+ };
18610
+
18611
+ /**
18612
+ * Creates a GetDataContractsRequest message from a plain object. Also converts values to their respective internal types.
18613
+ * @function fromObject
18614
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18615
+ * @static
18616
+ * @param {Object.<string,*>} object Plain object
18617
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest} GetDataContractsRequest
18618
+ */
18619
+ GetDataContractsRequest.fromObject = function fromObject(object) {
18620
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsRequest)
18621
+ return object;
18622
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsRequest();
18623
+ if (object.v0 != null) {
18624
+ if (typeof object.v0 !== "object")
18625
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsRequest.v0: object expected");
18626
+ message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.fromObject(object.v0);
18627
+ }
18628
+ return message;
18629
+ };
18630
+
18631
+ /**
18632
+ * Creates a plain object from a GetDataContractsRequest message. Also converts values to other types if specified.
18633
+ * @function toObject
18634
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18635
+ * @static
18636
+ * @param {org.dash.platform.dapi.v0.GetDataContractsRequest} message GetDataContractsRequest
18637
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
18638
+ * @returns {Object.<string,*>} Plain object
18639
+ */
18640
+ GetDataContractsRequest.toObject = function toObject(message, options) {
18641
+ if (!options)
18642
+ options = {};
18643
+ var object = {};
18644
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
18645
+ object.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject(message.v0, options);
18646
+ if (options.oneofs)
18647
+ object.version = "v0";
18648
+ }
18649
+ return object;
18650
+ };
18651
+
18652
+ /**
18653
+ * Converts this GetDataContractsRequest to JSON.
18654
+ * @function toJSON
18655
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18656
+ * @instance
18657
+ * @returns {Object.<string,*>} JSON object
18658
+ */
18659
+ GetDataContractsRequest.prototype.toJSON = function toJSON() {
18660
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18661
+ };
18662
+
18663
+ GetDataContractsRequest.GetDataContractsRequestV0 = (function() {
18664
+
18665
+ /**
18666
+ * Properties of a GetDataContractsRequestV0.
18667
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18668
+ * @interface IGetDataContractsRequestV0
18669
+ * @property {Array.<Uint8Array>|null} [ids] GetDataContractsRequestV0 ids
18670
+ * @property {boolean|null} [prove] GetDataContractsRequestV0 prove
18671
+ */
18672
+
18673
+ /**
18674
+ * Constructs a new GetDataContractsRequestV0.
18675
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest
18676
+ * @classdesc Represents a GetDataContractsRequestV0.
18677
+ * @implements IGetDataContractsRequestV0
18678
+ * @constructor
18679
+ * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0=} [properties] Properties to set
18680
+ */
18681
+ function GetDataContractsRequestV0(properties) {
18682
+ this.ids = [];
18683
+ if (properties)
18684
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18685
+ if (properties[keys[i]] != null)
18686
+ this[keys[i]] = properties[keys[i]];
18687
+ }
18688
+
18689
+ /**
18690
+ * GetDataContractsRequestV0 ids.
18691
+ * @member {Array.<Uint8Array>} ids
18692
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18693
+ * @instance
18694
+ */
18695
+ GetDataContractsRequestV0.prototype.ids = $util.emptyArray;
18696
+
18697
+ /**
18698
+ * GetDataContractsRequestV0 prove.
18699
+ * @member {boolean} prove
18700
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18701
+ * @instance
18702
+ */
18703
+ GetDataContractsRequestV0.prototype.prove = false;
18704
+
18705
+ /**
18706
+ * Creates a new GetDataContractsRequestV0 instance using the specified properties.
18707
+ * @function create
18708
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18709
+ * @static
18710
+ * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0=} [properties] Properties to set
18711
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} GetDataContractsRequestV0 instance
18712
+ */
18713
+ GetDataContractsRequestV0.create = function create(properties) {
18714
+ return new GetDataContractsRequestV0(properties);
18715
+ };
18716
+
18717
+ /**
18718
+ * Encodes the specified GetDataContractsRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.verify|verify} messages.
18719
+ * @function encode
18720
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18721
+ * @static
18722
+ * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0} message GetDataContractsRequestV0 message or plain object to encode
18723
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18724
+ * @returns {$protobuf.Writer} Writer
18725
+ */
18726
+ GetDataContractsRequestV0.encode = function encode(message, writer) {
18727
+ if (!writer)
18728
+ writer = $Writer.create();
18729
+ if (message.ids != null && message.ids.length)
18730
+ for (var i = 0; i < message.ids.length; ++i)
18731
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ids[i]);
18732
+ if (message.prove != null && Object.hasOwnProperty.call(message, "prove"))
18733
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove);
18734
+ return writer;
18735
+ };
18736
+
18737
+ /**
18738
+ * Encodes the specified GetDataContractsRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.verify|verify} messages.
18739
+ * @function encodeDelimited
18740
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18741
+ * @static
18742
+ * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.IGetDataContractsRequestV0} message GetDataContractsRequestV0 message or plain object to encode
18743
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18744
+ * @returns {$protobuf.Writer} Writer
18745
+ */
18746
+ GetDataContractsRequestV0.encodeDelimited = function encodeDelimited(message, writer) {
18747
+ return this.encode(message, writer).ldelim();
18748
+ };
18749
+
18750
+ /**
18751
+ * Decodes a GetDataContractsRequestV0 message from the specified reader or buffer.
18752
+ * @function decode
18753
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18754
+ * @static
18755
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18756
+ * @param {number} [length] Message length if known beforehand
18757
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} GetDataContractsRequestV0
18758
+ * @throws {Error} If the payload is not a reader or valid buffer
18759
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18760
+ */
18761
+ GetDataContractsRequestV0.decode = function decode(reader, length) {
18762
+ if (!(reader instanceof $Reader))
18763
+ reader = $Reader.create(reader);
18764
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0();
18765
+ while (reader.pos < end) {
18766
+ var tag = reader.uint32();
18767
+ switch (tag >>> 3) {
18768
+ case 1:
18769
+ if (!(message.ids && message.ids.length))
18770
+ message.ids = [];
18771
+ message.ids.push(reader.bytes());
18772
+ break;
18773
+ case 2:
18774
+ message.prove = reader.bool();
18775
+ break;
18776
+ default:
18777
+ reader.skipType(tag & 7);
18778
+ break;
18779
+ }
18780
+ }
18781
+ return message;
18782
+ };
18783
+
18784
+ /**
18785
+ * Decodes a GetDataContractsRequestV0 message from the specified reader or buffer, length delimited.
18786
+ * @function decodeDelimited
18787
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18788
+ * @static
18789
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18790
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} GetDataContractsRequestV0
18791
+ * @throws {Error} If the payload is not a reader or valid buffer
18792
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18793
+ */
18794
+ GetDataContractsRequestV0.decodeDelimited = function decodeDelimited(reader) {
18795
+ if (!(reader instanceof $Reader))
18796
+ reader = new $Reader(reader);
18797
+ return this.decode(reader, reader.uint32());
18798
+ };
18799
+
18800
+ /**
18801
+ * Verifies a GetDataContractsRequestV0 message.
18802
+ * @function verify
18803
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18804
+ * @static
18805
+ * @param {Object.<string,*>} message Plain object to verify
18806
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
18807
+ */
18808
+ GetDataContractsRequestV0.verify = function verify(message) {
18809
+ if (typeof message !== "object" || message === null)
18810
+ return "object expected";
18811
+ if (message.ids != null && message.hasOwnProperty("ids")) {
18812
+ if (!Array.isArray(message.ids))
18813
+ return "ids: array expected";
18814
+ for (var i = 0; i < message.ids.length; ++i)
18815
+ if (!(message.ids[i] && typeof message.ids[i].length === "number" || $util.isString(message.ids[i])))
18816
+ return "ids: buffer[] expected";
18817
+ }
18818
+ if (message.prove != null && message.hasOwnProperty("prove"))
18819
+ if (typeof message.prove !== "boolean")
18820
+ return "prove: boolean expected";
18821
+ return null;
18822
+ };
18823
+
18824
+ /**
18825
+ * Creates a GetDataContractsRequestV0 message from a plain object. Also converts values to their respective internal types.
18826
+ * @function fromObject
18827
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18828
+ * @static
18829
+ * @param {Object.<string,*>} object Plain object
18830
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} GetDataContractsRequestV0
18831
+ */
18832
+ GetDataContractsRequestV0.fromObject = function fromObject(object) {
18833
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0)
18834
+ return object;
18835
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0();
18836
+ if (object.ids) {
18837
+ if (!Array.isArray(object.ids))
18838
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.ids: array expected");
18839
+ message.ids = [];
18840
+ for (var i = 0; i < object.ids.length; ++i)
18841
+ if (typeof object.ids[i] === "string")
18842
+ $util.base64.decode(object.ids[i], message.ids[i] = $util.newBuffer($util.base64.length(object.ids[i])), 0);
18843
+ else if (object.ids[i].length >= 0)
18844
+ message.ids[i] = object.ids[i];
18845
+ }
18846
+ if (object.prove != null)
18847
+ message.prove = Boolean(object.prove);
18848
+ return message;
18849
+ };
18850
+
18851
+ /**
18852
+ * Creates a plain object from a GetDataContractsRequestV0 message. Also converts values to other types if specified.
18853
+ * @function toObject
18854
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18855
+ * @static
18856
+ * @param {org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} message GetDataContractsRequestV0
18857
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
18858
+ * @returns {Object.<string,*>} Plain object
18859
+ */
18860
+ GetDataContractsRequestV0.toObject = function toObject(message, options) {
18861
+ if (!options)
18862
+ options = {};
18863
+ var object = {};
18864
+ if (options.arrays || options.defaults)
18865
+ object.ids = [];
18866
+ if (options.defaults)
18867
+ object.prove = false;
18868
+ if (message.ids && message.ids.length) {
18869
+ object.ids = [];
18870
+ for (var j = 0; j < message.ids.length; ++j)
18871
+ object.ids[j] = options.bytes === String ? $util.base64.encode(message.ids[j], 0, message.ids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.ids[j]) : message.ids[j];
18872
+ }
18873
+ if (message.prove != null && message.hasOwnProperty("prove"))
18874
+ object.prove = message.prove;
18875
+ return object;
18876
+ };
18877
+
18878
+ /**
18879
+ * Converts this GetDataContractsRequestV0 to JSON.
18880
+ * @function toJSON
18881
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0
18882
+ * @instance
18883
+ * @returns {Object.<string,*>} JSON object
18884
+ */
18885
+ GetDataContractsRequestV0.prototype.toJSON = function toJSON() {
18886
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18887
+ };
18888
+
18889
+ return GetDataContractsRequestV0;
18890
+ })();
18891
+
18892
+ return GetDataContractsRequest;
18893
+ })();
18894
+
18895
+ v0.GetDataContractsByRangeRequest = (function() {
18896
+
18897
+ /**
18898
+ * Properties of a GetDataContractsByRangeRequest.
18899
+ * @memberof org.dash.platform.dapi.v0
18900
+ * @interface IGetDataContractsByRangeRequest
18901
+ * @property {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.IGetDataContractsByRangeRequestV0|null} [v0] GetDataContractsByRangeRequest v0
18902
+ */
18903
+
18904
+ /**
18905
+ * Constructs a new GetDataContractsByRangeRequest.
18906
+ * @memberof org.dash.platform.dapi.v0
18907
+ * @classdesc Represents a GetDataContractsByRangeRequest.
18908
+ * @implements IGetDataContractsByRangeRequest
18909
+ * @constructor
18910
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsByRangeRequest=} [properties] Properties to set
18911
+ */
18912
+ function GetDataContractsByRangeRequest(properties) {
18913
+ if (properties)
18914
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18915
+ if (properties[keys[i]] != null)
18916
+ this[keys[i]] = properties[keys[i]];
18917
+ }
18918
+
18919
+ /**
18920
+ * GetDataContractsByRangeRequest v0.
18921
+ * @member {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.IGetDataContractsByRangeRequestV0|null|undefined} v0
18922
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
18923
+ * @instance
18924
+ */
18925
+ GetDataContractsByRangeRequest.prototype.v0 = null;
18926
+
18927
+ // OneOf field names bound to virtual getters and setters
18928
+ var $oneOfFields;
18929
+
18930
+ /**
18931
+ * GetDataContractsByRangeRequest version.
18932
+ * @member {"v0"|undefined} version
18933
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
18934
+ * @instance
18935
+ */
18936
+ Object.defineProperty(GetDataContractsByRangeRequest.prototype, "version", {
18937
+ get: $util.oneOfGetter($oneOfFields = ["v0"]),
18938
+ set: $util.oneOfSetter($oneOfFields)
18939
+ });
18940
+
18941
+ /**
18942
+ * Creates a new GetDataContractsByRangeRequest instance using the specified properties.
18943
+ * @function create
18944
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
18945
+ * @static
18946
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsByRangeRequest=} [properties] Properties to set
18947
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest} GetDataContractsByRangeRequest instance
18948
+ */
18949
+ GetDataContractsByRangeRequest.create = function create(properties) {
18950
+ return new GetDataContractsByRangeRequest(properties);
18951
+ };
18952
+
18953
+ /**
18954
+ * Encodes the specified GetDataContractsByRangeRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.verify|verify} messages.
18955
+ * @function encode
18956
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
18957
+ * @static
18958
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsByRangeRequest} message GetDataContractsByRangeRequest message or plain object to encode
18959
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18960
+ * @returns {$protobuf.Writer} Writer
18961
+ */
18962
+ GetDataContractsByRangeRequest.encode = function encode(message, writer) {
18963
+ if (!writer)
18964
+ writer = $Writer.create();
18965
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
18966
+ $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
18967
+ return writer;
18968
+ };
18969
+
18970
+ /**
18971
+ * Encodes the specified GetDataContractsByRangeRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.verify|verify} messages.
18972
+ * @function encodeDelimited
18973
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
18974
+ * @static
18975
+ * @param {org.dash.platform.dapi.v0.IGetDataContractsByRangeRequest} message GetDataContractsByRangeRequest message or plain object to encode
18976
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18977
+ * @returns {$protobuf.Writer} Writer
18978
+ */
18979
+ GetDataContractsByRangeRequest.encodeDelimited = function encodeDelimited(message, writer) {
18980
+ return this.encode(message, writer).ldelim();
18981
+ };
18982
+
18983
+ /**
18984
+ * Decodes a GetDataContractsByRangeRequest message from the specified reader or buffer.
18985
+ * @function decode
18986
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
18987
+ * @static
18988
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18989
+ * @param {number} [length] Message length if known beforehand
18990
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest} GetDataContractsByRangeRequest
18991
+ * @throws {Error} If the payload is not a reader or valid buffer
18992
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18993
+ */
18994
+ GetDataContractsByRangeRequest.decode = function decode(reader, length) {
18995
+ if (!(reader instanceof $Reader))
18996
+ reader = $Reader.create(reader);
18997
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest();
18998
+ while (reader.pos < end) {
18999
+ var tag = reader.uint32();
19000
+ switch (tag >>> 3) {
19001
+ case 1:
19002
+ message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0.decode(reader, reader.uint32());
19003
+ break;
19004
+ default:
19005
+ reader.skipType(tag & 7);
19006
+ break;
19007
+ }
19008
+ }
19009
+ return message;
19010
+ };
19011
+
19012
+ /**
19013
+ * Decodes a GetDataContractsByRangeRequest message from the specified reader or buffer, length delimited.
19014
+ * @function decodeDelimited
19015
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
19016
+ * @static
19017
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
19018
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest} GetDataContractsByRangeRequest
19019
+ * @throws {Error} If the payload is not a reader or valid buffer
19020
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
19021
+ */
19022
+ GetDataContractsByRangeRequest.decodeDelimited = function decodeDelimited(reader) {
19023
+ if (!(reader instanceof $Reader))
19024
+ reader = new $Reader(reader);
19025
+ return this.decode(reader, reader.uint32());
19026
+ };
19027
+
19028
+ /**
19029
+ * Verifies a GetDataContractsByRangeRequest message.
19030
+ * @function verify
19031
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
19032
+ * @static
19033
+ * @param {Object.<string,*>} message Plain object to verify
19034
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
19035
+ */
19036
+ GetDataContractsByRangeRequest.verify = function verify(message) {
19037
+ if (typeof message !== "object" || message === null)
19038
+ return "object expected";
19039
+ var properties = {};
19040
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
19041
+ properties.version = 1;
19042
+ {
19043
+ var error = $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0.verify(message.v0);
19044
+ if (error)
19045
+ return "v0." + error;
19046
+ }
19047
+ }
19048
+ return null;
19049
+ };
19050
+
19051
+ /**
19052
+ * Creates a GetDataContractsByRangeRequest message from a plain object. Also converts values to their respective internal types.
19053
+ * @function fromObject
19054
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
19055
+ * @static
19056
+ * @param {Object.<string,*>} object Plain object
19057
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest} GetDataContractsByRangeRequest
19058
+ */
19059
+ GetDataContractsByRangeRequest.fromObject = function fromObject(object) {
19060
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest)
19061
+ return object;
19062
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest();
19063
+ if (object.v0 != null) {
19064
+ if (typeof object.v0 !== "object")
19065
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.v0: object expected");
19066
+ message.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0.fromObject(object.v0);
19067
+ }
19068
+ return message;
19069
+ };
19070
+
19071
+ /**
19072
+ * Creates a plain object from a GetDataContractsByRangeRequest message. Also converts values to other types if specified.
19073
+ * @function toObject
19074
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
19075
+ * @static
19076
+ * @param {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest} message GetDataContractsByRangeRequest
19077
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
19078
+ * @returns {Object.<string,*>} Plain object
19079
+ */
19080
+ GetDataContractsByRangeRequest.toObject = function toObject(message, options) {
19081
+ if (!options)
19082
+ options = {};
19083
+ var object = {};
19084
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
19085
+ object.v0 = $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0.toObject(message.v0, options);
19086
+ if (options.oneofs)
19087
+ object.version = "v0";
19088
+ }
19089
+ return object;
19090
+ };
19091
+
19092
+ /**
19093
+ * Converts this GetDataContractsByRangeRequest to JSON.
19094
+ * @function toJSON
19095
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
19096
+ * @instance
19097
+ * @returns {Object.<string,*>} JSON object
19098
+ */
19099
+ GetDataContractsByRangeRequest.prototype.toJSON = function toJSON() {
19100
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19101
+ };
19102
+
19103
+ GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0 = (function() {
19104
+
19105
+ /**
19106
+ * Properties of a GetDataContractsByRangeRequestV0.
19107
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
19108
+ * @interface IGetDataContractsByRangeRequestV0
19109
+ * @property {number|null} [limit] GetDataContractsByRangeRequestV0 limit
19110
+ * @property {Uint8Array|null} [startAfter] GetDataContractsByRangeRequestV0 startAfter
19111
+ * @property {Uint8Array|null} [startAt] GetDataContractsByRangeRequestV0 startAt
19112
+ * @property {boolean|null} [idsOnly] GetDataContractsByRangeRequestV0 idsOnly
19113
+ * @property {boolean|null} [prove] GetDataContractsByRangeRequestV0 prove
19114
+ */
19115
+
19116
+ /**
19117
+ * Constructs a new GetDataContractsByRangeRequestV0.
19118
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest
19119
+ * @classdesc Represents a GetDataContractsByRangeRequestV0.
19120
+ * @implements IGetDataContractsByRangeRequestV0
19121
+ * @constructor
19122
+ * @param {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.IGetDataContractsByRangeRequestV0=} [properties] Properties to set
19123
+ */
19124
+ function GetDataContractsByRangeRequestV0(properties) {
19125
+ if (properties)
19126
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19127
+ if (properties[keys[i]] != null)
19128
+ this[keys[i]] = properties[keys[i]];
19129
+ }
19130
+
19131
+ /**
19132
+ * GetDataContractsByRangeRequestV0 limit.
19133
+ * @member {number} limit
19134
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19135
+ * @instance
19136
+ */
19137
+ GetDataContractsByRangeRequestV0.prototype.limit = 0;
19138
+
19139
+ /**
19140
+ * GetDataContractsByRangeRequestV0 startAfter.
19141
+ * @member {Uint8Array} startAfter
19142
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19143
+ * @instance
19144
+ */
19145
+ GetDataContractsByRangeRequestV0.prototype.startAfter = $util.newBuffer([]);
19146
+
19147
+ /**
19148
+ * GetDataContractsByRangeRequestV0 startAt.
19149
+ * @member {Uint8Array} startAt
19150
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19151
+ * @instance
19152
+ */
19153
+ GetDataContractsByRangeRequestV0.prototype.startAt = $util.newBuffer([]);
19154
+
19155
+ /**
19156
+ * GetDataContractsByRangeRequestV0 idsOnly.
19157
+ * @member {boolean} idsOnly
19158
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19159
+ * @instance
19160
+ */
19161
+ GetDataContractsByRangeRequestV0.prototype.idsOnly = false;
19162
+
19163
+ /**
19164
+ * GetDataContractsByRangeRequestV0 prove.
19165
+ * @member {boolean} prove
19166
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19167
+ * @instance
19168
+ */
19169
+ GetDataContractsByRangeRequestV0.prototype.prove = false;
19170
+
19171
+ // OneOf field names bound to virtual getters and setters
19172
+ var $oneOfFields;
19173
+
19174
+ /**
19175
+ * GetDataContractsByRangeRequestV0 start.
19176
+ * @member {"startAfter"|"startAt"|undefined} start
19177
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19178
+ * @instance
19179
+ */
19180
+ Object.defineProperty(GetDataContractsByRangeRequestV0.prototype, "start", {
19181
+ get: $util.oneOfGetter($oneOfFields = ["startAfter", "startAt"]),
19182
+ set: $util.oneOfSetter($oneOfFields)
19183
+ });
19184
+
19185
+ /**
19186
+ * Creates a new GetDataContractsByRangeRequestV0 instance using the specified properties.
19187
+ * @function create
19188
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19189
+ * @static
19190
+ * @param {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.IGetDataContractsByRangeRequestV0=} [properties] Properties to set
19191
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0} GetDataContractsByRangeRequestV0 instance
19192
+ */
19193
+ GetDataContractsByRangeRequestV0.create = function create(properties) {
19194
+ return new GetDataContractsByRangeRequestV0(properties);
19195
+ };
19196
+
19197
+ /**
19198
+ * Encodes the specified GetDataContractsByRangeRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0.verify|verify} messages.
19199
+ * @function encode
19200
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19201
+ * @static
19202
+ * @param {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.IGetDataContractsByRangeRequestV0} message GetDataContractsByRangeRequestV0 message or plain object to encode
19203
+ * @param {$protobuf.Writer} [writer] Writer to encode to
19204
+ * @returns {$protobuf.Writer} Writer
19205
+ */
19206
+ GetDataContractsByRangeRequestV0.encode = function encode(message, writer) {
19207
+ if (!writer)
19208
+ writer = $Writer.create();
19209
+ if (message.limit != null && Object.hasOwnProperty.call(message, "limit"))
19210
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.limit);
19211
+ if (message.startAfter != null && Object.hasOwnProperty.call(message, "startAfter"))
19212
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.startAfter);
19213
+ if (message.startAt != null && Object.hasOwnProperty.call(message, "startAt"))
19214
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.startAt);
19215
+ if (message.idsOnly != null && Object.hasOwnProperty.call(message, "idsOnly"))
19216
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.idsOnly);
19217
+ if (message.prove != null && Object.hasOwnProperty.call(message, "prove"))
19218
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prove);
19219
+ return writer;
19220
+ };
19221
+
19222
+ /**
19223
+ * Encodes the specified GetDataContractsByRangeRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0.verify|verify} messages.
19224
+ * @function encodeDelimited
19225
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19226
+ * @static
19227
+ * @param {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.IGetDataContractsByRangeRequestV0} message GetDataContractsByRangeRequestV0 message or plain object to encode
19228
+ * @param {$protobuf.Writer} [writer] Writer to encode to
19229
+ * @returns {$protobuf.Writer} Writer
19230
+ */
19231
+ GetDataContractsByRangeRequestV0.encodeDelimited = function encodeDelimited(message, writer) {
19232
+ return this.encode(message, writer).ldelim();
19233
+ };
19234
+
19235
+ /**
19236
+ * Decodes a GetDataContractsByRangeRequestV0 message from the specified reader or buffer.
19237
+ * @function decode
19238
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19239
+ * @static
19240
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
19241
+ * @param {number} [length] Message length if known beforehand
19242
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0} GetDataContractsByRangeRequestV0
19243
+ * @throws {Error} If the payload is not a reader or valid buffer
19244
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
19245
+ */
19246
+ GetDataContractsByRangeRequestV0.decode = function decode(reader, length) {
19247
+ if (!(reader instanceof $Reader))
19248
+ reader = $Reader.create(reader);
19249
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0();
19250
+ while (reader.pos < end) {
19251
+ var tag = reader.uint32();
19252
+ switch (tag >>> 3) {
19253
+ case 1:
19254
+ message.limit = reader.uint32();
19255
+ break;
19256
+ case 2:
19257
+ message.startAfter = reader.bytes();
19258
+ break;
19259
+ case 3:
19260
+ message.startAt = reader.bytes();
19261
+ break;
19262
+ case 4:
19263
+ message.idsOnly = reader.bool();
19264
+ break;
19265
+ case 5:
19266
+ message.prove = reader.bool();
19267
+ break;
19268
+ default:
19269
+ reader.skipType(tag & 7);
19270
+ break;
19271
+ }
19272
+ }
19273
+ return message;
19274
+ };
19275
+
19276
+ /**
19277
+ * Decodes a GetDataContractsByRangeRequestV0 message from the specified reader or buffer, length delimited.
19278
+ * @function decodeDelimited
19279
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19280
+ * @static
19281
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
19282
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0} GetDataContractsByRangeRequestV0
19283
+ * @throws {Error} If the payload is not a reader or valid buffer
19284
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
19285
+ */
19286
+ GetDataContractsByRangeRequestV0.decodeDelimited = function decodeDelimited(reader) {
19287
+ if (!(reader instanceof $Reader))
19288
+ reader = new $Reader(reader);
19289
+ return this.decode(reader, reader.uint32());
19290
+ };
19291
+
19292
+ /**
19293
+ * Verifies a GetDataContractsByRangeRequestV0 message.
19294
+ * @function verify
19295
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19296
+ * @static
19297
+ * @param {Object.<string,*>} message Plain object to verify
19298
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
19299
+ */
19300
+ GetDataContractsByRangeRequestV0.verify = function verify(message) {
19301
+ if (typeof message !== "object" || message === null)
19302
+ return "object expected";
19303
+ var properties = {};
19304
+ if (message.limit != null && message.hasOwnProperty("limit"))
19305
+ if (!$util.isInteger(message.limit))
19306
+ return "limit: integer expected";
19307
+ if (message.startAfter != null && message.hasOwnProperty("startAfter")) {
19308
+ properties.start = 1;
19309
+ if (!(message.startAfter && typeof message.startAfter.length === "number" || $util.isString(message.startAfter)))
19310
+ return "startAfter: buffer expected";
19311
+ }
19312
+ if (message.startAt != null && message.hasOwnProperty("startAt")) {
19313
+ if (properties.start === 1)
19314
+ return "start: multiple values";
19315
+ properties.start = 1;
19316
+ if (!(message.startAt && typeof message.startAt.length === "number" || $util.isString(message.startAt)))
19317
+ return "startAt: buffer expected";
19318
+ }
19319
+ if (message.idsOnly != null && message.hasOwnProperty("idsOnly"))
19320
+ if (typeof message.idsOnly !== "boolean")
19321
+ return "idsOnly: boolean expected";
19322
+ if (message.prove != null && message.hasOwnProperty("prove"))
19323
+ if (typeof message.prove !== "boolean")
19324
+ return "prove: boolean expected";
19325
+ return null;
19326
+ };
19327
+
19328
+ /**
19329
+ * Creates a GetDataContractsByRangeRequestV0 message from a plain object. Also converts values to their respective internal types.
19330
+ * @function fromObject
19331
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19332
+ * @static
19333
+ * @param {Object.<string,*>} object Plain object
19334
+ * @returns {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0} GetDataContractsByRangeRequestV0
19335
+ */
19336
+ GetDataContractsByRangeRequestV0.fromObject = function fromObject(object) {
19337
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0)
19338
+ return object;
19339
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0();
19340
+ if (object.limit != null)
19341
+ message.limit = object.limit >>> 0;
19342
+ if (object.startAfter != null)
19343
+ if (typeof object.startAfter === "string")
19344
+ $util.base64.decode(object.startAfter, message.startAfter = $util.newBuffer($util.base64.length(object.startAfter)), 0);
19345
+ else if (object.startAfter.length >= 0)
19346
+ message.startAfter = object.startAfter;
19347
+ if (object.startAt != null)
19348
+ if (typeof object.startAt === "string")
19349
+ $util.base64.decode(object.startAt, message.startAt = $util.newBuffer($util.base64.length(object.startAt)), 0);
19350
+ else if (object.startAt.length >= 0)
19351
+ message.startAt = object.startAt;
19352
+ if (object.idsOnly != null)
19353
+ message.idsOnly = Boolean(object.idsOnly);
19354
+ if (object.prove != null)
19355
+ message.prove = Boolean(object.prove);
19356
+ return message;
19357
+ };
19358
+
19359
+ /**
19360
+ * Creates a plain object from a GetDataContractsByRangeRequestV0 message. Also converts values to other types if specified.
19361
+ * @function toObject
19362
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19363
+ * @static
19364
+ * @param {org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0} message GetDataContractsByRangeRequestV0
19365
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
19366
+ * @returns {Object.<string,*>} Plain object
19367
+ */
19368
+ GetDataContractsByRangeRequestV0.toObject = function toObject(message, options) {
19369
+ if (!options)
19370
+ options = {};
19371
+ var object = {};
19372
+ if (options.defaults) {
19373
+ object.limit = 0;
19374
+ object.idsOnly = false;
19375
+ object.prove = false;
19376
+ }
19377
+ if (message.limit != null && message.hasOwnProperty("limit"))
19378
+ object.limit = message.limit;
19379
+ if (message.startAfter != null && message.hasOwnProperty("startAfter")) {
19380
+ object.startAfter = options.bytes === String ? $util.base64.encode(message.startAfter, 0, message.startAfter.length) : options.bytes === Array ? Array.prototype.slice.call(message.startAfter) : message.startAfter;
19381
+ if (options.oneofs)
19382
+ object.start = "startAfter";
19383
+ }
19384
+ if (message.startAt != null && message.hasOwnProperty("startAt")) {
19385
+ object.startAt = options.bytes === String ? $util.base64.encode(message.startAt, 0, message.startAt.length) : options.bytes === Array ? Array.prototype.slice.call(message.startAt) : message.startAt;
19386
+ if (options.oneofs)
19387
+ object.start = "startAt";
19388
+ }
19389
+ if (message.idsOnly != null && message.hasOwnProperty("idsOnly"))
19390
+ object.idsOnly = message.idsOnly;
19391
+ if (message.prove != null && message.hasOwnProperty("prove"))
19392
+ object.prove = message.prove;
19393
+ return object;
19394
+ };
19395
+
19396
+ /**
19397
+ * Converts this GetDataContractsByRangeRequestV0 to JSON.
19398
+ * @function toJSON
19399
+ * @memberof org.dash.platform.dapi.v0.GetDataContractsByRangeRequest.GetDataContractsByRangeRequestV0
19400
+ * @instance
19401
+ * @returns {Object.<string,*>} JSON object
19402
+ */
19403
+ GetDataContractsByRangeRequestV0.prototype.toJSON = function toJSON() {
19404
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19405
+ };
19406
+
19407
+ return GetDataContractsByRangeRequestV0;
19408
+ })();
19409
+
19410
+ return GetDataContractsByRangeRequest;
17422
19411
  })();
17423
19412
 
17424
19413
  v0.GetDataContractsResponse = (function() {