@dashevo/dapi-grpc 1.1.0 → 1.2.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +2 -2
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +36 -0
- package/clients/platform/v0/nodejs/platform_pbjs.js +3673 -0
- package/clients/platform/v0/nodejs/platform_protoc.js +3633 -0
- package/clients/platform/v0/web/PlatformPromiseClient.js +14 -0
- package/clients/platform/v0/web/platform_pb.d.ts +466 -0
- package/clients/platform/v0/web/platform_pb.js +3633 -0
- package/clients/platform/v0/web/platform_pb_service.d.ts +19 -0
- package/clients/platform/v0/web/platform_pb_service.js +40 -0
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +98 -0
|
@@ -977,6 +977,39 @@ $root.org = (function() {
|
|
|
977
977
|
* @variation 2
|
|
978
978
|
*/
|
|
979
979
|
|
|
980
|
+
/**
|
|
981
|
+
* Callback as used by {@link org.dash.platform.dapi.v0.Platform#getStatus}.
|
|
982
|
+
* @memberof org.dash.platform.dapi.v0.Platform
|
|
983
|
+
* @typedef getStatusCallback
|
|
984
|
+
* @type {function}
|
|
985
|
+
* @param {Error|null} error Error, if any
|
|
986
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse} [response] GetStatusResponse
|
|
987
|
+
*/
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Calls getStatus.
|
|
991
|
+
* @function getStatus
|
|
992
|
+
* @memberof org.dash.platform.dapi.v0.Platform
|
|
993
|
+
* @instance
|
|
994
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusRequest} request GetStatusRequest message or plain object
|
|
995
|
+
* @param {org.dash.platform.dapi.v0.Platform.getStatusCallback} callback Node-style callback called with the error, if any, and GetStatusResponse
|
|
996
|
+
* @returns {undefined}
|
|
997
|
+
* @variation 1
|
|
998
|
+
*/
|
|
999
|
+
Object.defineProperty(Platform.prototype.getStatus = function getStatus(request, callback) {
|
|
1000
|
+
return this.rpcCall(getStatus, $root.org.dash.platform.dapi.v0.GetStatusRequest, $root.org.dash.platform.dapi.v0.GetStatusResponse, request, callback);
|
|
1001
|
+
}, "name", { value: "getStatus" });
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Calls getStatus.
|
|
1005
|
+
* @function getStatus
|
|
1006
|
+
* @memberof org.dash.platform.dapi.v0.Platform
|
|
1007
|
+
* @instance
|
|
1008
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusRequest} request GetStatusRequest message or plain object
|
|
1009
|
+
* @returns {Promise<org.dash.platform.dapi.v0.GetStatusResponse>} Promise
|
|
1010
|
+
* @variation 2
|
|
1011
|
+
*/
|
|
1012
|
+
|
|
980
1013
|
return Platform;
|
|
981
1014
|
})();
|
|
982
1015
|
|
|
@@ -38058,6 +38091,3646 @@ $root.org = (function() {
|
|
|
38058
38091
|
return GetPathElementsResponse;
|
|
38059
38092
|
})();
|
|
38060
38093
|
|
|
38094
|
+
v0.GetStatusRequest = (function() {
|
|
38095
|
+
|
|
38096
|
+
/**
|
|
38097
|
+
* Properties of a GetStatusRequest.
|
|
38098
|
+
* @memberof org.dash.platform.dapi.v0
|
|
38099
|
+
* @interface IGetStatusRequest
|
|
38100
|
+
* @property {org.dash.platform.dapi.v0.GetStatusRequest.IGetStatusRequestV0|null} [v0] GetStatusRequest v0
|
|
38101
|
+
*/
|
|
38102
|
+
|
|
38103
|
+
/**
|
|
38104
|
+
* Constructs a new GetStatusRequest.
|
|
38105
|
+
* @memberof org.dash.platform.dapi.v0
|
|
38106
|
+
* @classdesc Represents a GetStatusRequest.
|
|
38107
|
+
* @implements IGetStatusRequest
|
|
38108
|
+
* @constructor
|
|
38109
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusRequest=} [properties] Properties to set
|
|
38110
|
+
*/
|
|
38111
|
+
function GetStatusRequest(properties) {
|
|
38112
|
+
if (properties)
|
|
38113
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
38114
|
+
if (properties[keys[i]] != null)
|
|
38115
|
+
this[keys[i]] = properties[keys[i]];
|
|
38116
|
+
}
|
|
38117
|
+
|
|
38118
|
+
/**
|
|
38119
|
+
* GetStatusRequest v0.
|
|
38120
|
+
* @member {org.dash.platform.dapi.v0.GetStatusRequest.IGetStatusRequestV0|null|undefined} v0
|
|
38121
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38122
|
+
* @instance
|
|
38123
|
+
*/
|
|
38124
|
+
GetStatusRequest.prototype.v0 = null;
|
|
38125
|
+
|
|
38126
|
+
// OneOf field names bound to virtual getters and setters
|
|
38127
|
+
var $oneOfFields;
|
|
38128
|
+
|
|
38129
|
+
/**
|
|
38130
|
+
* GetStatusRequest version.
|
|
38131
|
+
* @member {"v0"|undefined} version
|
|
38132
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38133
|
+
* @instance
|
|
38134
|
+
*/
|
|
38135
|
+
Object.defineProperty(GetStatusRequest.prototype, "version", {
|
|
38136
|
+
get: $util.oneOfGetter($oneOfFields = ["v0"]),
|
|
38137
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
38138
|
+
});
|
|
38139
|
+
|
|
38140
|
+
/**
|
|
38141
|
+
* Creates a new GetStatusRequest instance using the specified properties.
|
|
38142
|
+
* @function create
|
|
38143
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38144
|
+
* @static
|
|
38145
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusRequest=} [properties] Properties to set
|
|
38146
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusRequest} GetStatusRequest instance
|
|
38147
|
+
*/
|
|
38148
|
+
GetStatusRequest.create = function create(properties) {
|
|
38149
|
+
return new GetStatusRequest(properties);
|
|
38150
|
+
};
|
|
38151
|
+
|
|
38152
|
+
/**
|
|
38153
|
+
* Encodes the specified GetStatusRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusRequest.verify|verify} messages.
|
|
38154
|
+
* @function encode
|
|
38155
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38156
|
+
* @static
|
|
38157
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusRequest} message GetStatusRequest message or plain object to encode
|
|
38158
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38159
|
+
* @returns {$protobuf.Writer} Writer
|
|
38160
|
+
*/
|
|
38161
|
+
GetStatusRequest.encode = function encode(message, writer) {
|
|
38162
|
+
if (!writer)
|
|
38163
|
+
writer = $Writer.create();
|
|
38164
|
+
if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
|
|
38165
|
+
$root.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
38166
|
+
return writer;
|
|
38167
|
+
};
|
|
38168
|
+
|
|
38169
|
+
/**
|
|
38170
|
+
* Encodes the specified GetStatusRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusRequest.verify|verify} messages.
|
|
38171
|
+
* @function encodeDelimited
|
|
38172
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38173
|
+
* @static
|
|
38174
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusRequest} message GetStatusRequest message or plain object to encode
|
|
38175
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38176
|
+
* @returns {$protobuf.Writer} Writer
|
|
38177
|
+
*/
|
|
38178
|
+
GetStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
38179
|
+
return this.encode(message, writer).ldelim();
|
|
38180
|
+
};
|
|
38181
|
+
|
|
38182
|
+
/**
|
|
38183
|
+
* Decodes a GetStatusRequest message from the specified reader or buffer.
|
|
38184
|
+
* @function decode
|
|
38185
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38186
|
+
* @static
|
|
38187
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38188
|
+
* @param {number} [length] Message length if known beforehand
|
|
38189
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusRequest} GetStatusRequest
|
|
38190
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38191
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38192
|
+
*/
|
|
38193
|
+
GetStatusRequest.decode = function decode(reader, length) {
|
|
38194
|
+
if (!(reader instanceof $Reader))
|
|
38195
|
+
reader = $Reader.create(reader);
|
|
38196
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusRequest();
|
|
38197
|
+
while (reader.pos < end) {
|
|
38198
|
+
var tag = reader.uint32();
|
|
38199
|
+
switch (tag >>> 3) {
|
|
38200
|
+
case 1:
|
|
38201
|
+
message.v0 = $root.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.decode(reader, reader.uint32());
|
|
38202
|
+
break;
|
|
38203
|
+
default:
|
|
38204
|
+
reader.skipType(tag & 7);
|
|
38205
|
+
break;
|
|
38206
|
+
}
|
|
38207
|
+
}
|
|
38208
|
+
return message;
|
|
38209
|
+
};
|
|
38210
|
+
|
|
38211
|
+
/**
|
|
38212
|
+
* Decodes a GetStatusRequest message from the specified reader or buffer, length delimited.
|
|
38213
|
+
* @function decodeDelimited
|
|
38214
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38215
|
+
* @static
|
|
38216
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38217
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusRequest} GetStatusRequest
|
|
38218
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38219
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38220
|
+
*/
|
|
38221
|
+
GetStatusRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
38222
|
+
if (!(reader instanceof $Reader))
|
|
38223
|
+
reader = new $Reader(reader);
|
|
38224
|
+
return this.decode(reader, reader.uint32());
|
|
38225
|
+
};
|
|
38226
|
+
|
|
38227
|
+
/**
|
|
38228
|
+
* Verifies a GetStatusRequest message.
|
|
38229
|
+
* @function verify
|
|
38230
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38231
|
+
* @static
|
|
38232
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
38233
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
38234
|
+
*/
|
|
38235
|
+
GetStatusRequest.verify = function verify(message) {
|
|
38236
|
+
if (typeof message !== "object" || message === null)
|
|
38237
|
+
return "object expected";
|
|
38238
|
+
var properties = {};
|
|
38239
|
+
if (message.v0 != null && message.hasOwnProperty("v0")) {
|
|
38240
|
+
properties.version = 1;
|
|
38241
|
+
{
|
|
38242
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.verify(message.v0);
|
|
38243
|
+
if (error)
|
|
38244
|
+
return "v0." + error;
|
|
38245
|
+
}
|
|
38246
|
+
}
|
|
38247
|
+
return null;
|
|
38248
|
+
};
|
|
38249
|
+
|
|
38250
|
+
/**
|
|
38251
|
+
* Creates a GetStatusRequest message from a plain object. Also converts values to their respective internal types.
|
|
38252
|
+
* @function fromObject
|
|
38253
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38254
|
+
* @static
|
|
38255
|
+
* @param {Object.<string,*>} object Plain object
|
|
38256
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusRequest} GetStatusRequest
|
|
38257
|
+
*/
|
|
38258
|
+
GetStatusRequest.fromObject = function fromObject(object) {
|
|
38259
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusRequest)
|
|
38260
|
+
return object;
|
|
38261
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusRequest();
|
|
38262
|
+
if (object.v0 != null) {
|
|
38263
|
+
if (typeof object.v0 !== "object")
|
|
38264
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusRequest.v0: object expected");
|
|
38265
|
+
message.v0 = $root.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.fromObject(object.v0);
|
|
38266
|
+
}
|
|
38267
|
+
return message;
|
|
38268
|
+
};
|
|
38269
|
+
|
|
38270
|
+
/**
|
|
38271
|
+
* Creates a plain object from a GetStatusRequest message. Also converts values to other types if specified.
|
|
38272
|
+
* @function toObject
|
|
38273
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38274
|
+
* @static
|
|
38275
|
+
* @param {org.dash.platform.dapi.v0.GetStatusRequest} message GetStatusRequest
|
|
38276
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
38277
|
+
* @returns {Object.<string,*>} Plain object
|
|
38278
|
+
*/
|
|
38279
|
+
GetStatusRequest.toObject = function toObject(message, options) {
|
|
38280
|
+
if (!options)
|
|
38281
|
+
options = {};
|
|
38282
|
+
var object = {};
|
|
38283
|
+
if (message.v0 != null && message.hasOwnProperty("v0")) {
|
|
38284
|
+
object.v0 = $root.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(message.v0, options);
|
|
38285
|
+
if (options.oneofs)
|
|
38286
|
+
object.version = "v0";
|
|
38287
|
+
}
|
|
38288
|
+
return object;
|
|
38289
|
+
};
|
|
38290
|
+
|
|
38291
|
+
/**
|
|
38292
|
+
* Converts this GetStatusRequest to JSON.
|
|
38293
|
+
* @function toJSON
|
|
38294
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38295
|
+
* @instance
|
|
38296
|
+
* @returns {Object.<string,*>} JSON object
|
|
38297
|
+
*/
|
|
38298
|
+
GetStatusRequest.prototype.toJSON = function toJSON() {
|
|
38299
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
38300
|
+
};
|
|
38301
|
+
|
|
38302
|
+
GetStatusRequest.GetStatusRequestV0 = (function() {
|
|
38303
|
+
|
|
38304
|
+
/**
|
|
38305
|
+
* Properties of a GetStatusRequestV0.
|
|
38306
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38307
|
+
* @interface IGetStatusRequestV0
|
|
38308
|
+
*/
|
|
38309
|
+
|
|
38310
|
+
/**
|
|
38311
|
+
* Constructs a new GetStatusRequestV0.
|
|
38312
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest
|
|
38313
|
+
* @classdesc Represents a GetStatusRequestV0.
|
|
38314
|
+
* @implements IGetStatusRequestV0
|
|
38315
|
+
* @constructor
|
|
38316
|
+
* @param {org.dash.platform.dapi.v0.GetStatusRequest.IGetStatusRequestV0=} [properties] Properties to set
|
|
38317
|
+
*/
|
|
38318
|
+
function GetStatusRequestV0(properties) {
|
|
38319
|
+
if (properties)
|
|
38320
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
38321
|
+
if (properties[keys[i]] != null)
|
|
38322
|
+
this[keys[i]] = properties[keys[i]];
|
|
38323
|
+
}
|
|
38324
|
+
|
|
38325
|
+
/**
|
|
38326
|
+
* Creates a new GetStatusRequestV0 instance using the specified properties.
|
|
38327
|
+
* @function create
|
|
38328
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38329
|
+
* @static
|
|
38330
|
+
* @param {org.dash.platform.dapi.v0.GetStatusRequest.IGetStatusRequestV0=} [properties] Properties to set
|
|
38331
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} GetStatusRequestV0 instance
|
|
38332
|
+
*/
|
|
38333
|
+
GetStatusRequestV0.create = function create(properties) {
|
|
38334
|
+
return new GetStatusRequestV0(properties);
|
|
38335
|
+
};
|
|
38336
|
+
|
|
38337
|
+
/**
|
|
38338
|
+
* Encodes the specified GetStatusRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.verify|verify} messages.
|
|
38339
|
+
* @function encode
|
|
38340
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38341
|
+
* @static
|
|
38342
|
+
* @param {org.dash.platform.dapi.v0.GetStatusRequest.IGetStatusRequestV0} message GetStatusRequestV0 message or plain object to encode
|
|
38343
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38344
|
+
* @returns {$protobuf.Writer} Writer
|
|
38345
|
+
*/
|
|
38346
|
+
GetStatusRequestV0.encode = function encode(message, writer) {
|
|
38347
|
+
if (!writer)
|
|
38348
|
+
writer = $Writer.create();
|
|
38349
|
+
return writer;
|
|
38350
|
+
};
|
|
38351
|
+
|
|
38352
|
+
/**
|
|
38353
|
+
* Encodes the specified GetStatusRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.verify|verify} messages.
|
|
38354
|
+
* @function encodeDelimited
|
|
38355
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38356
|
+
* @static
|
|
38357
|
+
* @param {org.dash.platform.dapi.v0.GetStatusRequest.IGetStatusRequestV0} message GetStatusRequestV0 message or plain object to encode
|
|
38358
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38359
|
+
* @returns {$protobuf.Writer} Writer
|
|
38360
|
+
*/
|
|
38361
|
+
GetStatusRequestV0.encodeDelimited = function encodeDelimited(message, writer) {
|
|
38362
|
+
return this.encode(message, writer).ldelim();
|
|
38363
|
+
};
|
|
38364
|
+
|
|
38365
|
+
/**
|
|
38366
|
+
* Decodes a GetStatusRequestV0 message from the specified reader or buffer.
|
|
38367
|
+
* @function decode
|
|
38368
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38369
|
+
* @static
|
|
38370
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38371
|
+
* @param {number} [length] Message length if known beforehand
|
|
38372
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} GetStatusRequestV0
|
|
38373
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38374
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38375
|
+
*/
|
|
38376
|
+
GetStatusRequestV0.decode = function decode(reader, length) {
|
|
38377
|
+
if (!(reader instanceof $Reader))
|
|
38378
|
+
reader = $Reader.create(reader);
|
|
38379
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0();
|
|
38380
|
+
while (reader.pos < end) {
|
|
38381
|
+
var tag = reader.uint32();
|
|
38382
|
+
switch (tag >>> 3) {
|
|
38383
|
+
default:
|
|
38384
|
+
reader.skipType(tag & 7);
|
|
38385
|
+
break;
|
|
38386
|
+
}
|
|
38387
|
+
}
|
|
38388
|
+
return message;
|
|
38389
|
+
};
|
|
38390
|
+
|
|
38391
|
+
/**
|
|
38392
|
+
* Decodes a GetStatusRequestV0 message from the specified reader or buffer, length delimited.
|
|
38393
|
+
* @function decodeDelimited
|
|
38394
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38395
|
+
* @static
|
|
38396
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38397
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} GetStatusRequestV0
|
|
38398
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38399
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38400
|
+
*/
|
|
38401
|
+
GetStatusRequestV0.decodeDelimited = function decodeDelimited(reader) {
|
|
38402
|
+
if (!(reader instanceof $Reader))
|
|
38403
|
+
reader = new $Reader(reader);
|
|
38404
|
+
return this.decode(reader, reader.uint32());
|
|
38405
|
+
};
|
|
38406
|
+
|
|
38407
|
+
/**
|
|
38408
|
+
* Verifies a GetStatusRequestV0 message.
|
|
38409
|
+
* @function verify
|
|
38410
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38411
|
+
* @static
|
|
38412
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
38413
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
38414
|
+
*/
|
|
38415
|
+
GetStatusRequestV0.verify = function verify(message) {
|
|
38416
|
+
if (typeof message !== "object" || message === null)
|
|
38417
|
+
return "object expected";
|
|
38418
|
+
return null;
|
|
38419
|
+
};
|
|
38420
|
+
|
|
38421
|
+
/**
|
|
38422
|
+
* Creates a GetStatusRequestV0 message from a plain object. Also converts values to their respective internal types.
|
|
38423
|
+
* @function fromObject
|
|
38424
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38425
|
+
* @static
|
|
38426
|
+
* @param {Object.<string,*>} object Plain object
|
|
38427
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} GetStatusRequestV0
|
|
38428
|
+
*/
|
|
38429
|
+
GetStatusRequestV0.fromObject = function fromObject(object) {
|
|
38430
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0)
|
|
38431
|
+
return object;
|
|
38432
|
+
return new $root.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0();
|
|
38433
|
+
};
|
|
38434
|
+
|
|
38435
|
+
/**
|
|
38436
|
+
* Creates a plain object from a GetStatusRequestV0 message. Also converts values to other types if specified.
|
|
38437
|
+
* @function toObject
|
|
38438
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38439
|
+
* @static
|
|
38440
|
+
* @param {org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} message GetStatusRequestV0
|
|
38441
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
38442
|
+
* @returns {Object.<string,*>} Plain object
|
|
38443
|
+
*/
|
|
38444
|
+
GetStatusRequestV0.toObject = function toObject() {
|
|
38445
|
+
return {};
|
|
38446
|
+
};
|
|
38447
|
+
|
|
38448
|
+
/**
|
|
38449
|
+
* Converts this GetStatusRequestV0 to JSON.
|
|
38450
|
+
* @function toJSON
|
|
38451
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0
|
|
38452
|
+
* @instance
|
|
38453
|
+
* @returns {Object.<string,*>} JSON object
|
|
38454
|
+
*/
|
|
38455
|
+
GetStatusRequestV0.prototype.toJSON = function toJSON() {
|
|
38456
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
38457
|
+
};
|
|
38458
|
+
|
|
38459
|
+
return GetStatusRequestV0;
|
|
38460
|
+
})();
|
|
38461
|
+
|
|
38462
|
+
return GetStatusRequest;
|
|
38463
|
+
})();
|
|
38464
|
+
|
|
38465
|
+
v0.GetStatusResponse = (function() {
|
|
38466
|
+
|
|
38467
|
+
/**
|
|
38468
|
+
* Properties of a GetStatusResponse.
|
|
38469
|
+
* @memberof org.dash.platform.dapi.v0
|
|
38470
|
+
* @interface IGetStatusResponse
|
|
38471
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.IGetStatusResponseV0|null} [v0] GetStatusResponse v0
|
|
38472
|
+
*/
|
|
38473
|
+
|
|
38474
|
+
/**
|
|
38475
|
+
* Constructs a new GetStatusResponse.
|
|
38476
|
+
* @memberof org.dash.platform.dapi.v0
|
|
38477
|
+
* @classdesc Represents a GetStatusResponse.
|
|
38478
|
+
* @implements IGetStatusResponse
|
|
38479
|
+
* @constructor
|
|
38480
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusResponse=} [properties] Properties to set
|
|
38481
|
+
*/
|
|
38482
|
+
function GetStatusResponse(properties) {
|
|
38483
|
+
if (properties)
|
|
38484
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
38485
|
+
if (properties[keys[i]] != null)
|
|
38486
|
+
this[keys[i]] = properties[keys[i]];
|
|
38487
|
+
}
|
|
38488
|
+
|
|
38489
|
+
/**
|
|
38490
|
+
* GetStatusResponse v0.
|
|
38491
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.IGetStatusResponseV0|null|undefined} v0
|
|
38492
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38493
|
+
* @instance
|
|
38494
|
+
*/
|
|
38495
|
+
GetStatusResponse.prototype.v0 = null;
|
|
38496
|
+
|
|
38497
|
+
// OneOf field names bound to virtual getters and setters
|
|
38498
|
+
var $oneOfFields;
|
|
38499
|
+
|
|
38500
|
+
/**
|
|
38501
|
+
* GetStatusResponse version.
|
|
38502
|
+
* @member {"v0"|undefined} version
|
|
38503
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38504
|
+
* @instance
|
|
38505
|
+
*/
|
|
38506
|
+
Object.defineProperty(GetStatusResponse.prototype, "version", {
|
|
38507
|
+
get: $util.oneOfGetter($oneOfFields = ["v0"]),
|
|
38508
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
38509
|
+
});
|
|
38510
|
+
|
|
38511
|
+
/**
|
|
38512
|
+
* Creates a new GetStatusResponse instance using the specified properties.
|
|
38513
|
+
* @function create
|
|
38514
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38515
|
+
* @static
|
|
38516
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusResponse=} [properties] Properties to set
|
|
38517
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse} GetStatusResponse instance
|
|
38518
|
+
*/
|
|
38519
|
+
GetStatusResponse.create = function create(properties) {
|
|
38520
|
+
return new GetStatusResponse(properties);
|
|
38521
|
+
};
|
|
38522
|
+
|
|
38523
|
+
/**
|
|
38524
|
+
* Encodes the specified GetStatusResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.verify|verify} messages.
|
|
38525
|
+
* @function encode
|
|
38526
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38527
|
+
* @static
|
|
38528
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusResponse} message GetStatusResponse message or plain object to encode
|
|
38529
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38530
|
+
* @returns {$protobuf.Writer} Writer
|
|
38531
|
+
*/
|
|
38532
|
+
GetStatusResponse.encode = function encode(message, writer) {
|
|
38533
|
+
if (!writer)
|
|
38534
|
+
writer = $Writer.create();
|
|
38535
|
+
if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
|
|
38536
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
38537
|
+
return writer;
|
|
38538
|
+
};
|
|
38539
|
+
|
|
38540
|
+
/**
|
|
38541
|
+
* Encodes the specified GetStatusResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.verify|verify} messages.
|
|
38542
|
+
* @function encodeDelimited
|
|
38543
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38544
|
+
* @static
|
|
38545
|
+
* @param {org.dash.platform.dapi.v0.IGetStatusResponse} message GetStatusResponse message or plain object to encode
|
|
38546
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38547
|
+
* @returns {$protobuf.Writer} Writer
|
|
38548
|
+
*/
|
|
38549
|
+
GetStatusResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
38550
|
+
return this.encode(message, writer).ldelim();
|
|
38551
|
+
};
|
|
38552
|
+
|
|
38553
|
+
/**
|
|
38554
|
+
* Decodes a GetStatusResponse message from the specified reader or buffer.
|
|
38555
|
+
* @function decode
|
|
38556
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38557
|
+
* @static
|
|
38558
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38559
|
+
* @param {number} [length] Message length if known beforehand
|
|
38560
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse} GetStatusResponse
|
|
38561
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38562
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38563
|
+
*/
|
|
38564
|
+
GetStatusResponse.decode = function decode(reader, length) {
|
|
38565
|
+
if (!(reader instanceof $Reader))
|
|
38566
|
+
reader = $Reader.create(reader);
|
|
38567
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse();
|
|
38568
|
+
while (reader.pos < end) {
|
|
38569
|
+
var tag = reader.uint32();
|
|
38570
|
+
switch (tag >>> 3) {
|
|
38571
|
+
case 1:
|
|
38572
|
+
message.v0 = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.decode(reader, reader.uint32());
|
|
38573
|
+
break;
|
|
38574
|
+
default:
|
|
38575
|
+
reader.skipType(tag & 7);
|
|
38576
|
+
break;
|
|
38577
|
+
}
|
|
38578
|
+
}
|
|
38579
|
+
return message;
|
|
38580
|
+
};
|
|
38581
|
+
|
|
38582
|
+
/**
|
|
38583
|
+
* Decodes a GetStatusResponse message from the specified reader or buffer, length delimited.
|
|
38584
|
+
* @function decodeDelimited
|
|
38585
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38586
|
+
* @static
|
|
38587
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38588
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse} GetStatusResponse
|
|
38589
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38590
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38591
|
+
*/
|
|
38592
|
+
GetStatusResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
38593
|
+
if (!(reader instanceof $Reader))
|
|
38594
|
+
reader = new $Reader(reader);
|
|
38595
|
+
return this.decode(reader, reader.uint32());
|
|
38596
|
+
};
|
|
38597
|
+
|
|
38598
|
+
/**
|
|
38599
|
+
* Verifies a GetStatusResponse message.
|
|
38600
|
+
* @function verify
|
|
38601
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38602
|
+
* @static
|
|
38603
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
38604
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
38605
|
+
*/
|
|
38606
|
+
GetStatusResponse.verify = function verify(message) {
|
|
38607
|
+
if (typeof message !== "object" || message === null)
|
|
38608
|
+
return "object expected";
|
|
38609
|
+
var properties = {};
|
|
38610
|
+
if (message.v0 != null && message.hasOwnProperty("v0")) {
|
|
38611
|
+
properties.version = 1;
|
|
38612
|
+
{
|
|
38613
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.verify(message.v0);
|
|
38614
|
+
if (error)
|
|
38615
|
+
return "v0." + error;
|
|
38616
|
+
}
|
|
38617
|
+
}
|
|
38618
|
+
return null;
|
|
38619
|
+
};
|
|
38620
|
+
|
|
38621
|
+
/**
|
|
38622
|
+
* Creates a GetStatusResponse message from a plain object. Also converts values to their respective internal types.
|
|
38623
|
+
* @function fromObject
|
|
38624
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38625
|
+
* @static
|
|
38626
|
+
* @param {Object.<string,*>} object Plain object
|
|
38627
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse} GetStatusResponse
|
|
38628
|
+
*/
|
|
38629
|
+
GetStatusResponse.fromObject = function fromObject(object) {
|
|
38630
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse)
|
|
38631
|
+
return object;
|
|
38632
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse();
|
|
38633
|
+
if (object.v0 != null) {
|
|
38634
|
+
if (typeof object.v0 !== "object")
|
|
38635
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.v0: object expected");
|
|
38636
|
+
message.v0 = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.fromObject(object.v0);
|
|
38637
|
+
}
|
|
38638
|
+
return message;
|
|
38639
|
+
};
|
|
38640
|
+
|
|
38641
|
+
/**
|
|
38642
|
+
* Creates a plain object from a GetStatusResponse message. Also converts values to other types if specified.
|
|
38643
|
+
* @function toObject
|
|
38644
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38645
|
+
* @static
|
|
38646
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse} message GetStatusResponse
|
|
38647
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
38648
|
+
* @returns {Object.<string,*>} Plain object
|
|
38649
|
+
*/
|
|
38650
|
+
GetStatusResponse.toObject = function toObject(message, options) {
|
|
38651
|
+
if (!options)
|
|
38652
|
+
options = {};
|
|
38653
|
+
var object = {};
|
|
38654
|
+
if (message.v0 != null && message.hasOwnProperty("v0")) {
|
|
38655
|
+
object.v0 = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(message.v0, options);
|
|
38656
|
+
if (options.oneofs)
|
|
38657
|
+
object.version = "v0";
|
|
38658
|
+
}
|
|
38659
|
+
return object;
|
|
38660
|
+
};
|
|
38661
|
+
|
|
38662
|
+
/**
|
|
38663
|
+
* Converts this GetStatusResponse to JSON.
|
|
38664
|
+
* @function toJSON
|
|
38665
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38666
|
+
* @instance
|
|
38667
|
+
* @returns {Object.<string,*>} JSON object
|
|
38668
|
+
*/
|
|
38669
|
+
GetStatusResponse.prototype.toJSON = function toJSON() {
|
|
38670
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
38671
|
+
};
|
|
38672
|
+
|
|
38673
|
+
GetStatusResponse.GetStatusResponseV0 = (function() {
|
|
38674
|
+
|
|
38675
|
+
/**
|
|
38676
|
+
* Properties of a GetStatusResponseV0.
|
|
38677
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38678
|
+
* @interface IGetStatusResponseV0
|
|
38679
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IVersion|null} [version] GetStatusResponseV0 version
|
|
38680
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INode|null} [node] GetStatusResponseV0 node
|
|
38681
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IChain|null} [chain] GetStatusResponseV0 chain
|
|
38682
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INetwork|null} [network] GetStatusResponseV0 network
|
|
38683
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IStateSync|null} [stateSync] GetStatusResponseV0 stateSync
|
|
38684
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.ITime|null} [time] GetStatusResponseV0 time
|
|
38685
|
+
*/
|
|
38686
|
+
|
|
38687
|
+
/**
|
|
38688
|
+
* Constructs a new GetStatusResponseV0.
|
|
38689
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
38690
|
+
* @classdesc Represents a GetStatusResponseV0.
|
|
38691
|
+
* @implements IGetStatusResponseV0
|
|
38692
|
+
* @constructor
|
|
38693
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.IGetStatusResponseV0=} [properties] Properties to set
|
|
38694
|
+
*/
|
|
38695
|
+
function GetStatusResponseV0(properties) {
|
|
38696
|
+
if (properties)
|
|
38697
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
38698
|
+
if (properties[keys[i]] != null)
|
|
38699
|
+
this[keys[i]] = properties[keys[i]];
|
|
38700
|
+
}
|
|
38701
|
+
|
|
38702
|
+
/**
|
|
38703
|
+
* GetStatusResponseV0 version.
|
|
38704
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IVersion|null|undefined} version
|
|
38705
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38706
|
+
* @instance
|
|
38707
|
+
*/
|
|
38708
|
+
GetStatusResponseV0.prototype.version = null;
|
|
38709
|
+
|
|
38710
|
+
/**
|
|
38711
|
+
* GetStatusResponseV0 node.
|
|
38712
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INode|null|undefined} node
|
|
38713
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38714
|
+
* @instance
|
|
38715
|
+
*/
|
|
38716
|
+
GetStatusResponseV0.prototype.node = null;
|
|
38717
|
+
|
|
38718
|
+
/**
|
|
38719
|
+
* GetStatusResponseV0 chain.
|
|
38720
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IChain|null|undefined} chain
|
|
38721
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38722
|
+
* @instance
|
|
38723
|
+
*/
|
|
38724
|
+
GetStatusResponseV0.prototype.chain = null;
|
|
38725
|
+
|
|
38726
|
+
/**
|
|
38727
|
+
* GetStatusResponseV0 network.
|
|
38728
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INetwork|null|undefined} network
|
|
38729
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38730
|
+
* @instance
|
|
38731
|
+
*/
|
|
38732
|
+
GetStatusResponseV0.prototype.network = null;
|
|
38733
|
+
|
|
38734
|
+
/**
|
|
38735
|
+
* GetStatusResponseV0 stateSync.
|
|
38736
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IStateSync|null|undefined} stateSync
|
|
38737
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38738
|
+
* @instance
|
|
38739
|
+
*/
|
|
38740
|
+
GetStatusResponseV0.prototype.stateSync = null;
|
|
38741
|
+
|
|
38742
|
+
/**
|
|
38743
|
+
* GetStatusResponseV0 time.
|
|
38744
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.ITime|null|undefined} time
|
|
38745
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38746
|
+
* @instance
|
|
38747
|
+
*/
|
|
38748
|
+
GetStatusResponseV0.prototype.time = null;
|
|
38749
|
+
|
|
38750
|
+
/**
|
|
38751
|
+
* Creates a new GetStatusResponseV0 instance using the specified properties.
|
|
38752
|
+
* @function create
|
|
38753
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38754
|
+
* @static
|
|
38755
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.IGetStatusResponseV0=} [properties] Properties to set
|
|
38756
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} GetStatusResponseV0 instance
|
|
38757
|
+
*/
|
|
38758
|
+
GetStatusResponseV0.create = function create(properties) {
|
|
38759
|
+
return new GetStatusResponseV0(properties);
|
|
38760
|
+
};
|
|
38761
|
+
|
|
38762
|
+
/**
|
|
38763
|
+
* Encodes the specified GetStatusResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.verify|verify} messages.
|
|
38764
|
+
* @function encode
|
|
38765
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38766
|
+
* @static
|
|
38767
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.IGetStatusResponseV0} message GetStatusResponseV0 message or plain object to encode
|
|
38768
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38769
|
+
* @returns {$protobuf.Writer} Writer
|
|
38770
|
+
*/
|
|
38771
|
+
GetStatusResponseV0.encode = function encode(message, writer) {
|
|
38772
|
+
if (!writer)
|
|
38773
|
+
writer = $Writer.create();
|
|
38774
|
+
if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
|
38775
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
38776
|
+
if (message.node != null && Object.hasOwnProperty.call(message, "node"))
|
|
38777
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.encode(message.node, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
38778
|
+
if (message.chain != null && Object.hasOwnProperty.call(message, "chain"))
|
|
38779
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.encode(message.chain, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
38780
|
+
if (message.network != null && Object.hasOwnProperty.call(message, "network"))
|
|
38781
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.encode(message.network, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
38782
|
+
if (message.stateSync != null && Object.hasOwnProperty.call(message, "stateSync"))
|
|
38783
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.encode(message.stateSync, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
38784
|
+
if (message.time != null && Object.hasOwnProperty.call(message, "time"))
|
|
38785
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.encode(message.time, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
38786
|
+
return writer;
|
|
38787
|
+
};
|
|
38788
|
+
|
|
38789
|
+
/**
|
|
38790
|
+
* Encodes the specified GetStatusResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.verify|verify} messages.
|
|
38791
|
+
* @function encodeDelimited
|
|
38792
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38793
|
+
* @static
|
|
38794
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.IGetStatusResponseV0} message GetStatusResponseV0 message or plain object to encode
|
|
38795
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38796
|
+
* @returns {$protobuf.Writer} Writer
|
|
38797
|
+
*/
|
|
38798
|
+
GetStatusResponseV0.encodeDelimited = function encodeDelimited(message, writer) {
|
|
38799
|
+
return this.encode(message, writer).ldelim();
|
|
38800
|
+
};
|
|
38801
|
+
|
|
38802
|
+
/**
|
|
38803
|
+
* Decodes a GetStatusResponseV0 message from the specified reader or buffer.
|
|
38804
|
+
* @function decode
|
|
38805
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38806
|
+
* @static
|
|
38807
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38808
|
+
* @param {number} [length] Message length if known beforehand
|
|
38809
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} GetStatusResponseV0
|
|
38810
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38811
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38812
|
+
*/
|
|
38813
|
+
GetStatusResponseV0.decode = function decode(reader, length) {
|
|
38814
|
+
if (!(reader instanceof $Reader))
|
|
38815
|
+
reader = $Reader.create(reader);
|
|
38816
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0();
|
|
38817
|
+
while (reader.pos < end) {
|
|
38818
|
+
var tag = reader.uint32();
|
|
38819
|
+
switch (tag >>> 3) {
|
|
38820
|
+
case 1:
|
|
38821
|
+
message.version = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.decode(reader, reader.uint32());
|
|
38822
|
+
break;
|
|
38823
|
+
case 2:
|
|
38824
|
+
message.node = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.decode(reader, reader.uint32());
|
|
38825
|
+
break;
|
|
38826
|
+
case 3:
|
|
38827
|
+
message.chain = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.decode(reader, reader.uint32());
|
|
38828
|
+
break;
|
|
38829
|
+
case 4:
|
|
38830
|
+
message.network = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.decode(reader, reader.uint32());
|
|
38831
|
+
break;
|
|
38832
|
+
case 5:
|
|
38833
|
+
message.stateSync = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.decode(reader, reader.uint32());
|
|
38834
|
+
break;
|
|
38835
|
+
case 6:
|
|
38836
|
+
message.time = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.decode(reader, reader.uint32());
|
|
38837
|
+
break;
|
|
38838
|
+
default:
|
|
38839
|
+
reader.skipType(tag & 7);
|
|
38840
|
+
break;
|
|
38841
|
+
}
|
|
38842
|
+
}
|
|
38843
|
+
return message;
|
|
38844
|
+
};
|
|
38845
|
+
|
|
38846
|
+
/**
|
|
38847
|
+
* Decodes a GetStatusResponseV0 message from the specified reader or buffer, length delimited.
|
|
38848
|
+
* @function decodeDelimited
|
|
38849
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38850
|
+
* @static
|
|
38851
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38852
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} GetStatusResponseV0
|
|
38853
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38854
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38855
|
+
*/
|
|
38856
|
+
GetStatusResponseV0.decodeDelimited = function decodeDelimited(reader) {
|
|
38857
|
+
if (!(reader instanceof $Reader))
|
|
38858
|
+
reader = new $Reader(reader);
|
|
38859
|
+
return this.decode(reader, reader.uint32());
|
|
38860
|
+
};
|
|
38861
|
+
|
|
38862
|
+
/**
|
|
38863
|
+
* Verifies a GetStatusResponseV0 message.
|
|
38864
|
+
* @function verify
|
|
38865
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38866
|
+
* @static
|
|
38867
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
38868
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
38869
|
+
*/
|
|
38870
|
+
GetStatusResponseV0.verify = function verify(message) {
|
|
38871
|
+
if (typeof message !== "object" || message === null)
|
|
38872
|
+
return "object expected";
|
|
38873
|
+
if (message.version != null && message.hasOwnProperty("version")) {
|
|
38874
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.verify(message.version);
|
|
38875
|
+
if (error)
|
|
38876
|
+
return "version." + error;
|
|
38877
|
+
}
|
|
38878
|
+
if (message.node != null && message.hasOwnProperty("node")) {
|
|
38879
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.verify(message.node);
|
|
38880
|
+
if (error)
|
|
38881
|
+
return "node." + error;
|
|
38882
|
+
}
|
|
38883
|
+
if (message.chain != null && message.hasOwnProperty("chain")) {
|
|
38884
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.verify(message.chain);
|
|
38885
|
+
if (error)
|
|
38886
|
+
return "chain." + error;
|
|
38887
|
+
}
|
|
38888
|
+
if (message.network != null && message.hasOwnProperty("network")) {
|
|
38889
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.verify(message.network);
|
|
38890
|
+
if (error)
|
|
38891
|
+
return "network." + error;
|
|
38892
|
+
}
|
|
38893
|
+
if (message.stateSync != null && message.hasOwnProperty("stateSync")) {
|
|
38894
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.verify(message.stateSync);
|
|
38895
|
+
if (error)
|
|
38896
|
+
return "stateSync." + error;
|
|
38897
|
+
}
|
|
38898
|
+
if (message.time != null && message.hasOwnProperty("time")) {
|
|
38899
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.verify(message.time);
|
|
38900
|
+
if (error)
|
|
38901
|
+
return "time." + error;
|
|
38902
|
+
}
|
|
38903
|
+
return null;
|
|
38904
|
+
};
|
|
38905
|
+
|
|
38906
|
+
/**
|
|
38907
|
+
* Creates a GetStatusResponseV0 message from a plain object. Also converts values to their respective internal types.
|
|
38908
|
+
* @function fromObject
|
|
38909
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38910
|
+
* @static
|
|
38911
|
+
* @param {Object.<string,*>} object Plain object
|
|
38912
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} GetStatusResponseV0
|
|
38913
|
+
*/
|
|
38914
|
+
GetStatusResponseV0.fromObject = function fromObject(object) {
|
|
38915
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0)
|
|
38916
|
+
return object;
|
|
38917
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0();
|
|
38918
|
+
if (object.version != null) {
|
|
38919
|
+
if (typeof object.version !== "object")
|
|
38920
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.version: object expected");
|
|
38921
|
+
message.version = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.fromObject(object.version);
|
|
38922
|
+
}
|
|
38923
|
+
if (object.node != null) {
|
|
38924
|
+
if (typeof object.node !== "object")
|
|
38925
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.node: object expected");
|
|
38926
|
+
message.node = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.fromObject(object.node);
|
|
38927
|
+
}
|
|
38928
|
+
if (object.chain != null) {
|
|
38929
|
+
if (typeof object.chain !== "object")
|
|
38930
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.chain: object expected");
|
|
38931
|
+
message.chain = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.fromObject(object.chain);
|
|
38932
|
+
}
|
|
38933
|
+
if (object.network != null) {
|
|
38934
|
+
if (typeof object.network !== "object")
|
|
38935
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.network: object expected");
|
|
38936
|
+
message.network = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.fromObject(object.network);
|
|
38937
|
+
}
|
|
38938
|
+
if (object.stateSync != null) {
|
|
38939
|
+
if (typeof object.stateSync !== "object")
|
|
38940
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.stateSync: object expected");
|
|
38941
|
+
message.stateSync = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.fromObject(object.stateSync);
|
|
38942
|
+
}
|
|
38943
|
+
if (object.time != null) {
|
|
38944
|
+
if (typeof object.time !== "object")
|
|
38945
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.time: object expected");
|
|
38946
|
+
message.time = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.fromObject(object.time);
|
|
38947
|
+
}
|
|
38948
|
+
return message;
|
|
38949
|
+
};
|
|
38950
|
+
|
|
38951
|
+
/**
|
|
38952
|
+
* Creates a plain object from a GetStatusResponseV0 message. Also converts values to other types if specified.
|
|
38953
|
+
* @function toObject
|
|
38954
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38955
|
+
* @static
|
|
38956
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} message GetStatusResponseV0
|
|
38957
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
38958
|
+
* @returns {Object.<string,*>} Plain object
|
|
38959
|
+
*/
|
|
38960
|
+
GetStatusResponseV0.toObject = function toObject(message, options) {
|
|
38961
|
+
if (!options)
|
|
38962
|
+
options = {};
|
|
38963
|
+
var object = {};
|
|
38964
|
+
if (options.defaults) {
|
|
38965
|
+
object.version = null;
|
|
38966
|
+
object.node = null;
|
|
38967
|
+
object.chain = null;
|
|
38968
|
+
object.network = null;
|
|
38969
|
+
object.stateSync = null;
|
|
38970
|
+
object.time = null;
|
|
38971
|
+
}
|
|
38972
|
+
if (message.version != null && message.hasOwnProperty("version"))
|
|
38973
|
+
object.version = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject(message.version, options);
|
|
38974
|
+
if (message.node != null && message.hasOwnProperty("node"))
|
|
38975
|
+
object.node = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(message.node, options);
|
|
38976
|
+
if (message.chain != null && message.hasOwnProperty("chain"))
|
|
38977
|
+
object.chain = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(message.chain, options);
|
|
38978
|
+
if (message.network != null && message.hasOwnProperty("network"))
|
|
38979
|
+
object.network = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(message.network, options);
|
|
38980
|
+
if (message.stateSync != null && message.hasOwnProperty("stateSync"))
|
|
38981
|
+
object.stateSync = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(message.stateSync, options);
|
|
38982
|
+
if (message.time != null && message.hasOwnProperty("time"))
|
|
38983
|
+
object.time = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(message.time, options);
|
|
38984
|
+
return object;
|
|
38985
|
+
};
|
|
38986
|
+
|
|
38987
|
+
/**
|
|
38988
|
+
* Converts this GetStatusResponseV0 to JSON.
|
|
38989
|
+
* @function toJSON
|
|
38990
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
38991
|
+
* @instance
|
|
38992
|
+
* @returns {Object.<string,*>} JSON object
|
|
38993
|
+
*/
|
|
38994
|
+
GetStatusResponseV0.prototype.toJSON = function toJSON() {
|
|
38995
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
38996
|
+
};
|
|
38997
|
+
|
|
38998
|
+
GetStatusResponseV0.Version = (function() {
|
|
38999
|
+
|
|
39000
|
+
/**
|
|
39001
|
+
* Properties of a Version.
|
|
39002
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
39003
|
+
* @interface IVersion
|
|
39004
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.ISoftware|null} [software] Version software
|
|
39005
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.IProtocol|null} [protocol] Version protocol
|
|
39006
|
+
*/
|
|
39007
|
+
|
|
39008
|
+
/**
|
|
39009
|
+
* Constructs a new Version.
|
|
39010
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
39011
|
+
* @classdesc Represents a Version.
|
|
39012
|
+
* @implements IVersion
|
|
39013
|
+
* @constructor
|
|
39014
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IVersion=} [properties] Properties to set
|
|
39015
|
+
*/
|
|
39016
|
+
function Version(properties) {
|
|
39017
|
+
if (properties)
|
|
39018
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
39019
|
+
if (properties[keys[i]] != null)
|
|
39020
|
+
this[keys[i]] = properties[keys[i]];
|
|
39021
|
+
}
|
|
39022
|
+
|
|
39023
|
+
/**
|
|
39024
|
+
* Version software.
|
|
39025
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.ISoftware|null|undefined} software
|
|
39026
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39027
|
+
* @instance
|
|
39028
|
+
*/
|
|
39029
|
+
Version.prototype.software = null;
|
|
39030
|
+
|
|
39031
|
+
/**
|
|
39032
|
+
* Version protocol.
|
|
39033
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.IProtocol|null|undefined} protocol
|
|
39034
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39035
|
+
* @instance
|
|
39036
|
+
*/
|
|
39037
|
+
Version.prototype.protocol = null;
|
|
39038
|
+
|
|
39039
|
+
/**
|
|
39040
|
+
* Creates a new Version instance using the specified properties.
|
|
39041
|
+
* @function create
|
|
39042
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39043
|
+
* @static
|
|
39044
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IVersion=} [properties] Properties to set
|
|
39045
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} Version instance
|
|
39046
|
+
*/
|
|
39047
|
+
Version.create = function create(properties) {
|
|
39048
|
+
return new Version(properties);
|
|
39049
|
+
};
|
|
39050
|
+
|
|
39051
|
+
/**
|
|
39052
|
+
* Encodes the specified Version message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.verify|verify} messages.
|
|
39053
|
+
* @function encode
|
|
39054
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39055
|
+
* @static
|
|
39056
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IVersion} message Version message or plain object to encode
|
|
39057
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39058
|
+
* @returns {$protobuf.Writer} Writer
|
|
39059
|
+
*/
|
|
39060
|
+
Version.encode = function encode(message, writer) {
|
|
39061
|
+
if (!writer)
|
|
39062
|
+
writer = $Writer.create();
|
|
39063
|
+
if (message.software != null && Object.hasOwnProperty.call(message, "software"))
|
|
39064
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.encode(message.software, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
39065
|
+
if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol"))
|
|
39066
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.encode(message.protocol, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
39067
|
+
return writer;
|
|
39068
|
+
};
|
|
39069
|
+
|
|
39070
|
+
/**
|
|
39071
|
+
* Encodes the specified Version message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.verify|verify} messages.
|
|
39072
|
+
* @function encodeDelimited
|
|
39073
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39074
|
+
* @static
|
|
39075
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IVersion} message Version message or plain object to encode
|
|
39076
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39077
|
+
* @returns {$protobuf.Writer} Writer
|
|
39078
|
+
*/
|
|
39079
|
+
Version.encodeDelimited = function encodeDelimited(message, writer) {
|
|
39080
|
+
return this.encode(message, writer).ldelim();
|
|
39081
|
+
};
|
|
39082
|
+
|
|
39083
|
+
/**
|
|
39084
|
+
* Decodes a Version message from the specified reader or buffer.
|
|
39085
|
+
* @function decode
|
|
39086
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39087
|
+
* @static
|
|
39088
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39089
|
+
* @param {number} [length] Message length if known beforehand
|
|
39090
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} Version
|
|
39091
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39092
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39093
|
+
*/
|
|
39094
|
+
Version.decode = function decode(reader, length) {
|
|
39095
|
+
if (!(reader instanceof $Reader))
|
|
39096
|
+
reader = $Reader.create(reader);
|
|
39097
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version();
|
|
39098
|
+
while (reader.pos < end) {
|
|
39099
|
+
var tag = reader.uint32();
|
|
39100
|
+
switch (tag >>> 3) {
|
|
39101
|
+
case 1:
|
|
39102
|
+
message.software = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.decode(reader, reader.uint32());
|
|
39103
|
+
break;
|
|
39104
|
+
case 2:
|
|
39105
|
+
message.protocol = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.decode(reader, reader.uint32());
|
|
39106
|
+
break;
|
|
39107
|
+
default:
|
|
39108
|
+
reader.skipType(tag & 7);
|
|
39109
|
+
break;
|
|
39110
|
+
}
|
|
39111
|
+
}
|
|
39112
|
+
return message;
|
|
39113
|
+
};
|
|
39114
|
+
|
|
39115
|
+
/**
|
|
39116
|
+
* Decodes a Version message from the specified reader or buffer, length delimited.
|
|
39117
|
+
* @function decodeDelimited
|
|
39118
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39119
|
+
* @static
|
|
39120
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39121
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} Version
|
|
39122
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39123
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39124
|
+
*/
|
|
39125
|
+
Version.decodeDelimited = function decodeDelimited(reader) {
|
|
39126
|
+
if (!(reader instanceof $Reader))
|
|
39127
|
+
reader = new $Reader(reader);
|
|
39128
|
+
return this.decode(reader, reader.uint32());
|
|
39129
|
+
};
|
|
39130
|
+
|
|
39131
|
+
/**
|
|
39132
|
+
* Verifies a Version message.
|
|
39133
|
+
* @function verify
|
|
39134
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39135
|
+
* @static
|
|
39136
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
39137
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
39138
|
+
*/
|
|
39139
|
+
Version.verify = function verify(message) {
|
|
39140
|
+
if (typeof message !== "object" || message === null)
|
|
39141
|
+
return "object expected";
|
|
39142
|
+
if (message.software != null && message.hasOwnProperty("software")) {
|
|
39143
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.verify(message.software);
|
|
39144
|
+
if (error)
|
|
39145
|
+
return "software." + error;
|
|
39146
|
+
}
|
|
39147
|
+
if (message.protocol != null && message.hasOwnProperty("protocol")) {
|
|
39148
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.verify(message.protocol);
|
|
39149
|
+
if (error)
|
|
39150
|
+
return "protocol." + error;
|
|
39151
|
+
}
|
|
39152
|
+
return null;
|
|
39153
|
+
};
|
|
39154
|
+
|
|
39155
|
+
/**
|
|
39156
|
+
* Creates a Version message from a plain object. Also converts values to their respective internal types.
|
|
39157
|
+
* @function fromObject
|
|
39158
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39159
|
+
* @static
|
|
39160
|
+
* @param {Object.<string,*>} object Plain object
|
|
39161
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} Version
|
|
39162
|
+
*/
|
|
39163
|
+
Version.fromObject = function fromObject(object) {
|
|
39164
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version)
|
|
39165
|
+
return object;
|
|
39166
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version();
|
|
39167
|
+
if (object.software != null) {
|
|
39168
|
+
if (typeof object.software !== "object")
|
|
39169
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.software: object expected");
|
|
39170
|
+
message.software = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.fromObject(object.software);
|
|
39171
|
+
}
|
|
39172
|
+
if (object.protocol != null) {
|
|
39173
|
+
if (typeof object.protocol !== "object")
|
|
39174
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.protocol: object expected");
|
|
39175
|
+
message.protocol = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.fromObject(object.protocol);
|
|
39176
|
+
}
|
|
39177
|
+
return message;
|
|
39178
|
+
};
|
|
39179
|
+
|
|
39180
|
+
/**
|
|
39181
|
+
* Creates a plain object from a Version message. Also converts values to other types if specified.
|
|
39182
|
+
* @function toObject
|
|
39183
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39184
|
+
* @static
|
|
39185
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} message Version
|
|
39186
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
39187
|
+
* @returns {Object.<string,*>} Plain object
|
|
39188
|
+
*/
|
|
39189
|
+
Version.toObject = function toObject(message, options) {
|
|
39190
|
+
if (!options)
|
|
39191
|
+
options = {};
|
|
39192
|
+
var object = {};
|
|
39193
|
+
if (options.defaults) {
|
|
39194
|
+
object.software = null;
|
|
39195
|
+
object.protocol = null;
|
|
39196
|
+
}
|
|
39197
|
+
if (message.software != null && message.hasOwnProperty("software"))
|
|
39198
|
+
object.software = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(message.software, options);
|
|
39199
|
+
if (message.protocol != null && message.hasOwnProperty("protocol"))
|
|
39200
|
+
object.protocol = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject(message.protocol, options);
|
|
39201
|
+
return object;
|
|
39202
|
+
};
|
|
39203
|
+
|
|
39204
|
+
/**
|
|
39205
|
+
* Converts this Version to JSON.
|
|
39206
|
+
* @function toJSON
|
|
39207
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39208
|
+
* @instance
|
|
39209
|
+
* @returns {Object.<string,*>} JSON object
|
|
39210
|
+
*/
|
|
39211
|
+
Version.prototype.toJSON = function toJSON() {
|
|
39212
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
39213
|
+
};
|
|
39214
|
+
|
|
39215
|
+
Version.Software = (function() {
|
|
39216
|
+
|
|
39217
|
+
/**
|
|
39218
|
+
* Properties of a Software.
|
|
39219
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39220
|
+
* @interface ISoftware
|
|
39221
|
+
* @property {string|null} [dapi] Software dapi
|
|
39222
|
+
* @property {string|null} [drive] Software drive
|
|
39223
|
+
* @property {string|null} [tenderdash] Software tenderdash
|
|
39224
|
+
*/
|
|
39225
|
+
|
|
39226
|
+
/**
|
|
39227
|
+
* Constructs a new Software.
|
|
39228
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39229
|
+
* @classdesc Represents a Software.
|
|
39230
|
+
* @implements ISoftware
|
|
39231
|
+
* @constructor
|
|
39232
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.ISoftware=} [properties] Properties to set
|
|
39233
|
+
*/
|
|
39234
|
+
function Software(properties) {
|
|
39235
|
+
if (properties)
|
|
39236
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
39237
|
+
if (properties[keys[i]] != null)
|
|
39238
|
+
this[keys[i]] = properties[keys[i]];
|
|
39239
|
+
}
|
|
39240
|
+
|
|
39241
|
+
/**
|
|
39242
|
+
* Software dapi.
|
|
39243
|
+
* @member {string} dapi
|
|
39244
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39245
|
+
* @instance
|
|
39246
|
+
*/
|
|
39247
|
+
Software.prototype.dapi = "";
|
|
39248
|
+
|
|
39249
|
+
/**
|
|
39250
|
+
* Software drive.
|
|
39251
|
+
* @member {string} drive
|
|
39252
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39253
|
+
* @instance
|
|
39254
|
+
*/
|
|
39255
|
+
Software.prototype.drive = "";
|
|
39256
|
+
|
|
39257
|
+
/**
|
|
39258
|
+
* Software tenderdash.
|
|
39259
|
+
* @member {string} tenderdash
|
|
39260
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39261
|
+
* @instance
|
|
39262
|
+
*/
|
|
39263
|
+
Software.prototype.tenderdash = "";
|
|
39264
|
+
|
|
39265
|
+
/**
|
|
39266
|
+
* Creates a new Software instance using the specified properties.
|
|
39267
|
+
* @function create
|
|
39268
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39269
|
+
* @static
|
|
39270
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.ISoftware=} [properties] Properties to set
|
|
39271
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} Software instance
|
|
39272
|
+
*/
|
|
39273
|
+
Software.create = function create(properties) {
|
|
39274
|
+
return new Software(properties);
|
|
39275
|
+
};
|
|
39276
|
+
|
|
39277
|
+
/**
|
|
39278
|
+
* Encodes the specified Software message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.verify|verify} messages.
|
|
39279
|
+
* @function encode
|
|
39280
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39281
|
+
* @static
|
|
39282
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.ISoftware} message Software message or plain object to encode
|
|
39283
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39284
|
+
* @returns {$protobuf.Writer} Writer
|
|
39285
|
+
*/
|
|
39286
|
+
Software.encode = function encode(message, writer) {
|
|
39287
|
+
if (!writer)
|
|
39288
|
+
writer = $Writer.create();
|
|
39289
|
+
if (message.dapi != null && Object.hasOwnProperty.call(message, "dapi"))
|
|
39290
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.dapi);
|
|
39291
|
+
if (message.drive != null && Object.hasOwnProperty.call(message, "drive"))
|
|
39292
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.drive);
|
|
39293
|
+
if (message.tenderdash != null && Object.hasOwnProperty.call(message, "tenderdash"))
|
|
39294
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.tenderdash);
|
|
39295
|
+
return writer;
|
|
39296
|
+
};
|
|
39297
|
+
|
|
39298
|
+
/**
|
|
39299
|
+
* Encodes the specified Software message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.verify|verify} messages.
|
|
39300
|
+
* @function encodeDelimited
|
|
39301
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39302
|
+
* @static
|
|
39303
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.ISoftware} message Software message or plain object to encode
|
|
39304
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39305
|
+
* @returns {$protobuf.Writer} Writer
|
|
39306
|
+
*/
|
|
39307
|
+
Software.encodeDelimited = function encodeDelimited(message, writer) {
|
|
39308
|
+
return this.encode(message, writer).ldelim();
|
|
39309
|
+
};
|
|
39310
|
+
|
|
39311
|
+
/**
|
|
39312
|
+
* Decodes a Software message from the specified reader or buffer.
|
|
39313
|
+
* @function decode
|
|
39314
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39315
|
+
* @static
|
|
39316
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39317
|
+
* @param {number} [length] Message length if known beforehand
|
|
39318
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} Software
|
|
39319
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39320
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39321
|
+
*/
|
|
39322
|
+
Software.decode = function decode(reader, length) {
|
|
39323
|
+
if (!(reader instanceof $Reader))
|
|
39324
|
+
reader = $Reader.create(reader);
|
|
39325
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software();
|
|
39326
|
+
while (reader.pos < end) {
|
|
39327
|
+
var tag = reader.uint32();
|
|
39328
|
+
switch (tag >>> 3) {
|
|
39329
|
+
case 1:
|
|
39330
|
+
message.dapi = reader.string();
|
|
39331
|
+
break;
|
|
39332
|
+
case 2:
|
|
39333
|
+
message.drive = reader.string();
|
|
39334
|
+
break;
|
|
39335
|
+
case 3:
|
|
39336
|
+
message.tenderdash = reader.string();
|
|
39337
|
+
break;
|
|
39338
|
+
default:
|
|
39339
|
+
reader.skipType(tag & 7);
|
|
39340
|
+
break;
|
|
39341
|
+
}
|
|
39342
|
+
}
|
|
39343
|
+
return message;
|
|
39344
|
+
};
|
|
39345
|
+
|
|
39346
|
+
/**
|
|
39347
|
+
* Decodes a Software message from the specified reader or buffer, length delimited.
|
|
39348
|
+
* @function decodeDelimited
|
|
39349
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39350
|
+
* @static
|
|
39351
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39352
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} Software
|
|
39353
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39354
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39355
|
+
*/
|
|
39356
|
+
Software.decodeDelimited = function decodeDelimited(reader) {
|
|
39357
|
+
if (!(reader instanceof $Reader))
|
|
39358
|
+
reader = new $Reader(reader);
|
|
39359
|
+
return this.decode(reader, reader.uint32());
|
|
39360
|
+
};
|
|
39361
|
+
|
|
39362
|
+
/**
|
|
39363
|
+
* Verifies a Software message.
|
|
39364
|
+
* @function verify
|
|
39365
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39366
|
+
* @static
|
|
39367
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
39368
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
39369
|
+
*/
|
|
39370
|
+
Software.verify = function verify(message) {
|
|
39371
|
+
if (typeof message !== "object" || message === null)
|
|
39372
|
+
return "object expected";
|
|
39373
|
+
if (message.dapi != null && message.hasOwnProperty("dapi"))
|
|
39374
|
+
if (!$util.isString(message.dapi))
|
|
39375
|
+
return "dapi: string expected";
|
|
39376
|
+
if (message.drive != null && message.hasOwnProperty("drive"))
|
|
39377
|
+
if (!$util.isString(message.drive))
|
|
39378
|
+
return "drive: string expected";
|
|
39379
|
+
if (message.tenderdash != null && message.hasOwnProperty("tenderdash"))
|
|
39380
|
+
if (!$util.isString(message.tenderdash))
|
|
39381
|
+
return "tenderdash: string expected";
|
|
39382
|
+
return null;
|
|
39383
|
+
};
|
|
39384
|
+
|
|
39385
|
+
/**
|
|
39386
|
+
* Creates a Software message from a plain object. Also converts values to their respective internal types.
|
|
39387
|
+
* @function fromObject
|
|
39388
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39389
|
+
* @static
|
|
39390
|
+
* @param {Object.<string,*>} object Plain object
|
|
39391
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} Software
|
|
39392
|
+
*/
|
|
39393
|
+
Software.fromObject = function fromObject(object) {
|
|
39394
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software)
|
|
39395
|
+
return object;
|
|
39396
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software();
|
|
39397
|
+
if (object.dapi != null)
|
|
39398
|
+
message.dapi = String(object.dapi);
|
|
39399
|
+
if (object.drive != null)
|
|
39400
|
+
message.drive = String(object.drive);
|
|
39401
|
+
if (object.tenderdash != null)
|
|
39402
|
+
message.tenderdash = String(object.tenderdash);
|
|
39403
|
+
return message;
|
|
39404
|
+
};
|
|
39405
|
+
|
|
39406
|
+
/**
|
|
39407
|
+
* Creates a plain object from a Software message. Also converts values to other types if specified.
|
|
39408
|
+
* @function toObject
|
|
39409
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39410
|
+
* @static
|
|
39411
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} message Software
|
|
39412
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
39413
|
+
* @returns {Object.<string,*>} Plain object
|
|
39414
|
+
*/
|
|
39415
|
+
Software.toObject = function toObject(message, options) {
|
|
39416
|
+
if (!options)
|
|
39417
|
+
options = {};
|
|
39418
|
+
var object = {};
|
|
39419
|
+
if (options.defaults) {
|
|
39420
|
+
object.dapi = "";
|
|
39421
|
+
object.drive = "";
|
|
39422
|
+
object.tenderdash = "";
|
|
39423
|
+
}
|
|
39424
|
+
if (message.dapi != null && message.hasOwnProperty("dapi"))
|
|
39425
|
+
object.dapi = message.dapi;
|
|
39426
|
+
if (message.drive != null && message.hasOwnProperty("drive"))
|
|
39427
|
+
object.drive = message.drive;
|
|
39428
|
+
if (message.tenderdash != null && message.hasOwnProperty("tenderdash"))
|
|
39429
|
+
object.tenderdash = message.tenderdash;
|
|
39430
|
+
return object;
|
|
39431
|
+
};
|
|
39432
|
+
|
|
39433
|
+
/**
|
|
39434
|
+
* Converts this Software to JSON.
|
|
39435
|
+
* @function toJSON
|
|
39436
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software
|
|
39437
|
+
* @instance
|
|
39438
|
+
* @returns {Object.<string,*>} JSON object
|
|
39439
|
+
*/
|
|
39440
|
+
Software.prototype.toJSON = function toJSON() {
|
|
39441
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
39442
|
+
};
|
|
39443
|
+
|
|
39444
|
+
return Software;
|
|
39445
|
+
})();
|
|
39446
|
+
|
|
39447
|
+
Version.Protocol = (function() {
|
|
39448
|
+
|
|
39449
|
+
/**
|
|
39450
|
+
* Properties of a Protocol.
|
|
39451
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39452
|
+
* @interface IProtocol
|
|
39453
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.ITenderdash|null} [tenderdash] Protocol tenderdash
|
|
39454
|
+
* @property {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.IDrive|null} [drive] Protocol drive
|
|
39455
|
+
*/
|
|
39456
|
+
|
|
39457
|
+
/**
|
|
39458
|
+
* Constructs a new Protocol.
|
|
39459
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version
|
|
39460
|
+
* @classdesc Represents a Protocol.
|
|
39461
|
+
* @implements IProtocol
|
|
39462
|
+
* @constructor
|
|
39463
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.IProtocol=} [properties] Properties to set
|
|
39464
|
+
*/
|
|
39465
|
+
function Protocol(properties) {
|
|
39466
|
+
if (properties)
|
|
39467
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
39468
|
+
if (properties[keys[i]] != null)
|
|
39469
|
+
this[keys[i]] = properties[keys[i]];
|
|
39470
|
+
}
|
|
39471
|
+
|
|
39472
|
+
/**
|
|
39473
|
+
* Protocol tenderdash.
|
|
39474
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.ITenderdash|null|undefined} tenderdash
|
|
39475
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39476
|
+
* @instance
|
|
39477
|
+
*/
|
|
39478
|
+
Protocol.prototype.tenderdash = null;
|
|
39479
|
+
|
|
39480
|
+
/**
|
|
39481
|
+
* Protocol drive.
|
|
39482
|
+
* @member {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.IDrive|null|undefined} drive
|
|
39483
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39484
|
+
* @instance
|
|
39485
|
+
*/
|
|
39486
|
+
Protocol.prototype.drive = null;
|
|
39487
|
+
|
|
39488
|
+
/**
|
|
39489
|
+
* Creates a new Protocol instance using the specified properties.
|
|
39490
|
+
* @function create
|
|
39491
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39492
|
+
* @static
|
|
39493
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.IProtocol=} [properties] Properties to set
|
|
39494
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} Protocol instance
|
|
39495
|
+
*/
|
|
39496
|
+
Protocol.create = function create(properties) {
|
|
39497
|
+
return new Protocol(properties);
|
|
39498
|
+
};
|
|
39499
|
+
|
|
39500
|
+
/**
|
|
39501
|
+
* Encodes the specified Protocol message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.verify|verify} messages.
|
|
39502
|
+
* @function encode
|
|
39503
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39504
|
+
* @static
|
|
39505
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.IProtocol} message Protocol message or plain object to encode
|
|
39506
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39507
|
+
* @returns {$protobuf.Writer} Writer
|
|
39508
|
+
*/
|
|
39509
|
+
Protocol.encode = function encode(message, writer) {
|
|
39510
|
+
if (!writer)
|
|
39511
|
+
writer = $Writer.create();
|
|
39512
|
+
if (message.tenderdash != null && Object.hasOwnProperty.call(message, "tenderdash"))
|
|
39513
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.encode(message.tenderdash, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
39514
|
+
if (message.drive != null && Object.hasOwnProperty.call(message, "drive"))
|
|
39515
|
+
$root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.encode(message.drive, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
39516
|
+
return writer;
|
|
39517
|
+
};
|
|
39518
|
+
|
|
39519
|
+
/**
|
|
39520
|
+
* Encodes the specified Protocol message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.verify|verify} messages.
|
|
39521
|
+
* @function encodeDelimited
|
|
39522
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39523
|
+
* @static
|
|
39524
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.IProtocol} message Protocol message or plain object to encode
|
|
39525
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39526
|
+
* @returns {$protobuf.Writer} Writer
|
|
39527
|
+
*/
|
|
39528
|
+
Protocol.encodeDelimited = function encodeDelimited(message, writer) {
|
|
39529
|
+
return this.encode(message, writer).ldelim();
|
|
39530
|
+
};
|
|
39531
|
+
|
|
39532
|
+
/**
|
|
39533
|
+
* Decodes a Protocol message from the specified reader or buffer.
|
|
39534
|
+
* @function decode
|
|
39535
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39536
|
+
* @static
|
|
39537
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39538
|
+
* @param {number} [length] Message length if known beforehand
|
|
39539
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} Protocol
|
|
39540
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39541
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39542
|
+
*/
|
|
39543
|
+
Protocol.decode = function decode(reader, length) {
|
|
39544
|
+
if (!(reader instanceof $Reader))
|
|
39545
|
+
reader = $Reader.create(reader);
|
|
39546
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol();
|
|
39547
|
+
while (reader.pos < end) {
|
|
39548
|
+
var tag = reader.uint32();
|
|
39549
|
+
switch (tag >>> 3) {
|
|
39550
|
+
case 1:
|
|
39551
|
+
message.tenderdash = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.decode(reader, reader.uint32());
|
|
39552
|
+
break;
|
|
39553
|
+
case 2:
|
|
39554
|
+
message.drive = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.decode(reader, reader.uint32());
|
|
39555
|
+
break;
|
|
39556
|
+
default:
|
|
39557
|
+
reader.skipType(tag & 7);
|
|
39558
|
+
break;
|
|
39559
|
+
}
|
|
39560
|
+
}
|
|
39561
|
+
return message;
|
|
39562
|
+
};
|
|
39563
|
+
|
|
39564
|
+
/**
|
|
39565
|
+
* Decodes a Protocol message from the specified reader or buffer, length delimited.
|
|
39566
|
+
* @function decodeDelimited
|
|
39567
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39568
|
+
* @static
|
|
39569
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39570
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} Protocol
|
|
39571
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39572
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39573
|
+
*/
|
|
39574
|
+
Protocol.decodeDelimited = function decodeDelimited(reader) {
|
|
39575
|
+
if (!(reader instanceof $Reader))
|
|
39576
|
+
reader = new $Reader(reader);
|
|
39577
|
+
return this.decode(reader, reader.uint32());
|
|
39578
|
+
};
|
|
39579
|
+
|
|
39580
|
+
/**
|
|
39581
|
+
* Verifies a Protocol message.
|
|
39582
|
+
* @function verify
|
|
39583
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39584
|
+
* @static
|
|
39585
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
39586
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
39587
|
+
*/
|
|
39588
|
+
Protocol.verify = function verify(message) {
|
|
39589
|
+
if (typeof message !== "object" || message === null)
|
|
39590
|
+
return "object expected";
|
|
39591
|
+
if (message.tenderdash != null && message.hasOwnProperty("tenderdash")) {
|
|
39592
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.verify(message.tenderdash);
|
|
39593
|
+
if (error)
|
|
39594
|
+
return "tenderdash." + error;
|
|
39595
|
+
}
|
|
39596
|
+
if (message.drive != null && message.hasOwnProperty("drive")) {
|
|
39597
|
+
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.verify(message.drive);
|
|
39598
|
+
if (error)
|
|
39599
|
+
return "drive." + error;
|
|
39600
|
+
}
|
|
39601
|
+
return null;
|
|
39602
|
+
};
|
|
39603
|
+
|
|
39604
|
+
/**
|
|
39605
|
+
* Creates a Protocol message from a plain object. Also converts values to their respective internal types.
|
|
39606
|
+
* @function fromObject
|
|
39607
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39608
|
+
* @static
|
|
39609
|
+
* @param {Object.<string,*>} object Plain object
|
|
39610
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} Protocol
|
|
39611
|
+
*/
|
|
39612
|
+
Protocol.fromObject = function fromObject(object) {
|
|
39613
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol)
|
|
39614
|
+
return object;
|
|
39615
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol();
|
|
39616
|
+
if (object.tenderdash != null) {
|
|
39617
|
+
if (typeof object.tenderdash !== "object")
|
|
39618
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.tenderdash: object expected");
|
|
39619
|
+
message.tenderdash = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.fromObject(object.tenderdash);
|
|
39620
|
+
}
|
|
39621
|
+
if (object.drive != null) {
|
|
39622
|
+
if (typeof object.drive !== "object")
|
|
39623
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.drive: object expected");
|
|
39624
|
+
message.drive = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.fromObject(object.drive);
|
|
39625
|
+
}
|
|
39626
|
+
return message;
|
|
39627
|
+
};
|
|
39628
|
+
|
|
39629
|
+
/**
|
|
39630
|
+
* Creates a plain object from a Protocol message. Also converts values to other types if specified.
|
|
39631
|
+
* @function toObject
|
|
39632
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39633
|
+
* @static
|
|
39634
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} message Protocol
|
|
39635
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
39636
|
+
* @returns {Object.<string,*>} Plain object
|
|
39637
|
+
*/
|
|
39638
|
+
Protocol.toObject = function toObject(message, options) {
|
|
39639
|
+
if (!options)
|
|
39640
|
+
options = {};
|
|
39641
|
+
var object = {};
|
|
39642
|
+
if (options.defaults) {
|
|
39643
|
+
object.tenderdash = null;
|
|
39644
|
+
object.drive = null;
|
|
39645
|
+
}
|
|
39646
|
+
if (message.tenderdash != null && message.hasOwnProperty("tenderdash"))
|
|
39647
|
+
object.tenderdash = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(message.tenderdash, options);
|
|
39648
|
+
if (message.drive != null && message.hasOwnProperty("drive"))
|
|
39649
|
+
object.drive = $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(message.drive, options);
|
|
39650
|
+
return object;
|
|
39651
|
+
};
|
|
39652
|
+
|
|
39653
|
+
/**
|
|
39654
|
+
* Converts this Protocol to JSON.
|
|
39655
|
+
* @function toJSON
|
|
39656
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39657
|
+
* @instance
|
|
39658
|
+
* @returns {Object.<string,*>} JSON object
|
|
39659
|
+
*/
|
|
39660
|
+
Protocol.prototype.toJSON = function toJSON() {
|
|
39661
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
39662
|
+
};
|
|
39663
|
+
|
|
39664
|
+
Protocol.Tenderdash = (function() {
|
|
39665
|
+
|
|
39666
|
+
/**
|
|
39667
|
+
* Properties of a Tenderdash.
|
|
39668
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39669
|
+
* @interface ITenderdash
|
|
39670
|
+
* @property {number|null} [p2p] Tenderdash p2p
|
|
39671
|
+
* @property {number|null} [block] Tenderdash block
|
|
39672
|
+
*/
|
|
39673
|
+
|
|
39674
|
+
/**
|
|
39675
|
+
* Constructs a new Tenderdash.
|
|
39676
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39677
|
+
* @classdesc Represents a Tenderdash.
|
|
39678
|
+
* @implements ITenderdash
|
|
39679
|
+
* @constructor
|
|
39680
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.ITenderdash=} [properties] Properties to set
|
|
39681
|
+
*/
|
|
39682
|
+
function Tenderdash(properties) {
|
|
39683
|
+
if (properties)
|
|
39684
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
39685
|
+
if (properties[keys[i]] != null)
|
|
39686
|
+
this[keys[i]] = properties[keys[i]];
|
|
39687
|
+
}
|
|
39688
|
+
|
|
39689
|
+
/**
|
|
39690
|
+
* Tenderdash p2p.
|
|
39691
|
+
* @member {number} p2p
|
|
39692
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39693
|
+
* @instance
|
|
39694
|
+
*/
|
|
39695
|
+
Tenderdash.prototype.p2p = 0;
|
|
39696
|
+
|
|
39697
|
+
/**
|
|
39698
|
+
* Tenderdash block.
|
|
39699
|
+
* @member {number} block
|
|
39700
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39701
|
+
* @instance
|
|
39702
|
+
*/
|
|
39703
|
+
Tenderdash.prototype.block = 0;
|
|
39704
|
+
|
|
39705
|
+
/**
|
|
39706
|
+
* Creates a new Tenderdash instance using the specified properties.
|
|
39707
|
+
* @function create
|
|
39708
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39709
|
+
* @static
|
|
39710
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.ITenderdash=} [properties] Properties to set
|
|
39711
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} Tenderdash instance
|
|
39712
|
+
*/
|
|
39713
|
+
Tenderdash.create = function create(properties) {
|
|
39714
|
+
return new Tenderdash(properties);
|
|
39715
|
+
};
|
|
39716
|
+
|
|
39717
|
+
/**
|
|
39718
|
+
* Encodes the specified Tenderdash message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.verify|verify} messages.
|
|
39719
|
+
* @function encode
|
|
39720
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39721
|
+
* @static
|
|
39722
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.ITenderdash} message Tenderdash message or plain object to encode
|
|
39723
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39724
|
+
* @returns {$protobuf.Writer} Writer
|
|
39725
|
+
*/
|
|
39726
|
+
Tenderdash.encode = function encode(message, writer) {
|
|
39727
|
+
if (!writer)
|
|
39728
|
+
writer = $Writer.create();
|
|
39729
|
+
if (message.p2p != null && Object.hasOwnProperty.call(message, "p2p"))
|
|
39730
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.p2p);
|
|
39731
|
+
if (message.block != null && Object.hasOwnProperty.call(message, "block"))
|
|
39732
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.block);
|
|
39733
|
+
return writer;
|
|
39734
|
+
};
|
|
39735
|
+
|
|
39736
|
+
/**
|
|
39737
|
+
* Encodes the specified Tenderdash message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.verify|verify} messages.
|
|
39738
|
+
* @function encodeDelimited
|
|
39739
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39740
|
+
* @static
|
|
39741
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.ITenderdash} message Tenderdash message or plain object to encode
|
|
39742
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39743
|
+
* @returns {$protobuf.Writer} Writer
|
|
39744
|
+
*/
|
|
39745
|
+
Tenderdash.encodeDelimited = function encodeDelimited(message, writer) {
|
|
39746
|
+
return this.encode(message, writer).ldelim();
|
|
39747
|
+
};
|
|
39748
|
+
|
|
39749
|
+
/**
|
|
39750
|
+
* Decodes a Tenderdash message from the specified reader or buffer.
|
|
39751
|
+
* @function decode
|
|
39752
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39753
|
+
* @static
|
|
39754
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39755
|
+
* @param {number} [length] Message length if known beforehand
|
|
39756
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} Tenderdash
|
|
39757
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39758
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39759
|
+
*/
|
|
39760
|
+
Tenderdash.decode = function decode(reader, length) {
|
|
39761
|
+
if (!(reader instanceof $Reader))
|
|
39762
|
+
reader = $Reader.create(reader);
|
|
39763
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash();
|
|
39764
|
+
while (reader.pos < end) {
|
|
39765
|
+
var tag = reader.uint32();
|
|
39766
|
+
switch (tag >>> 3) {
|
|
39767
|
+
case 1:
|
|
39768
|
+
message.p2p = reader.uint32();
|
|
39769
|
+
break;
|
|
39770
|
+
case 2:
|
|
39771
|
+
message.block = reader.uint32();
|
|
39772
|
+
break;
|
|
39773
|
+
default:
|
|
39774
|
+
reader.skipType(tag & 7);
|
|
39775
|
+
break;
|
|
39776
|
+
}
|
|
39777
|
+
}
|
|
39778
|
+
return message;
|
|
39779
|
+
};
|
|
39780
|
+
|
|
39781
|
+
/**
|
|
39782
|
+
* Decodes a Tenderdash message from the specified reader or buffer, length delimited.
|
|
39783
|
+
* @function decodeDelimited
|
|
39784
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39785
|
+
* @static
|
|
39786
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39787
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} Tenderdash
|
|
39788
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39789
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39790
|
+
*/
|
|
39791
|
+
Tenderdash.decodeDelimited = function decodeDelimited(reader) {
|
|
39792
|
+
if (!(reader instanceof $Reader))
|
|
39793
|
+
reader = new $Reader(reader);
|
|
39794
|
+
return this.decode(reader, reader.uint32());
|
|
39795
|
+
};
|
|
39796
|
+
|
|
39797
|
+
/**
|
|
39798
|
+
* Verifies a Tenderdash message.
|
|
39799
|
+
* @function verify
|
|
39800
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39801
|
+
* @static
|
|
39802
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
39803
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
39804
|
+
*/
|
|
39805
|
+
Tenderdash.verify = function verify(message) {
|
|
39806
|
+
if (typeof message !== "object" || message === null)
|
|
39807
|
+
return "object expected";
|
|
39808
|
+
if (message.p2p != null && message.hasOwnProperty("p2p"))
|
|
39809
|
+
if (!$util.isInteger(message.p2p))
|
|
39810
|
+
return "p2p: integer expected";
|
|
39811
|
+
if (message.block != null && message.hasOwnProperty("block"))
|
|
39812
|
+
if (!$util.isInteger(message.block))
|
|
39813
|
+
return "block: integer expected";
|
|
39814
|
+
return null;
|
|
39815
|
+
};
|
|
39816
|
+
|
|
39817
|
+
/**
|
|
39818
|
+
* Creates a Tenderdash message from a plain object. Also converts values to their respective internal types.
|
|
39819
|
+
* @function fromObject
|
|
39820
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39821
|
+
* @static
|
|
39822
|
+
* @param {Object.<string,*>} object Plain object
|
|
39823
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} Tenderdash
|
|
39824
|
+
*/
|
|
39825
|
+
Tenderdash.fromObject = function fromObject(object) {
|
|
39826
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash)
|
|
39827
|
+
return object;
|
|
39828
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash();
|
|
39829
|
+
if (object.p2p != null)
|
|
39830
|
+
message.p2p = object.p2p >>> 0;
|
|
39831
|
+
if (object.block != null)
|
|
39832
|
+
message.block = object.block >>> 0;
|
|
39833
|
+
return message;
|
|
39834
|
+
};
|
|
39835
|
+
|
|
39836
|
+
/**
|
|
39837
|
+
* Creates a plain object from a Tenderdash message. Also converts values to other types if specified.
|
|
39838
|
+
* @function toObject
|
|
39839
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39840
|
+
* @static
|
|
39841
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} message Tenderdash
|
|
39842
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
39843
|
+
* @returns {Object.<string,*>} Plain object
|
|
39844
|
+
*/
|
|
39845
|
+
Tenderdash.toObject = function toObject(message, options) {
|
|
39846
|
+
if (!options)
|
|
39847
|
+
options = {};
|
|
39848
|
+
var object = {};
|
|
39849
|
+
if (options.defaults) {
|
|
39850
|
+
object.p2p = 0;
|
|
39851
|
+
object.block = 0;
|
|
39852
|
+
}
|
|
39853
|
+
if (message.p2p != null && message.hasOwnProperty("p2p"))
|
|
39854
|
+
object.p2p = message.p2p;
|
|
39855
|
+
if (message.block != null && message.hasOwnProperty("block"))
|
|
39856
|
+
object.block = message.block;
|
|
39857
|
+
return object;
|
|
39858
|
+
};
|
|
39859
|
+
|
|
39860
|
+
/**
|
|
39861
|
+
* Converts this Tenderdash to JSON.
|
|
39862
|
+
* @function toJSON
|
|
39863
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash
|
|
39864
|
+
* @instance
|
|
39865
|
+
* @returns {Object.<string,*>} JSON object
|
|
39866
|
+
*/
|
|
39867
|
+
Tenderdash.prototype.toJSON = function toJSON() {
|
|
39868
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
39869
|
+
};
|
|
39870
|
+
|
|
39871
|
+
return Tenderdash;
|
|
39872
|
+
})();
|
|
39873
|
+
|
|
39874
|
+
Protocol.Drive = (function() {
|
|
39875
|
+
|
|
39876
|
+
/**
|
|
39877
|
+
* Properties of a Drive.
|
|
39878
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39879
|
+
* @interface IDrive
|
|
39880
|
+
* @property {number|null} [latest] Drive latest
|
|
39881
|
+
* @property {number|null} [current] Drive current
|
|
39882
|
+
*/
|
|
39883
|
+
|
|
39884
|
+
/**
|
|
39885
|
+
* Constructs a new Drive.
|
|
39886
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol
|
|
39887
|
+
* @classdesc Represents a Drive.
|
|
39888
|
+
* @implements IDrive
|
|
39889
|
+
* @constructor
|
|
39890
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.IDrive=} [properties] Properties to set
|
|
39891
|
+
*/
|
|
39892
|
+
function Drive(properties) {
|
|
39893
|
+
if (properties)
|
|
39894
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
39895
|
+
if (properties[keys[i]] != null)
|
|
39896
|
+
this[keys[i]] = properties[keys[i]];
|
|
39897
|
+
}
|
|
39898
|
+
|
|
39899
|
+
/**
|
|
39900
|
+
* Drive latest.
|
|
39901
|
+
* @member {number} latest
|
|
39902
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
39903
|
+
* @instance
|
|
39904
|
+
*/
|
|
39905
|
+
Drive.prototype.latest = 0;
|
|
39906
|
+
|
|
39907
|
+
/**
|
|
39908
|
+
* Drive current.
|
|
39909
|
+
* @member {number} current
|
|
39910
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
39911
|
+
* @instance
|
|
39912
|
+
*/
|
|
39913
|
+
Drive.prototype.current = 0;
|
|
39914
|
+
|
|
39915
|
+
/**
|
|
39916
|
+
* Creates a new Drive instance using the specified properties.
|
|
39917
|
+
* @function create
|
|
39918
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
39919
|
+
* @static
|
|
39920
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.IDrive=} [properties] Properties to set
|
|
39921
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} Drive instance
|
|
39922
|
+
*/
|
|
39923
|
+
Drive.create = function create(properties) {
|
|
39924
|
+
return new Drive(properties);
|
|
39925
|
+
};
|
|
39926
|
+
|
|
39927
|
+
/**
|
|
39928
|
+
* Encodes the specified Drive message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.verify|verify} messages.
|
|
39929
|
+
* @function encode
|
|
39930
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
39931
|
+
* @static
|
|
39932
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.IDrive} message Drive message or plain object to encode
|
|
39933
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39934
|
+
* @returns {$protobuf.Writer} Writer
|
|
39935
|
+
*/
|
|
39936
|
+
Drive.encode = function encode(message, writer) {
|
|
39937
|
+
if (!writer)
|
|
39938
|
+
writer = $Writer.create();
|
|
39939
|
+
if (message.latest != null && Object.hasOwnProperty.call(message, "latest"))
|
|
39940
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.latest);
|
|
39941
|
+
if (message.current != null && Object.hasOwnProperty.call(message, "current"))
|
|
39942
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.current);
|
|
39943
|
+
return writer;
|
|
39944
|
+
};
|
|
39945
|
+
|
|
39946
|
+
/**
|
|
39947
|
+
* Encodes the specified Drive message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.verify|verify} messages.
|
|
39948
|
+
* @function encodeDelimited
|
|
39949
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
39950
|
+
* @static
|
|
39951
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.IDrive} message Drive message or plain object to encode
|
|
39952
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39953
|
+
* @returns {$protobuf.Writer} Writer
|
|
39954
|
+
*/
|
|
39955
|
+
Drive.encodeDelimited = function encodeDelimited(message, writer) {
|
|
39956
|
+
return this.encode(message, writer).ldelim();
|
|
39957
|
+
};
|
|
39958
|
+
|
|
39959
|
+
/**
|
|
39960
|
+
* Decodes a Drive message from the specified reader or buffer.
|
|
39961
|
+
* @function decode
|
|
39962
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
39963
|
+
* @static
|
|
39964
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39965
|
+
* @param {number} [length] Message length if known beforehand
|
|
39966
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} Drive
|
|
39967
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39968
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39969
|
+
*/
|
|
39970
|
+
Drive.decode = function decode(reader, length) {
|
|
39971
|
+
if (!(reader instanceof $Reader))
|
|
39972
|
+
reader = $Reader.create(reader);
|
|
39973
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive();
|
|
39974
|
+
while (reader.pos < end) {
|
|
39975
|
+
var tag = reader.uint32();
|
|
39976
|
+
switch (tag >>> 3) {
|
|
39977
|
+
case 3:
|
|
39978
|
+
message.latest = reader.uint32();
|
|
39979
|
+
break;
|
|
39980
|
+
case 4:
|
|
39981
|
+
message.current = reader.uint32();
|
|
39982
|
+
break;
|
|
39983
|
+
default:
|
|
39984
|
+
reader.skipType(tag & 7);
|
|
39985
|
+
break;
|
|
39986
|
+
}
|
|
39987
|
+
}
|
|
39988
|
+
return message;
|
|
39989
|
+
};
|
|
39990
|
+
|
|
39991
|
+
/**
|
|
39992
|
+
* Decodes a Drive message from the specified reader or buffer, length delimited.
|
|
39993
|
+
* @function decodeDelimited
|
|
39994
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
39995
|
+
* @static
|
|
39996
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39997
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} Drive
|
|
39998
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39999
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40000
|
+
*/
|
|
40001
|
+
Drive.decodeDelimited = function decodeDelimited(reader) {
|
|
40002
|
+
if (!(reader instanceof $Reader))
|
|
40003
|
+
reader = new $Reader(reader);
|
|
40004
|
+
return this.decode(reader, reader.uint32());
|
|
40005
|
+
};
|
|
40006
|
+
|
|
40007
|
+
/**
|
|
40008
|
+
* Verifies a Drive message.
|
|
40009
|
+
* @function verify
|
|
40010
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
40011
|
+
* @static
|
|
40012
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
40013
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
40014
|
+
*/
|
|
40015
|
+
Drive.verify = function verify(message) {
|
|
40016
|
+
if (typeof message !== "object" || message === null)
|
|
40017
|
+
return "object expected";
|
|
40018
|
+
if (message.latest != null && message.hasOwnProperty("latest"))
|
|
40019
|
+
if (!$util.isInteger(message.latest))
|
|
40020
|
+
return "latest: integer expected";
|
|
40021
|
+
if (message.current != null && message.hasOwnProperty("current"))
|
|
40022
|
+
if (!$util.isInteger(message.current))
|
|
40023
|
+
return "current: integer expected";
|
|
40024
|
+
return null;
|
|
40025
|
+
};
|
|
40026
|
+
|
|
40027
|
+
/**
|
|
40028
|
+
* Creates a Drive message from a plain object. Also converts values to their respective internal types.
|
|
40029
|
+
* @function fromObject
|
|
40030
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
40031
|
+
* @static
|
|
40032
|
+
* @param {Object.<string,*>} object Plain object
|
|
40033
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} Drive
|
|
40034
|
+
*/
|
|
40035
|
+
Drive.fromObject = function fromObject(object) {
|
|
40036
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive)
|
|
40037
|
+
return object;
|
|
40038
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive();
|
|
40039
|
+
if (object.latest != null)
|
|
40040
|
+
message.latest = object.latest >>> 0;
|
|
40041
|
+
if (object.current != null)
|
|
40042
|
+
message.current = object.current >>> 0;
|
|
40043
|
+
return message;
|
|
40044
|
+
};
|
|
40045
|
+
|
|
40046
|
+
/**
|
|
40047
|
+
* Creates a plain object from a Drive message. Also converts values to other types if specified.
|
|
40048
|
+
* @function toObject
|
|
40049
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
40050
|
+
* @static
|
|
40051
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} message Drive
|
|
40052
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
40053
|
+
* @returns {Object.<string,*>} Plain object
|
|
40054
|
+
*/
|
|
40055
|
+
Drive.toObject = function toObject(message, options) {
|
|
40056
|
+
if (!options)
|
|
40057
|
+
options = {};
|
|
40058
|
+
var object = {};
|
|
40059
|
+
if (options.defaults) {
|
|
40060
|
+
object.latest = 0;
|
|
40061
|
+
object.current = 0;
|
|
40062
|
+
}
|
|
40063
|
+
if (message.latest != null && message.hasOwnProperty("latest"))
|
|
40064
|
+
object.latest = message.latest;
|
|
40065
|
+
if (message.current != null && message.hasOwnProperty("current"))
|
|
40066
|
+
object.current = message.current;
|
|
40067
|
+
return object;
|
|
40068
|
+
};
|
|
40069
|
+
|
|
40070
|
+
/**
|
|
40071
|
+
* Converts this Drive to JSON.
|
|
40072
|
+
* @function toJSON
|
|
40073
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive
|
|
40074
|
+
* @instance
|
|
40075
|
+
* @returns {Object.<string,*>} JSON object
|
|
40076
|
+
*/
|
|
40077
|
+
Drive.prototype.toJSON = function toJSON() {
|
|
40078
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
40079
|
+
};
|
|
40080
|
+
|
|
40081
|
+
return Drive;
|
|
40082
|
+
})();
|
|
40083
|
+
|
|
40084
|
+
return Protocol;
|
|
40085
|
+
})();
|
|
40086
|
+
|
|
40087
|
+
return Version;
|
|
40088
|
+
})();
|
|
40089
|
+
|
|
40090
|
+
GetStatusResponseV0.Time = (function() {
|
|
40091
|
+
|
|
40092
|
+
/**
|
|
40093
|
+
* Properties of a Time.
|
|
40094
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
40095
|
+
* @interface ITime
|
|
40096
|
+
* @property {number|Long|null} [local] Time local
|
|
40097
|
+
* @property {number|Long|null} [block] Time block
|
|
40098
|
+
* @property {number|Long|null} [genesis] Time genesis
|
|
40099
|
+
* @property {number|null} [epoch] Time epoch
|
|
40100
|
+
*/
|
|
40101
|
+
|
|
40102
|
+
/**
|
|
40103
|
+
* Constructs a new Time.
|
|
40104
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
40105
|
+
* @classdesc Represents a Time.
|
|
40106
|
+
* @implements ITime
|
|
40107
|
+
* @constructor
|
|
40108
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.ITime=} [properties] Properties to set
|
|
40109
|
+
*/
|
|
40110
|
+
function Time(properties) {
|
|
40111
|
+
if (properties)
|
|
40112
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
40113
|
+
if (properties[keys[i]] != null)
|
|
40114
|
+
this[keys[i]] = properties[keys[i]];
|
|
40115
|
+
}
|
|
40116
|
+
|
|
40117
|
+
/**
|
|
40118
|
+
* Time local.
|
|
40119
|
+
* @member {number|Long} local
|
|
40120
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40121
|
+
* @instance
|
|
40122
|
+
*/
|
|
40123
|
+
Time.prototype.local = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
40124
|
+
|
|
40125
|
+
/**
|
|
40126
|
+
* Time block.
|
|
40127
|
+
* @member {number|Long} block
|
|
40128
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40129
|
+
* @instance
|
|
40130
|
+
*/
|
|
40131
|
+
Time.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
40132
|
+
|
|
40133
|
+
/**
|
|
40134
|
+
* Time genesis.
|
|
40135
|
+
* @member {number|Long} genesis
|
|
40136
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40137
|
+
* @instance
|
|
40138
|
+
*/
|
|
40139
|
+
Time.prototype.genesis = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
40140
|
+
|
|
40141
|
+
/**
|
|
40142
|
+
* Time epoch.
|
|
40143
|
+
* @member {number} epoch
|
|
40144
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40145
|
+
* @instance
|
|
40146
|
+
*/
|
|
40147
|
+
Time.prototype.epoch = 0;
|
|
40148
|
+
|
|
40149
|
+
/**
|
|
40150
|
+
* Creates a new Time instance using the specified properties.
|
|
40151
|
+
* @function create
|
|
40152
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40153
|
+
* @static
|
|
40154
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.ITime=} [properties] Properties to set
|
|
40155
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} Time instance
|
|
40156
|
+
*/
|
|
40157
|
+
Time.create = function create(properties) {
|
|
40158
|
+
return new Time(properties);
|
|
40159
|
+
};
|
|
40160
|
+
|
|
40161
|
+
/**
|
|
40162
|
+
* Encodes the specified Time message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.verify|verify} messages.
|
|
40163
|
+
* @function encode
|
|
40164
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40165
|
+
* @static
|
|
40166
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.ITime} message Time message or plain object to encode
|
|
40167
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40168
|
+
* @returns {$protobuf.Writer} Writer
|
|
40169
|
+
*/
|
|
40170
|
+
Time.encode = function encode(message, writer) {
|
|
40171
|
+
if (!writer)
|
|
40172
|
+
writer = $Writer.create();
|
|
40173
|
+
if (message.local != null && Object.hasOwnProperty.call(message, "local"))
|
|
40174
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.local);
|
|
40175
|
+
if (message.block != null && Object.hasOwnProperty.call(message, "block"))
|
|
40176
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.block);
|
|
40177
|
+
if (message.genesis != null && Object.hasOwnProperty.call(message, "genesis"))
|
|
40178
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.genesis);
|
|
40179
|
+
if (message.epoch != null && Object.hasOwnProperty.call(message, "epoch"))
|
|
40180
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.epoch);
|
|
40181
|
+
return writer;
|
|
40182
|
+
};
|
|
40183
|
+
|
|
40184
|
+
/**
|
|
40185
|
+
* Encodes the specified Time message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.verify|verify} messages.
|
|
40186
|
+
* @function encodeDelimited
|
|
40187
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40188
|
+
* @static
|
|
40189
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.ITime} message Time message or plain object to encode
|
|
40190
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40191
|
+
* @returns {$protobuf.Writer} Writer
|
|
40192
|
+
*/
|
|
40193
|
+
Time.encodeDelimited = function encodeDelimited(message, writer) {
|
|
40194
|
+
return this.encode(message, writer).ldelim();
|
|
40195
|
+
};
|
|
40196
|
+
|
|
40197
|
+
/**
|
|
40198
|
+
* Decodes a Time message from the specified reader or buffer.
|
|
40199
|
+
* @function decode
|
|
40200
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40201
|
+
* @static
|
|
40202
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40203
|
+
* @param {number} [length] Message length if known beforehand
|
|
40204
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} Time
|
|
40205
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40206
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40207
|
+
*/
|
|
40208
|
+
Time.decode = function decode(reader, length) {
|
|
40209
|
+
if (!(reader instanceof $Reader))
|
|
40210
|
+
reader = $Reader.create(reader);
|
|
40211
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time();
|
|
40212
|
+
while (reader.pos < end) {
|
|
40213
|
+
var tag = reader.uint32();
|
|
40214
|
+
switch (tag >>> 3) {
|
|
40215
|
+
case 1:
|
|
40216
|
+
message.local = reader.uint64();
|
|
40217
|
+
break;
|
|
40218
|
+
case 2:
|
|
40219
|
+
message.block = reader.uint64();
|
|
40220
|
+
break;
|
|
40221
|
+
case 3:
|
|
40222
|
+
message.genesis = reader.uint64();
|
|
40223
|
+
break;
|
|
40224
|
+
case 4:
|
|
40225
|
+
message.epoch = reader.uint32();
|
|
40226
|
+
break;
|
|
40227
|
+
default:
|
|
40228
|
+
reader.skipType(tag & 7);
|
|
40229
|
+
break;
|
|
40230
|
+
}
|
|
40231
|
+
}
|
|
40232
|
+
return message;
|
|
40233
|
+
};
|
|
40234
|
+
|
|
40235
|
+
/**
|
|
40236
|
+
* Decodes a Time message from the specified reader or buffer, length delimited.
|
|
40237
|
+
* @function decodeDelimited
|
|
40238
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40239
|
+
* @static
|
|
40240
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40241
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} Time
|
|
40242
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40243
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40244
|
+
*/
|
|
40245
|
+
Time.decodeDelimited = function decodeDelimited(reader) {
|
|
40246
|
+
if (!(reader instanceof $Reader))
|
|
40247
|
+
reader = new $Reader(reader);
|
|
40248
|
+
return this.decode(reader, reader.uint32());
|
|
40249
|
+
};
|
|
40250
|
+
|
|
40251
|
+
/**
|
|
40252
|
+
* Verifies a Time message.
|
|
40253
|
+
* @function verify
|
|
40254
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40255
|
+
* @static
|
|
40256
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
40257
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
40258
|
+
*/
|
|
40259
|
+
Time.verify = function verify(message) {
|
|
40260
|
+
if (typeof message !== "object" || message === null)
|
|
40261
|
+
return "object expected";
|
|
40262
|
+
if (message.local != null && message.hasOwnProperty("local"))
|
|
40263
|
+
if (!$util.isInteger(message.local) && !(message.local && $util.isInteger(message.local.low) && $util.isInteger(message.local.high)))
|
|
40264
|
+
return "local: integer|Long expected";
|
|
40265
|
+
if (message.block != null && message.hasOwnProperty("block"))
|
|
40266
|
+
if (!$util.isInteger(message.block) && !(message.block && $util.isInteger(message.block.low) && $util.isInteger(message.block.high)))
|
|
40267
|
+
return "block: integer|Long expected";
|
|
40268
|
+
if (message.genesis != null && message.hasOwnProperty("genesis"))
|
|
40269
|
+
if (!$util.isInteger(message.genesis) && !(message.genesis && $util.isInteger(message.genesis.low) && $util.isInteger(message.genesis.high)))
|
|
40270
|
+
return "genesis: integer|Long expected";
|
|
40271
|
+
if (message.epoch != null && message.hasOwnProperty("epoch"))
|
|
40272
|
+
if (!$util.isInteger(message.epoch))
|
|
40273
|
+
return "epoch: integer expected";
|
|
40274
|
+
return null;
|
|
40275
|
+
};
|
|
40276
|
+
|
|
40277
|
+
/**
|
|
40278
|
+
* Creates a Time message from a plain object. Also converts values to their respective internal types.
|
|
40279
|
+
* @function fromObject
|
|
40280
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40281
|
+
* @static
|
|
40282
|
+
* @param {Object.<string,*>} object Plain object
|
|
40283
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} Time
|
|
40284
|
+
*/
|
|
40285
|
+
Time.fromObject = function fromObject(object) {
|
|
40286
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time)
|
|
40287
|
+
return object;
|
|
40288
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time();
|
|
40289
|
+
if (object.local != null)
|
|
40290
|
+
if ($util.Long)
|
|
40291
|
+
(message.local = $util.Long.fromValue(object.local)).unsigned = true;
|
|
40292
|
+
else if (typeof object.local === "string")
|
|
40293
|
+
message.local = parseInt(object.local, 10);
|
|
40294
|
+
else if (typeof object.local === "number")
|
|
40295
|
+
message.local = object.local;
|
|
40296
|
+
else if (typeof object.local === "object")
|
|
40297
|
+
message.local = new $util.LongBits(object.local.low >>> 0, object.local.high >>> 0).toNumber(true);
|
|
40298
|
+
if (object.block != null)
|
|
40299
|
+
if ($util.Long)
|
|
40300
|
+
(message.block = $util.Long.fromValue(object.block)).unsigned = true;
|
|
40301
|
+
else if (typeof object.block === "string")
|
|
40302
|
+
message.block = parseInt(object.block, 10);
|
|
40303
|
+
else if (typeof object.block === "number")
|
|
40304
|
+
message.block = object.block;
|
|
40305
|
+
else if (typeof object.block === "object")
|
|
40306
|
+
message.block = new $util.LongBits(object.block.low >>> 0, object.block.high >>> 0).toNumber(true);
|
|
40307
|
+
if (object.genesis != null)
|
|
40308
|
+
if ($util.Long)
|
|
40309
|
+
(message.genesis = $util.Long.fromValue(object.genesis)).unsigned = true;
|
|
40310
|
+
else if (typeof object.genesis === "string")
|
|
40311
|
+
message.genesis = parseInt(object.genesis, 10);
|
|
40312
|
+
else if (typeof object.genesis === "number")
|
|
40313
|
+
message.genesis = object.genesis;
|
|
40314
|
+
else if (typeof object.genesis === "object")
|
|
40315
|
+
message.genesis = new $util.LongBits(object.genesis.low >>> 0, object.genesis.high >>> 0).toNumber(true);
|
|
40316
|
+
if (object.epoch != null)
|
|
40317
|
+
message.epoch = object.epoch >>> 0;
|
|
40318
|
+
return message;
|
|
40319
|
+
};
|
|
40320
|
+
|
|
40321
|
+
/**
|
|
40322
|
+
* Creates a plain object from a Time message. Also converts values to other types if specified.
|
|
40323
|
+
* @function toObject
|
|
40324
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40325
|
+
* @static
|
|
40326
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} message Time
|
|
40327
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
40328
|
+
* @returns {Object.<string,*>} Plain object
|
|
40329
|
+
*/
|
|
40330
|
+
Time.toObject = function toObject(message, options) {
|
|
40331
|
+
if (!options)
|
|
40332
|
+
options = {};
|
|
40333
|
+
var object = {};
|
|
40334
|
+
if (options.defaults) {
|
|
40335
|
+
if ($util.Long) {
|
|
40336
|
+
var long = new $util.Long(0, 0, true);
|
|
40337
|
+
object.local = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
40338
|
+
} else
|
|
40339
|
+
object.local = options.longs === String ? "0" : 0;
|
|
40340
|
+
if ($util.Long) {
|
|
40341
|
+
var long = new $util.Long(0, 0, true);
|
|
40342
|
+
object.block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
40343
|
+
} else
|
|
40344
|
+
object.block = options.longs === String ? "0" : 0;
|
|
40345
|
+
if ($util.Long) {
|
|
40346
|
+
var long = new $util.Long(0, 0, true);
|
|
40347
|
+
object.genesis = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
40348
|
+
} else
|
|
40349
|
+
object.genesis = options.longs === String ? "0" : 0;
|
|
40350
|
+
object.epoch = 0;
|
|
40351
|
+
}
|
|
40352
|
+
if (message.local != null && message.hasOwnProperty("local"))
|
|
40353
|
+
if (typeof message.local === "number")
|
|
40354
|
+
object.local = options.longs === String ? String(message.local) : message.local;
|
|
40355
|
+
else
|
|
40356
|
+
object.local = options.longs === String ? $util.Long.prototype.toString.call(message.local) : options.longs === Number ? new $util.LongBits(message.local.low >>> 0, message.local.high >>> 0).toNumber(true) : message.local;
|
|
40357
|
+
if (message.block != null && message.hasOwnProperty("block"))
|
|
40358
|
+
if (typeof message.block === "number")
|
|
40359
|
+
object.block = options.longs === String ? String(message.block) : message.block;
|
|
40360
|
+
else
|
|
40361
|
+
object.block = options.longs === String ? $util.Long.prototype.toString.call(message.block) : options.longs === Number ? new $util.LongBits(message.block.low >>> 0, message.block.high >>> 0).toNumber(true) : message.block;
|
|
40362
|
+
if (message.genesis != null && message.hasOwnProperty("genesis"))
|
|
40363
|
+
if (typeof message.genesis === "number")
|
|
40364
|
+
object.genesis = options.longs === String ? String(message.genesis) : message.genesis;
|
|
40365
|
+
else
|
|
40366
|
+
object.genesis = options.longs === String ? $util.Long.prototype.toString.call(message.genesis) : options.longs === Number ? new $util.LongBits(message.genesis.low >>> 0, message.genesis.high >>> 0).toNumber(true) : message.genesis;
|
|
40367
|
+
if (message.epoch != null && message.hasOwnProperty("epoch"))
|
|
40368
|
+
object.epoch = message.epoch;
|
|
40369
|
+
return object;
|
|
40370
|
+
};
|
|
40371
|
+
|
|
40372
|
+
/**
|
|
40373
|
+
* Converts this Time to JSON.
|
|
40374
|
+
* @function toJSON
|
|
40375
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time
|
|
40376
|
+
* @instance
|
|
40377
|
+
* @returns {Object.<string,*>} JSON object
|
|
40378
|
+
*/
|
|
40379
|
+
Time.prototype.toJSON = function toJSON() {
|
|
40380
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
40381
|
+
};
|
|
40382
|
+
|
|
40383
|
+
return Time;
|
|
40384
|
+
})();
|
|
40385
|
+
|
|
40386
|
+
GetStatusResponseV0.Node = (function() {
|
|
40387
|
+
|
|
40388
|
+
/**
|
|
40389
|
+
* Properties of a Node.
|
|
40390
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
40391
|
+
* @interface INode
|
|
40392
|
+
* @property {Uint8Array|null} [id] Node id
|
|
40393
|
+
* @property {Uint8Array|null} [proTxHash] Node proTxHash
|
|
40394
|
+
*/
|
|
40395
|
+
|
|
40396
|
+
/**
|
|
40397
|
+
* Constructs a new Node.
|
|
40398
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
40399
|
+
* @classdesc Represents a Node.
|
|
40400
|
+
* @implements INode
|
|
40401
|
+
* @constructor
|
|
40402
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INode=} [properties] Properties to set
|
|
40403
|
+
*/
|
|
40404
|
+
function Node(properties) {
|
|
40405
|
+
if (properties)
|
|
40406
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
40407
|
+
if (properties[keys[i]] != null)
|
|
40408
|
+
this[keys[i]] = properties[keys[i]];
|
|
40409
|
+
}
|
|
40410
|
+
|
|
40411
|
+
/**
|
|
40412
|
+
* Node id.
|
|
40413
|
+
* @member {Uint8Array} id
|
|
40414
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40415
|
+
* @instance
|
|
40416
|
+
*/
|
|
40417
|
+
Node.prototype.id = $util.newBuffer([]);
|
|
40418
|
+
|
|
40419
|
+
/**
|
|
40420
|
+
* Node proTxHash.
|
|
40421
|
+
* @member {Uint8Array} proTxHash
|
|
40422
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40423
|
+
* @instance
|
|
40424
|
+
*/
|
|
40425
|
+
Node.prototype.proTxHash = $util.newBuffer([]);
|
|
40426
|
+
|
|
40427
|
+
/**
|
|
40428
|
+
* Creates a new Node instance using the specified properties.
|
|
40429
|
+
* @function create
|
|
40430
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40431
|
+
* @static
|
|
40432
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INode=} [properties] Properties to set
|
|
40433
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} Node instance
|
|
40434
|
+
*/
|
|
40435
|
+
Node.create = function create(properties) {
|
|
40436
|
+
return new Node(properties);
|
|
40437
|
+
};
|
|
40438
|
+
|
|
40439
|
+
/**
|
|
40440
|
+
* Encodes the specified Node message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.verify|verify} messages.
|
|
40441
|
+
* @function encode
|
|
40442
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40443
|
+
* @static
|
|
40444
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INode} message Node message or plain object to encode
|
|
40445
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40446
|
+
* @returns {$protobuf.Writer} Writer
|
|
40447
|
+
*/
|
|
40448
|
+
Node.encode = function encode(message, writer) {
|
|
40449
|
+
if (!writer)
|
|
40450
|
+
writer = $Writer.create();
|
|
40451
|
+
if (message.id != null && Object.hasOwnProperty.call(message, "id"))
|
|
40452
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.id);
|
|
40453
|
+
if (message.proTxHash != null && Object.hasOwnProperty.call(message, "proTxHash"))
|
|
40454
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proTxHash);
|
|
40455
|
+
return writer;
|
|
40456
|
+
};
|
|
40457
|
+
|
|
40458
|
+
/**
|
|
40459
|
+
* Encodes the specified Node message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.verify|verify} messages.
|
|
40460
|
+
* @function encodeDelimited
|
|
40461
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40462
|
+
* @static
|
|
40463
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INode} message Node message or plain object to encode
|
|
40464
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40465
|
+
* @returns {$protobuf.Writer} Writer
|
|
40466
|
+
*/
|
|
40467
|
+
Node.encodeDelimited = function encodeDelimited(message, writer) {
|
|
40468
|
+
return this.encode(message, writer).ldelim();
|
|
40469
|
+
};
|
|
40470
|
+
|
|
40471
|
+
/**
|
|
40472
|
+
* Decodes a Node message from the specified reader or buffer.
|
|
40473
|
+
* @function decode
|
|
40474
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40475
|
+
* @static
|
|
40476
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40477
|
+
* @param {number} [length] Message length if known beforehand
|
|
40478
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} Node
|
|
40479
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40480
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40481
|
+
*/
|
|
40482
|
+
Node.decode = function decode(reader, length) {
|
|
40483
|
+
if (!(reader instanceof $Reader))
|
|
40484
|
+
reader = $Reader.create(reader);
|
|
40485
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node();
|
|
40486
|
+
while (reader.pos < end) {
|
|
40487
|
+
var tag = reader.uint32();
|
|
40488
|
+
switch (tag >>> 3) {
|
|
40489
|
+
case 1:
|
|
40490
|
+
message.id = reader.bytes();
|
|
40491
|
+
break;
|
|
40492
|
+
case 2:
|
|
40493
|
+
message.proTxHash = reader.bytes();
|
|
40494
|
+
break;
|
|
40495
|
+
default:
|
|
40496
|
+
reader.skipType(tag & 7);
|
|
40497
|
+
break;
|
|
40498
|
+
}
|
|
40499
|
+
}
|
|
40500
|
+
return message;
|
|
40501
|
+
};
|
|
40502
|
+
|
|
40503
|
+
/**
|
|
40504
|
+
* Decodes a Node message from the specified reader or buffer, length delimited.
|
|
40505
|
+
* @function decodeDelimited
|
|
40506
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40507
|
+
* @static
|
|
40508
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40509
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} Node
|
|
40510
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40511
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40512
|
+
*/
|
|
40513
|
+
Node.decodeDelimited = function decodeDelimited(reader) {
|
|
40514
|
+
if (!(reader instanceof $Reader))
|
|
40515
|
+
reader = new $Reader(reader);
|
|
40516
|
+
return this.decode(reader, reader.uint32());
|
|
40517
|
+
};
|
|
40518
|
+
|
|
40519
|
+
/**
|
|
40520
|
+
* Verifies a Node message.
|
|
40521
|
+
* @function verify
|
|
40522
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40523
|
+
* @static
|
|
40524
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
40525
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
40526
|
+
*/
|
|
40527
|
+
Node.verify = function verify(message) {
|
|
40528
|
+
if (typeof message !== "object" || message === null)
|
|
40529
|
+
return "object expected";
|
|
40530
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
40531
|
+
if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id)))
|
|
40532
|
+
return "id: buffer expected";
|
|
40533
|
+
if (message.proTxHash != null && message.hasOwnProperty("proTxHash"))
|
|
40534
|
+
if (!(message.proTxHash && typeof message.proTxHash.length === "number" || $util.isString(message.proTxHash)))
|
|
40535
|
+
return "proTxHash: buffer expected";
|
|
40536
|
+
return null;
|
|
40537
|
+
};
|
|
40538
|
+
|
|
40539
|
+
/**
|
|
40540
|
+
* Creates a Node message from a plain object. Also converts values to their respective internal types.
|
|
40541
|
+
* @function fromObject
|
|
40542
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40543
|
+
* @static
|
|
40544
|
+
* @param {Object.<string,*>} object Plain object
|
|
40545
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} Node
|
|
40546
|
+
*/
|
|
40547
|
+
Node.fromObject = function fromObject(object) {
|
|
40548
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node)
|
|
40549
|
+
return object;
|
|
40550
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node();
|
|
40551
|
+
if (object.id != null)
|
|
40552
|
+
if (typeof object.id === "string")
|
|
40553
|
+
$util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0);
|
|
40554
|
+
else if (object.id.length >= 0)
|
|
40555
|
+
message.id = object.id;
|
|
40556
|
+
if (object.proTxHash != null)
|
|
40557
|
+
if (typeof object.proTxHash === "string")
|
|
40558
|
+
$util.base64.decode(object.proTxHash, message.proTxHash = $util.newBuffer($util.base64.length(object.proTxHash)), 0);
|
|
40559
|
+
else if (object.proTxHash.length >= 0)
|
|
40560
|
+
message.proTxHash = object.proTxHash;
|
|
40561
|
+
return message;
|
|
40562
|
+
};
|
|
40563
|
+
|
|
40564
|
+
/**
|
|
40565
|
+
* Creates a plain object from a Node message. Also converts values to other types if specified.
|
|
40566
|
+
* @function toObject
|
|
40567
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40568
|
+
* @static
|
|
40569
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} message Node
|
|
40570
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
40571
|
+
* @returns {Object.<string,*>} Plain object
|
|
40572
|
+
*/
|
|
40573
|
+
Node.toObject = function toObject(message, options) {
|
|
40574
|
+
if (!options)
|
|
40575
|
+
options = {};
|
|
40576
|
+
var object = {};
|
|
40577
|
+
if (options.defaults) {
|
|
40578
|
+
if (options.bytes === String)
|
|
40579
|
+
object.id = "";
|
|
40580
|
+
else {
|
|
40581
|
+
object.id = [];
|
|
40582
|
+
if (options.bytes !== Array)
|
|
40583
|
+
object.id = $util.newBuffer(object.id);
|
|
40584
|
+
}
|
|
40585
|
+
if (options.bytes === String)
|
|
40586
|
+
object.proTxHash = "";
|
|
40587
|
+
else {
|
|
40588
|
+
object.proTxHash = [];
|
|
40589
|
+
if (options.bytes !== Array)
|
|
40590
|
+
object.proTxHash = $util.newBuffer(object.proTxHash);
|
|
40591
|
+
}
|
|
40592
|
+
}
|
|
40593
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
40594
|
+
object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id;
|
|
40595
|
+
if (message.proTxHash != null && message.hasOwnProperty("proTxHash"))
|
|
40596
|
+
object.proTxHash = options.bytes === String ? $util.base64.encode(message.proTxHash, 0, message.proTxHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.proTxHash) : message.proTxHash;
|
|
40597
|
+
return object;
|
|
40598
|
+
};
|
|
40599
|
+
|
|
40600
|
+
/**
|
|
40601
|
+
* Converts this Node to JSON.
|
|
40602
|
+
* @function toJSON
|
|
40603
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node
|
|
40604
|
+
* @instance
|
|
40605
|
+
* @returns {Object.<string,*>} JSON object
|
|
40606
|
+
*/
|
|
40607
|
+
Node.prototype.toJSON = function toJSON() {
|
|
40608
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
40609
|
+
};
|
|
40610
|
+
|
|
40611
|
+
return Node;
|
|
40612
|
+
})();
|
|
40613
|
+
|
|
40614
|
+
GetStatusResponseV0.Chain = (function() {
|
|
40615
|
+
|
|
40616
|
+
/**
|
|
40617
|
+
* Properties of a Chain.
|
|
40618
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
40619
|
+
* @interface IChain
|
|
40620
|
+
* @property {boolean|null} [catchingUp] Chain catchingUp
|
|
40621
|
+
* @property {Uint8Array|null} [latestBlockHash] Chain latestBlockHash
|
|
40622
|
+
* @property {Uint8Array|null} [latestAppHash] Chain latestAppHash
|
|
40623
|
+
* @property {number|Long|null} [latestBlockHeight] Chain latestBlockHeight
|
|
40624
|
+
* @property {Uint8Array|null} [earliestBlockHash] Chain earliestBlockHash
|
|
40625
|
+
* @property {Uint8Array|null} [earliestAppHash] Chain earliestAppHash
|
|
40626
|
+
* @property {number|Long|null} [earliestBlockHeight] Chain earliestBlockHeight
|
|
40627
|
+
* @property {number|Long|null} [maxPeerBlockHeight] Chain maxPeerBlockHeight
|
|
40628
|
+
* @property {number|null} [coreChainLockedHeight] Chain coreChainLockedHeight
|
|
40629
|
+
*/
|
|
40630
|
+
|
|
40631
|
+
/**
|
|
40632
|
+
* Constructs a new Chain.
|
|
40633
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
40634
|
+
* @classdesc Represents a Chain.
|
|
40635
|
+
* @implements IChain
|
|
40636
|
+
* @constructor
|
|
40637
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IChain=} [properties] Properties to set
|
|
40638
|
+
*/
|
|
40639
|
+
function Chain(properties) {
|
|
40640
|
+
if (properties)
|
|
40641
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
40642
|
+
if (properties[keys[i]] != null)
|
|
40643
|
+
this[keys[i]] = properties[keys[i]];
|
|
40644
|
+
}
|
|
40645
|
+
|
|
40646
|
+
/**
|
|
40647
|
+
* Chain catchingUp.
|
|
40648
|
+
* @member {boolean} catchingUp
|
|
40649
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40650
|
+
* @instance
|
|
40651
|
+
*/
|
|
40652
|
+
Chain.prototype.catchingUp = false;
|
|
40653
|
+
|
|
40654
|
+
/**
|
|
40655
|
+
* Chain latestBlockHash.
|
|
40656
|
+
* @member {Uint8Array} latestBlockHash
|
|
40657
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40658
|
+
* @instance
|
|
40659
|
+
*/
|
|
40660
|
+
Chain.prototype.latestBlockHash = $util.newBuffer([]);
|
|
40661
|
+
|
|
40662
|
+
/**
|
|
40663
|
+
* Chain latestAppHash.
|
|
40664
|
+
* @member {Uint8Array} latestAppHash
|
|
40665
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40666
|
+
* @instance
|
|
40667
|
+
*/
|
|
40668
|
+
Chain.prototype.latestAppHash = $util.newBuffer([]);
|
|
40669
|
+
|
|
40670
|
+
/**
|
|
40671
|
+
* Chain latestBlockHeight.
|
|
40672
|
+
* @member {number|Long} latestBlockHeight
|
|
40673
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40674
|
+
* @instance
|
|
40675
|
+
*/
|
|
40676
|
+
Chain.prototype.latestBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
40677
|
+
|
|
40678
|
+
/**
|
|
40679
|
+
* Chain earliestBlockHash.
|
|
40680
|
+
* @member {Uint8Array} earliestBlockHash
|
|
40681
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40682
|
+
* @instance
|
|
40683
|
+
*/
|
|
40684
|
+
Chain.prototype.earliestBlockHash = $util.newBuffer([]);
|
|
40685
|
+
|
|
40686
|
+
/**
|
|
40687
|
+
* Chain earliestAppHash.
|
|
40688
|
+
* @member {Uint8Array} earliestAppHash
|
|
40689
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40690
|
+
* @instance
|
|
40691
|
+
*/
|
|
40692
|
+
Chain.prototype.earliestAppHash = $util.newBuffer([]);
|
|
40693
|
+
|
|
40694
|
+
/**
|
|
40695
|
+
* Chain earliestBlockHeight.
|
|
40696
|
+
* @member {number|Long} earliestBlockHeight
|
|
40697
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40698
|
+
* @instance
|
|
40699
|
+
*/
|
|
40700
|
+
Chain.prototype.earliestBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
40701
|
+
|
|
40702
|
+
/**
|
|
40703
|
+
* Chain maxPeerBlockHeight.
|
|
40704
|
+
* @member {number|Long} maxPeerBlockHeight
|
|
40705
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40706
|
+
* @instance
|
|
40707
|
+
*/
|
|
40708
|
+
Chain.prototype.maxPeerBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
40709
|
+
|
|
40710
|
+
/**
|
|
40711
|
+
* Chain coreChainLockedHeight.
|
|
40712
|
+
* @member {number} coreChainLockedHeight
|
|
40713
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40714
|
+
* @instance
|
|
40715
|
+
*/
|
|
40716
|
+
Chain.prototype.coreChainLockedHeight = 0;
|
|
40717
|
+
|
|
40718
|
+
/**
|
|
40719
|
+
* Creates a new Chain instance using the specified properties.
|
|
40720
|
+
* @function create
|
|
40721
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40722
|
+
* @static
|
|
40723
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IChain=} [properties] Properties to set
|
|
40724
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} Chain instance
|
|
40725
|
+
*/
|
|
40726
|
+
Chain.create = function create(properties) {
|
|
40727
|
+
return new Chain(properties);
|
|
40728
|
+
};
|
|
40729
|
+
|
|
40730
|
+
/**
|
|
40731
|
+
* Encodes the specified Chain message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.verify|verify} messages.
|
|
40732
|
+
* @function encode
|
|
40733
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40734
|
+
* @static
|
|
40735
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IChain} message Chain message or plain object to encode
|
|
40736
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40737
|
+
* @returns {$protobuf.Writer} Writer
|
|
40738
|
+
*/
|
|
40739
|
+
Chain.encode = function encode(message, writer) {
|
|
40740
|
+
if (!writer)
|
|
40741
|
+
writer = $Writer.create();
|
|
40742
|
+
if (message.catchingUp != null && Object.hasOwnProperty.call(message, "catchingUp"))
|
|
40743
|
+
writer.uint32(/* id 1, wireType 0 =*/8).bool(message.catchingUp);
|
|
40744
|
+
if (message.latestBlockHash != null && Object.hasOwnProperty.call(message, "latestBlockHash"))
|
|
40745
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.latestBlockHash);
|
|
40746
|
+
if (message.latestAppHash != null && Object.hasOwnProperty.call(message, "latestAppHash"))
|
|
40747
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.latestAppHash);
|
|
40748
|
+
if (message.latestBlockHeight != null && Object.hasOwnProperty.call(message, "latestBlockHeight"))
|
|
40749
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.latestBlockHeight);
|
|
40750
|
+
if (message.earliestBlockHash != null && Object.hasOwnProperty.call(message, "earliestBlockHash"))
|
|
40751
|
+
writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.earliestBlockHash);
|
|
40752
|
+
if (message.earliestAppHash != null && Object.hasOwnProperty.call(message, "earliestAppHash"))
|
|
40753
|
+
writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.earliestAppHash);
|
|
40754
|
+
if (message.earliestBlockHeight != null && Object.hasOwnProperty.call(message, "earliestBlockHeight"))
|
|
40755
|
+
writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.earliestBlockHeight);
|
|
40756
|
+
if (message.maxPeerBlockHeight != null && Object.hasOwnProperty.call(message, "maxPeerBlockHeight"))
|
|
40757
|
+
writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.maxPeerBlockHeight);
|
|
40758
|
+
if (message.coreChainLockedHeight != null && Object.hasOwnProperty.call(message, "coreChainLockedHeight"))
|
|
40759
|
+
writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.coreChainLockedHeight);
|
|
40760
|
+
return writer;
|
|
40761
|
+
};
|
|
40762
|
+
|
|
40763
|
+
/**
|
|
40764
|
+
* Encodes the specified Chain message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.verify|verify} messages.
|
|
40765
|
+
* @function encodeDelimited
|
|
40766
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40767
|
+
* @static
|
|
40768
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IChain} message Chain message or plain object to encode
|
|
40769
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40770
|
+
* @returns {$protobuf.Writer} Writer
|
|
40771
|
+
*/
|
|
40772
|
+
Chain.encodeDelimited = function encodeDelimited(message, writer) {
|
|
40773
|
+
return this.encode(message, writer).ldelim();
|
|
40774
|
+
};
|
|
40775
|
+
|
|
40776
|
+
/**
|
|
40777
|
+
* Decodes a Chain message from the specified reader or buffer.
|
|
40778
|
+
* @function decode
|
|
40779
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40780
|
+
* @static
|
|
40781
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40782
|
+
* @param {number} [length] Message length if known beforehand
|
|
40783
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} Chain
|
|
40784
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40785
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40786
|
+
*/
|
|
40787
|
+
Chain.decode = function decode(reader, length) {
|
|
40788
|
+
if (!(reader instanceof $Reader))
|
|
40789
|
+
reader = $Reader.create(reader);
|
|
40790
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain();
|
|
40791
|
+
while (reader.pos < end) {
|
|
40792
|
+
var tag = reader.uint32();
|
|
40793
|
+
switch (tag >>> 3) {
|
|
40794
|
+
case 1:
|
|
40795
|
+
message.catchingUp = reader.bool();
|
|
40796
|
+
break;
|
|
40797
|
+
case 2:
|
|
40798
|
+
message.latestBlockHash = reader.bytes();
|
|
40799
|
+
break;
|
|
40800
|
+
case 3:
|
|
40801
|
+
message.latestAppHash = reader.bytes();
|
|
40802
|
+
break;
|
|
40803
|
+
case 4:
|
|
40804
|
+
message.latestBlockHeight = reader.uint64();
|
|
40805
|
+
break;
|
|
40806
|
+
case 5:
|
|
40807
|
+
message.earliestBlockHash = reader.bytes();
|
|
40808
|
+
break;
|
|
40809
|
+
case 6:
|
|
40810
|
+
message.earliestAppHash = reader.bytes();
|
|
40811
|
+
break;
|
|
40812
|
+
case 7:
|
|
40813
|
+
message.earliestBlockHeight = reader.uint64();
|
|
40814
|
+
break;
|
|
40815
|
+
case 9:
|
|
40816
|
+
message.maxPeerBlockHeight = reader.uint64();
|
|
40817
|
+
break;
|
|
40818
|
+
case 10:
|
|
40819
|
+
message.coreChainLockedHeight = reader.uint32();
|
|
40820
|
+
break;
|
|
40821
|
+
default:
|
|
40822
|
+
reader.skipType(tag & 7);
|
|
40823
|
+
break;
|
|
40824
|
+
}
|
|
40825
|
+
}
|
|
40826
|
+
return message;
|
|
40827
|
+
};
|
|
40828
|
+
|
|
40829
|
+
/**
|
|
40830
|
+
* Decodes a Chain message from the specified reader or buffer, length delimited.
|
|
40831
|
+
* @function decodeDelimited
|
|
40832
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40833
|
+
* @static
|
|
40834
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40835
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} Chain
|
|
40836
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40837
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40838
|
+
*/
|
|
40839
|
+
Chain.decodeDelimited = function decodeDelimited(reader) {
|
|
40840
|
+
if (!(reader instanceof $Reader))
|
|
40841
|
+
reader = new $Reader(reader);
|
|
40842
|
+
return this.decode(reader, reader.uint32());
|
|
40843
|
+
};
|
|
40844
|
+
|
|
40845
|
+
/**
|
|
40846
|
+
* Verifies a Chain message.
|
|
40847
|
+
* @function verify
|
|
40848
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40849
|
+
* @static
|
|
40850
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
40851
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
40852
|
+
*/
|
|
40853
|
+
Chain.verify = function verify(message) {
|
|
40854
|
+
if (typeof message !== "object" || message === null)
|
|
40855
|
+
return "object expected";
|
|
40856
|
+
if (message.catchingUp != null && message.hasOwnProperty("catchingUp"))
|
|
40857
|
+
if (typeof message.catchingUp !== "boolean")
|
|
40858
|
+
return "catchingUp: boolean expected";
|
|
40859
|
+
if (message.latestBlockHash != null && message.hasOwnProperty("latestBlockHash"))
|
|
40860
|
+
if (!(message.latestBlockHash && typeof message.latestBlockHash.length === "number" || $util.isString(message.latestBlockHash)))
|
|
40861
|
+
return "latestBlockHash: buffer expected";
|
|
40862
|
+
if (message.latestAppHash != null && message.hasOwnProperty("latestAppHash"))
|
|
40863
|
+
if (!(message.latestAppHash && typeof message.latestAppHash.length === "number" || $util.isString(message.latestAppHash)))
|
|
40864
|
+
return "latestAppHash: buffer expected";
|
|
40865
|
+
if (message.latestBlockHeight != null && message.hasOwnProperty("latestBlockHeight"))
|
|
40866
|
+
if (!$util.isInteger(message.latestBlockHeight) && !(message.latestBlockHeight && $util.isInteger(message.latestBlockHeight.low) && $util.isInteger(message.latestBlockHeight.high)))
|
|
40867
|
+
return "latestBlockHeight: integer|Long expected";
|
|
40868
|
+
if (message.earliestBlockHash != null && message.hasOwnProperty("earliestBlockHash"))
|
|
40869
|
+
if (!(message.earliestBlockHash && typeof message.earliestBlockHash.length === "number" || $util.isString(message.earliestBlockHash)))
|
|
40870
|
+
return "earliestBlockHash: buffer expected";
|
|
40871
|
+
if (message.earliestAppHash != null && message.hasOwnProperty("earliestAppHash"))
|
|
40872
|
+
if (!(message.earliestAppHash && typeof message.earliestAppHash.length === "number" || $util.isString(message.earliestAppHash)))
|
|
40873
|
+
return "earliestAppHash: buffer expected";
|
|
40874
|
+
if (message.earliestBlockHeight != null && message.hasOwnProperty("earliestBlockHeight"))
|
|
40875
|
+
if (!$util.isInteger(message.earliestBlockHeight) && !(message.earliestBlockHeight && $util.isInteger(message.earliestBlockHeight.low) && $util.isInteger(message.earliestBlockHeight.high)))
|
|
40876
|
+
return "earliestBlockHeight: integer|Long expected";
|
|
40877
|
+
if (message.maxPeerBlockHeight != null && message.hasOwnProperty("maxPeerBlockHeight"))
|
|
40878
|
+
if (!$util.isInteger(message.maxPeerBlockHeight) && !(message.maxPeerBlockHeight && $util.isInteger(message.maxPeerBlockHeight.low) && $util.isInteger(message.maxPeerBlockHeight.high)))
|
|
40879
|
+
return "maxPeerBlockHeight: integer|Long expected";
|
|
40880
|
+
if (message.coreChainLockedHeight != null && message.hasOwnProperty("coreChainLockedHeight"))
|
|
40881
|
+
if (!$util.isInteger(message.coreChainLockedHeight))
|
|
40882
|
+
return "coreChainLockedHeight: integer expected";
|
|
40883
|
+
return null;
|
|
40884
|
+
};
|
|
40885
|
+
|
|
40886
|
+
/**
|
|
40887
|
+
* Creates a Chain message from a plain object. Also converts values to their respective internal types.
|
|
40888
|
+
* @function fromObject
|
|
40889
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40890
|
+
* @static
|
|
40891
|
+
* @param {Object.<string,*>} object Plain object
|
|
40892
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} Chain
|
|
40893
|
+
*/
|
|
40894
|
+
Chain.fromObject = function fromObject(object) {
|
|
40895
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain)
|
|
40896
|
+
return object;
|
|
40897
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain();
|
|
40898
|
+
if (object.catchingUp != null)
|
|
40899
|
+
message.catchingUp = Boolean(object.catchingUp);
|
|
40900
|
+
if (object.latestBlockHash != null)
|
|
40901
|
+
if (typeof object.latestBlockHash === "string")
|
|
40902
|
+
$util.base64.decode(object.latestBlockHash, message.latestBlockHash = $util.newBuffer($util.base64.length(object.latestBlockHash)), 0);
|
|
40903
|
+
else if (object.latestBlockHash.length >= 0)
|
|
40904
|
+
message.latestBlockHash = object.latestBlockHash;
|
|
40905
|
+
if (object.latestAppHash != null)
|
|
40906
|
+
if (typeof object.latestAppHash === "string")
|
|
40907
|
+
$util.base64.decode(object.latestAppHash, message.latestAppHash = $util.newBuffer($util.base64.length(object.latestAppHash)), 0);
|
|
40908
|
+
else if (object.latestAppHash.length >= 0)
|
|
40909
|
+
message.latestAppHash = object.latestAppHash;
|
|
40910
|
+
if (object.latestBlockHeight != null)
|
|
40911
|
+
if ($util.Long)
|
|
40912
|
+
(message.latestBlockHeight = $util.Long.fromValue(object.latestBlockHeight)).unsigned = true;
|
|
40913
|
+
else if (typeof object.latestBlockHeight === "string")
|
|
40914
|
+
message.latestBlockHeight = parseInt(object.latestBlockHeight, 10);
|
|
40915
|
+
else if (typeof object.latestBlockHeight === "number")
|
|
40916
|
+
message.latestBlockHeight = object.latestBlockHeight;
|
|
40917
|
+
else if (typeof object.latestBlockHeight === "object")
|
|
40918
|
+
message.latestBlockHeight = new $util.LongBits(object.latestBlockHeight.low >>> 0, object.latestBlockHeight.high >>> 0).toNumber(true);
|
|
40919
|
+
if (object.earliestBlockHash != null)
|
|
40920
|
+
if (typeof object.earliestBlockHash === "string")
|
|
40921
|
+
$util.base64.decode(object.earliestBlockHash, message.earliestBlockHash = $util.newBuffer($util.base64.length(object.earliestBlockHash)), 0);
|
|
40922
|
+
else if (object.earliestBlockHash.length >= 0)
|
|
40923
|
+
message.earliestBlockHash = object.earliestBlockHash;
|
|
40924
|
+
if (object.earliestAppHash != null)
|
|
40925
|
+
if (typeof object.earliestAppHash === "string")
|
|
40926
|
+
$util.base64.decode(object.earliestAppHash, message.earliestAppHash = $util.newBuffer($util.base64.length(object.earliestAppHash)), 0);
|
|
40927
|
+
else if (object.earliestAppHash.length >= 0)
|
|
40928
|
+
message.earliestAppHash = object.earliestAppHash;
|
|
40929
|
+
if (object.earliestBlockHeight != null)
|
|
40930
|
+
if ($util.Long)
|
|
40931
|
+
(message.earliestBlockHeight = $util.Long.fromValue(object.earliestBlockHeight)).unsigned = true;
|
|
40932
|
+
else if (typeof object.earliestBlockHeight === "string")
|
|
40933
|
+
message.earliestBlockHeight = parseInt(object.earliestBlockHeight, 10);
|
|
40934
|
+
else if (typeof object.earliestBlockHeight === "number")
|
|
40935
|
+
message.earliestBlockHeight = object.earliestBlockHeight;
|
|
40936
|
+
else if (typeof object.earliestBlockHeight === "object")
|
|
40937
|
+
message.earliestBlockHeight = new $util.LongBits(object.earliestBlockHeight.low >>> 0, object.earliestBlockHeight.high >>> 0).toNumber(true);
|
|
40938
|
+
if (object.maxPeerBlockHeight != null)
|
|
40939
|
+
if ($util.Long)
|
|
40940
|
+
(message.maxPeerBlockHeight = $util.Long.fromValue(object.maxPeerBlockHeight)).unsigned = true;
|
|
40941
|
+
else if (typeof object.maxPeerBlockHeight === "string")
|
|
40942
|
+
message.maxPeerBlockHeight = parseInt(object.maxPeerBlockHeight, 10);
|
|
40943
|
+
else if (typeof object.maxPeerBlockHeight === "number")
|
|
40944
|
+
message.maxPeerBlockHeight = object.maxPeerBlockHeight;
|
|
40945
|
+
else if (typeof object.maxPeerBlockHeight === "object")
|
|
40946
|
+
message.maxPeerBlockHeight = new $util.LongBits(object.maxPeerBlockHeight.low >>> 0, object.maxPeerBlockHeight.high >>> 0).toNumber(true);
|
|
40947
|
+
if (object.coreChainLockedHeight != null)
|
|
40948
|
+
message.coreChainLockedHeight = object.coreChainLockedHeight >>> 0;
|
|
40949
|
+
return message;
|
|
40950
|
+
};
|
|
40951
|
+
|
|
40952
|
+
/**
|
|
40953
|
+
* Creates a plain object from a Chain message. Also converts values to other types if specified.
|
|
40954
|
+
* @function toObject
|
|
40955
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
40956
|
+
* @static
|
|
40957
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} message Chain
|
|
40958
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
40959
|
+
* @returns {Object.<string,*>} Plain object
|
|
40960
|
+
*/
|
|
40961
|
+
Chain.toObject = function toObject(message, options) {
|
|
40962
|
+
if (!options)
|
|
40963
|
+
options = {};
|
|
40964
|
+
var object = {};
|
|
40965
|
+
if (options.defaults) {
|
|
40966
|
+
object.catchingUp = false;
|
|
40967
|
+
if (options.bytes === String)
|
|
40968
|
+
object.latestBlockHash = "";
|
|
40969
|
+
else {
|
|
40970
|
+
object.latestBlockHash = [];
|
|
40971
|
+
if (options.bytes !== Array)
|
|
40972
|
+
object.latestBlockHash = $util.newBuffer(object.latestBlockHash);
|
|
40973
|
+
}
|
|
40974
|
+
if (options.bytes === String)
|
|
40975
|
+
object.latestAppHash = "";
|
|
40976
|
+
else {
|
|
40977
|
+
object.latestAppHash = [];
|
|
40978
|
+
if (options.bytes !== Array)
|
|
40979
|
+
object.latestAppHash = $util.newBuffer(object.latestAppHash);
|
|
40980
|
+
}
|
|
40981
|
+
if ($util.Long) {
|
|
40982
|
+
var long = new $util.Long(0, 0, true);
|
|
40983
|
+
object.latestBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
40984
|
+
} else
|
|
40985
|
+
object.latestBlockHeight = options.longs === String ? "0" : 0;
|
|
40986
|
+
if (options.bytes === String)
|
|
40987
|
+
object.earliestBlockHash = "";
|
|
40988
|
+
else {
|
|
40989
|
+
object.earliestBlockHash = [];
|
|
40990
|
+
if (options.bytes !== Array)
|
|
40991
|
+
object.earliestBlockHash = $util.newBuffer(object.earliestBlockHash);
|
|
40992
|
+
}
|
|
40993
|
+
if (options.bytes === String)
|
|
40994
|
+
object.earliestAppHash = "";
|
|
40995
|
+
else {
|
|
40996
|
+
object.earliestAppHash = [];
|
|
40997
|
+
if (options.bytes !== Array)
|
|
40998
|
+
object.earliestAppHash = $util.newBuffer(object.earliestAppHash);
|
|
40999
|
+
}
|
|
41000
|
+
if ($util.Long) {
|
|
41001
|
+
var long = new $util.Long(0, 0, true);
|
|
41002
|
+
object.earliestBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41003
|
+
} else
|
|
41004
|
+
object.earliestBlockHeight = options.longs === String ? "0" : 0;
|
|
41005
|
+
if ($util.Long) {
|
|
41006
|
+
var long = new $util.Long(0, 0, true);
|
|
41007
|
+
object.maxPeerBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41008
|
+
} else
|
|
41009
|
+
object.maxPeerBlockHeight = options.longs === String ? "0" : 0;
|
|
41010
|
+
object.coreChainLockedHeight = 0;
|
|
41011
|
+
}
|
|
41012
|
+
if (message.catchingUp != null && message.hasOwnProperty("catchingUp"))
|
|
41013
|
+
object.catchingUp = message.catchingUp;
|
|
41014
|
+
if (message.latestBlockHash != null && message.hasOwnProperty("latestBlockHash"))
|
|
41015
|
+
object.latestBlockHash = options.bytes === String ? $util.base64.encode(message.latestBlockHash, 0, message.latestBlockHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.latestBlockHash) : message.latestBlockHash;
|
|
41016
|
+
if (message.latestAppHash != null && message.hasOwnProperty("latestAppHash"))
|
|
41017
|
+
object.latestAppHash = options.bytes === String ? $util.base64.encode(message.latestAppHash, 0, message.latestAppHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.latestAppHash) : message.latestAppHash;
|
|
41018
|
+
if (message.latestBlockHeight != null && message.hasOwnProperty("latestBlockHeight"))
|
|
41019
|
+
if (typeof message.latestBlockHeight === "number")
|
|
41020
|
+
object.latestBlockHeight = options.longs === String ? String(message.latestBlockHeight) : message.latestBlockHeight;
|
|
41021
|
+
else
|
|
41022
|
+
object.latestBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.latestBlockHeight) : options.longs === Number ? new $util.LongBits(message.latestBlockHeight.low >>> 0, message.latestBlockHeight.high >>> 0).toNumber(true) : message.latestBlockHeight;
|
|
41023
|
+
if (message.earliestBlockHash != null && message.hasOwnProperty("earliestBlockHash"))
|
|
41024
|
+
object.earliestBlockHash = options.bytes === String ? $util.base64.encode(message.earliestBlockHash, 0, message.earliestBlockHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.earliestBlockHash) : message.earliestBlockHash;
|
|
41025
|
+
if (message.earliestAppHash != null && message.hasOwnProperty("earliestAppHash"))
|
|
41026
|
+
object.earliestAppHash = options.bytes === String ? $util.base64.encode(message.earliestAppHash, 0, message.earliestAppHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.earliestAppHash) : message.earliestAppHash;
|
|
41027
|
+
if (message.earliestBlockHeight != null && message.hasOwnProperty("earliestBlockHeight"))
|
|
41028
|
+
if (typeof message.earliestBlockHeight === "number")
|
|
41029
|
+
object.earliestBlockHeight = options.longs === String ? String(message.earliestBlockHeight) : message.earliestBlockHeight;
|
|
41030
|
+
else
|
|
41031
|
+
object.earliestBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.earliestBlockHeight) : options.longs === Number ? new $util.LongBits(message.earliestBlockHeight.low >>> 0, message.earliestBlockHeight.high >>> 0).toNumber(true) : message.earliestBlockHeight;
|
|
41032
|
+
if (message.maxPeerBlockHeight != null && message.hasOwnProperty("maxPeerBlockHeight"))
|
|
41033
|
+
if (typeof message.maxPeerBlockHeight === "number")
|
|
41034
|
+
object.maxPeerBlockHeight = options.longs === String ? String(message.maxPeerBlockHeight) : message.maxPeerBlockHeight;
|
|
41035
|
+
else
|
|
41036
|
+
object.maxPeerBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.maxPeerBlockHeight) : options.longs === Number ? new $util.LongBits(message.maxPeerBlockHeight.low >>> 0, message.maxPeerBlockHeight.high >>> 0).toNumber(true) : message.maxPeerBlockHeight;
|
|
41037
|
+
if (message.coreChainLockedHeight != null && message.hasOwnProperty("coreChainLockedHeight"))
|
|
41038
|
+
object.coreChainLockedHeight = message.coreChainLockedHeight;
|
|
41039
|
+
return object;
|
|
41040
|
+
};
|
|
41041
|
+
|
|
41042
|
+
/**
|
|
41043
|
+
* Converts this Chain to JSON.
|
|
41044
|
+
* @function toJSON
|
|
41045
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain
|
|
41046
|
+
* @instance
|
|
41047
|
+
* @returns {Object.<string,*>} JSON object
|
|
41048
|
+
*/
|
|
41049
|
+
Chain.prototype.toJSON = function toJSON() {
|
|
41050
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
41051
|
+
};
|
|
41052
|
+
|
|
41053
|
+
return Chain;
|
|
41054
|
+
})();
|
|
41055
|
+
|
|
41056
|
+
GetStatusResponseV0.Network = (function() {
|
|
41057
|
+
|
|
41058
|
+
/**
|
|
41059
|
+
* Properties of a Network.
|
|
41060
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
41061
|
+
* @interface INetwork
|
|
41062
|
+
* @property {string|null} [chainId] Network chainId
|
|
41063
|
+
* @property {number|null} [peersCount] Network peersCount
|
|
41064
|
+
* @property {boolean|null} [listening] Network listening
|
|
41065
|
+
*/
|
|
41066
|
+
|
|
41067
|
+
/**
|
|
41068
|
+
* Constructs a new Network.
|
|
41069
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
41070
|
+
* @classdesc Represents a Network.
|
|
41071
|
+
* @implements INetwork
|
|
41072
|
+
* @constructor
|
|
41073
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INetwork=} [properties] Properties to set
|
|
41074
|
+
*/
|
|
41075
|
+
function Network(properties) {
|
|
41076
|
+
if (properties)
|
|
41077
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
41078
|
+
if (properties[keys[i]] != null)
|
|
41079
|
+
this[keys[i]] = properties[keys[i]];
|
|
41080
|
+
}
|
|
41081
|
+
|
|
41082
|
+
/**
|
|
41083
|
+
* Network chainId.
|
|
41084
|
+
* @member {string} chainId
|
|
41085
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41086
|
+
* @instance
|
|
41087
|
+
*/
|
|
41088
|
+
Network.prototype.chainId = "";
|
|
41089
|
+
|
|
41090
|
+
/**
|
|
41091
|
+
* Network peersCount.
|
|
41092
|
+
* @member {number} peersCount
|
|
41093
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41094
|
+
* @instance
|
|
41095
|
+
*/
|
|
41096
|
+
Network.prototype.peersCount = 0;
|
|
41097
|
+
|
|
41098
|
+
/**
|
|
41099
|
+
* Network listening.
|
|
41100
|
+
* @member {boolean} listening
|
|
41101
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41102
|
+
* @instance
|
|
41103
|
+
*/
|
|
41104
|
+
Network.prototype.listening = false;
|
|
41105
|
+
|
|
41106
|
+
/**
|
|
41107
|
+
* Creates a new Network instance using the specified properties.
|
|
41108
|
+
* @function create
|
|
41109
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41110
|
+
* @static
|
|
41111
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INetwork=} [properties] Properties to set
|
|
41112
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} Network instance
|
|
41113
|
+
*/
|
|
41114
|
+
Network.create = function create(properties) {
|
|
41115
|
+
return new Network(properties);
|
|
41116
|
+
};
|
|
41117
|
+
|
|
41118
|
+
/**
|
|
41119
|
+
* Encodes the specified Network message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.verify|verify} messages.
|
|
41120
|
+
* @function encode
|
|
41121
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41122
|
+
* @static
|
|
41123
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INetwork} message Network message or plain object to encode
|
|
41124
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
41125
|
+
* @returns {$protobuf.Writer} Writer
|
|
41126
|
+
*/
|
|
41127
|
+
Network.encode = function encode(message, writer) {
|
|
41128
|
+
if (!writer)
|
|
41129
|
+
writer = $Writer.create();
|
|
41130
|
+
if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId"))
|
|
41131
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.chainId);
|
|
41132
|
+
if (message.peersCount != null && Object.hasOwnProperty.call(message, "peersCount"))
|
|
41133
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.peersCount);
|
|
41134
|
+
if (message.listening != null && Object.hasOwnProperty.call(message, "listening"))
|
|
41135
|
+
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.listening);
|
|
41136
|
+
return writer;
|
|
41137
|
+
};
|
|
41138
|
+
|
|
41139
|
+
/**
|
|
41140
|
+
* Encodes the specified Network message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.verify|verify} messages.
|
|
41141
|
+
* @function encodeDelimited
|
|
41142
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41143
|
+
* @static
|
|
41144
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.INetwork} message Network message or plain object to encode
|
|
41145
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
41146
|
+
* @returns {$protobuf.Writer} Writer
|
|
41147
|
+
*/
|
|
41148
|
+
Network.encodeDelimited = function encodeDelimited(message, writer) {
|
|
41149
|
+
return this.encode(message, writer).ldelim();
|
|
41150
|
+
};
|
|
41151
|
+
|
|
41152
|
+
/**
|
|
41153
|
+
* Decodes a Network message from the specified reader or buffer.
|
|
41154
|
+
* @function decode
|
|
41155
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41156
|
+
* @static
|
|
41157
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
41158
|
+
* @param {number} [length] Message length if known beforehand
|
|
41159
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} Network
|
|
41160
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
41161
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
41162
|
+
*/
|
|
41163
|
+
Network.decode = function decode(reader, length) {
|
|
41164
|
+
if (!(reader instanceof $Reader))
|
|
41165
|
+
reader = $Reader.create(reader);
|
|
41166
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network();
|
|
41167
|
+
while (reader.pos < end) {
|
|
41168
|
+
var tag = reader.uint32();
|
|
41169
|
+
switch (tag >>> 3) {
|
|
41170
|
+
case 1:
|
|
41171
|
+
message.chainId = reader.string();
|
|
41172
|
+
break;
|
|
41173
|
+
case 2:
|
|
41174
|
+
message.peersCount = reader.uint32();
|
|
41175
|
+
break;
|
|
41176
|
+
case 3:
|
|
41177
|
+
message.listening = reader.bool();
|
|
41178
|
+
break;
|
|
41179
|
+
default:
|
|
41180
|
+
reader.skipType(tag & 7);
|
|
41181
|
+
break;
|
|
41182
|
+
}
|
|
41183
|
+
}
|
|
41184
|
+
return message;
|
|
41185
|
+
};
|
|
41186
|
+
|
|
41187
|
+
/**
|
|
41188
|
+
* Decodes a Network message from the specified reader or buffer, length delimited.
|
|
41189
|
+
* @function decodeDelimited
|
|
41190
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41191
|
+
* @static
|
|
41192
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
41193
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} Network
|
|
41194
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
41195
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
41196
|
+
*/
|
|
41197
|
+
Network.decodeDelimited = function decodeDelimited(reader) {
|
|
41198
|
+
if (!(reader instanceof $Reader))
|
|
41199
|
+
reader = new $Reader(reader);
|
|
41200
|
+
return this.decode(reader, reader.uint32());
|
|
41201
|
+
};
|
|
41202
|
+
|
|
41203
|
+
/**
|
|
41204
|
+
* Verifies a Network message.
|
|
41205
|
+
* @function verify
|
|
41206
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41207
|
+
* @static
|
|
41208
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
41209
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
41210
|
+
*/
|
|
41211
|
+
Network.verify = function verify(message) {
|
|
41212
|
+
if (typeof message !== "object" || message === null)
|
|
41213
|
+
return "object expected";
|
|
41214
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
|
41215
|
+
if (!$util.isString(message.chainId))
|
|
41216
|
+
return "chainId: string expected";
|
|
41217
|
+
if (message.peersCount != null && message.hasOwnProperty("peersCount"))
|
|
41218
|
+
if (!$util.isInteger(message.peersCount))
|
|
41219
|
+
return "peersCount: integer expected";
|
|
41220
|
+
if (message.listening != null && message.hasOwnProperty("listening"))
|
|
41221
|
+
if (typeof message.listening !== "boolean")
|
|
41222
|
+
return "listening: boolean expected";
|
|
41223
|
+
return null;
|
|
41224
|
+
};
|
|
41225
|
+
|
|
41226
|
+
/**
|
|
41227
|
+
* Creates a Network message from a plain object. Also converts values to their respective internal types.
|
|
41228
|
+
* @function fromObject
|
|
41229
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41230
|
+
* @static
|
|
41231
|
+
* @param {Object.<string,*>} object Plain object
|
|
41232
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} Network
|
|
41233
|
+
*/
|
|
41234
|
+
Network.fromObject = function fromObject(object) {
|
|
41235
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network)
|
|
41236
|
+
return object;
|
|
41237
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network();
|
|
41238
|
+
if (object.chainId != null)
|
|
41239
|
+
message.chainId = String(object.chainId);
|
|
41240
|
+
if (object.peersCount != null)
|
|
41241
|
+
message.peersCount = object.peersCount >>> 0;
|
|
41242
|
+
if (object.listening != null)
|
|
41243
|
+
message.listening = Boolean(object.listening);
|
|
41244
|
+
return message;
|
|
41245
|
+
};
|
|
41246
|
+
|
|
41247
|
+
/**
|
|
41248
|
+
* Creates a plain object from a Network message. Also converts values to other types if specified.
|
|
41249
|
+
* @function toObject
|
|
41250
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41251
|
+
* @static
|
|
41252
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} message Network
|
|
41253
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
41254
|
+
* @returns {Object.<string,*>} Plain object
|
|
41255
|
+
*/
|
|
41256
|
+
Network.toObject = function toObject(message, options) {
|
|
41257
|
+
if (!options)
|
|
41258
|
+
options = {};
|
|
41259
|
+
var object = {};
|
|
41260
|
+
if (options.defaults) {
|
|
41261
|
+
object.chainId = "";
|
|
41262
|
+
object.peersCount = 0;
|
|
41263
|
+
object.listening = false;
|
|
41264
|
+
}
|
|
41265
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
|
41266
|
+
object.chainId = message.chainId;
|
|
41267
|
+
if (message.peersCount != null && message.hasOwnProperty("peersCount"))
|
|
41268
|
+
object.peersCount = message.peersCount;
|
|
41269
|
+
if (message.listening != null && message.hasOwnProperty("listening"))
|
|
41270
|
+
object.listening = message.listening;
|
|
41271
|
+
return object;
|
|
41272
|
+
};
|
|
41273
|
+
|
|
41274
|
+
/**
|
|
41275
|
+
* Converts this Network to JSON.
|
|
41276
|
+
* @function toJSON
|
|
41277
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network
|
|
41278
|
+
* @instance
|
|
41279
|
+
* @returns {Object.<string,*>} JSON object
|
|
41280
|
+
*/
|
|
41281
|
+
Network.prototype.toJSON = function toJSON() {
|
|
41282
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
41283
|
+
};
|
|
41284
|
+
|
|
41285
|
+
return Network;
|
|
41286
|
+
})();
|
|
41287
|
+
|
|
41288
|
+
GetStatusResponseV0.StateSync = (function() {
|
|
41289
|
+
|
|
41290
|
+
/**
|
|
41291
|
+
* Properties of a StateSync.
|
|
41292
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
41293
|
+
* @interface IStateSync
|
|
41294
|
+
* @property {number|Long|null} [totalSyncedTime] StateSync totalSyncedTime
|
|
41295
|
+
* @property {number|Long|null} [remainingTime] StateSync remainingTime
|
|
41296
|
+
* @property {number|null} [totalSnapshots] StateSync totalSnapshots
|
|
41297
|
+
* @property {number|Long|null} [chunkProcessAvgTime] StateSync chunkProcessAvgTime
|
|
41298
|
+
* @property {number|Long|null} [snapshotHeight] StateSync snapshotHeight
|
|
41299
|
+
* @property {number|Long|null} [snapshotChunksCount] StateSync snapshotChunksCount
|
|
41300
|
+
* @property {number|Long|null} [backfilledBlocks] StateSync backfilledBlocks
|
|
41301
|
+
* @property {number|Long|null} [backfillBlocksTotal] StateSync backfillBlocksTotal
|
|
41302
|
+
*/
|
|
41303
|
+
|
|
41304
|
+
/**
|
|
41305
|
+
* Constructs a new StateSync.
|
|
41306
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0
|
|
41307
|
+
* @classdesc Represents a StateSync.
|
|
41308
|
+
* @implements IStateSync
|
|
41309
|
+
* @constructor
|
|
41310
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IStateSync=} [properties] Properties to set
|
|
41311
|
+
*/
|
|
41312
|
+
function StateSync(properties) {
|
|
41313
|
+
if (properties)
|
|
41314
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
41315
|
+
if (properties[keys[i]] != null)
|
|
41316
|
+
this[keys[i]] = properties[keys[i]];
|
|
41317
|
+
}
|
|
41318
|
+
|
|
41319
|
+
/**
|
|
41320
|
+
* StateSync totalSyncedTime.
|
|
41321
|
+
* @member {number|Long} totalSyncedTime
|
|
41322
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41323
|
+
* @instance
|
|
41324
|
+
*/
|
|
41325
|
+
StateSync.prototype.totalSyncedTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
41326
|
+
|
|
41327
|
+
/**
|
|
41328
|
+
* StateSync remainingTime.
|
|
41329
|
+
* @member {number|Long} remainingTime
|
|
41330
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41331
|
+
* @instance
|
|
41332
|
+
*/
|
|
41333
|
+
StateSync.prototype.remainingTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
41334
|
+
|
|
41335
|
+
/**
|
|
41336
|
+
* StateSync totalSnapshots.
|
|
41337
|
+
* @member {number} totalSnapshots
|
|
41338
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41339
|
+
* @instance
|
|
41340
|
+
*/
|
|
41341
|
+
StateSync.prototype.totalSnapshots = 0;
|
|
41342
|
+
|
|
41343
|
+
/**
|
|
41344
|
+
* StateSync chunkProcessAvgTime.
|
|
41345
|
+
* @member {number|Long} chunkProcessAvgTime
|
|
41346
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41347
|
+
* @instance
|
|
41348
|
+
*/
|
|
41349
|
+
StateSync.prototype.chunkProcessAvgTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
41350
|
+
|
|
41351
|
+
/**
|
|
41352
|
+
* StateSync snapshotHeight.
|
|
41353
|
+
* @member {number|Long} snapshotHeight
|
|
41354
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41355
|
+
* @instance
|
|
41356
|
+
*/
|
|
41357
|
+
StateSync.prototype.snapshotHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
41358
|
+
|
|
41359
|
+
/**
|
|
41360
|
+
* StateSync snapshotChunksCount.
|
|
41361
|
+
* @member {number|Long} snapshotChunksCount
|
|
41362
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41363
|
+
* @instance
|
|
41364
|
+
*/
|
|
41365
|
+
StateSync.prototype.snapshotChunksCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
41366
|
+
|
|
41367
|
+
/**
|
|
41368
|
+
* StateSync backfilledBlocks.
|
|
41369
|
+
* @member {number|Long} backfilledBlocks
|
|
41370
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41371
|
+
* @instance
|
|
41372
|
+
*/
|
|
41373
|
+
StateSync.prototype.backfilledBlocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
41374
|
+
|
|
41375
|
+
/**
|
|
41376
|
+
* StateSync backfillBlocksTotal.
|
|
41377
|
+
* @member {number|Long} backfillBlocksTotal
|
|
41378
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41379
|
+
* @instance
|
|
41380
|
+
*/
|
|
41381
|
+
StateSync.prototype.backfillBlocksTotal = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
41382
|
+
|
|
41383
|
+
/**
|
|
41384
|
+
* Creates a new StateSync instance using the specified properties.
|
|
41385
|
+
* @function create
|
|
41386
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41387
|
+
* @static
|
|
41388
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IStateSync=} [properties] Properties to set
|
|
41389
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} StateSync instance
|
|
41390
|
+
*/
|
|
41391
|
+
StateSync.create = function create(properties) {
|
|
41392
|
+
return new StateSync(properties);
|
|
41393
|
+
};
|
|
41394
|
+
|
|
41395
|
+
/**
|
|
41396
|
+
* Encodes the specified StateSync message. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.verify|verify} messages.
|
|
41397
|
+
* @function encode
|
|
41398
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41399
|
+
* @static
|
|
41400
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IStateSync} message StateSync message or plain object to encode
|
|
41401
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
41402
|
+
* @returns {$protobuf.Writer} Writer
|
|
41403
|
+
*/
|
|
41404
|
+
StateSync.encode = function encode(message, writer) {
|
|
41405
|
+
if (!writer)
|
|
41406
|
+
writer = $Writer.create();
|
|
41407
|
+
if (message.totalSyncedTime != null && Object.hasOwnProperty.call(message, "totalSyncedTime"))
|
|
41408
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.totalSyncedTime);
|
|
41409
|
+
if (message.remainingTime != null && Object.hasOwnProperty.call(message, "remainingTime"))
|
|
41410
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.remainingTime);
|
|
41411
|
+
if (message.totalSnapshots != null && Object.hasOwnProperty.call(message, "totalSnapshots"))
|
|
41412
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.totalSnapshots);
|
|
41413
|
+
if (message.chunkProcessAvgTime != null && Object.hasOwnProperty.call(message, "chunkProcessAvgTime"))
|
|
41414
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.chunkProcessAvgTime);
|
|
41415
|
+
if (message.snapshotHeight != null && Object.hasOwnProperty.call(message, "snapshotHeight"))
|
|
41416
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.snapshotHeight);
|
|
41417
|
+
if (message.snapshotChunksCount != null && Object.hasOwnProperty.call(message, "snapshotChunksCount"))
|
|
41418
|
+
writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.snapshotChunksCount);
|
|
41419
|
+
if (message.backfilledBlocks != null && Object.hasOwnProperty.call(message, "backfilledBlocks"))
|
|
41420
|
+
writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.backfilledBlocks);
|
|
41421
|
+
if (message.backfillBlocksTotal != null && Object.hasOwnProperty.call(message, "backfillBlocksTotal"))
|
|
41422
|
+
writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.backfillBlocksTotal);
|
|
41423
|
+
return writer;
|
|
41424
|
+
};
|
|
41425
|
+
|
|
41426
|
+
/**
|
|
41427
|
+
* Encodes the specified StateSync message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.verify|verify} messages.
|
|
41428
|
+
* @function encodeDelimited
|
|
41429
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41430
|
+
* @static
|
|
41431
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.IStateSync} message StateSync message or plain object to encode
|
|
41432
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
41433
|
+
* @returns {$protobuf.Writer} Writer
|
|
41434
|
+
*/
|
|
41435
|
+
StateSync.encodeDelimited = function encodeDelimited(message, writer) {
|
|
41436
|
+
return this.encode(message, writer).ldelim();
|
|
41437
|
+
};
|
|
41438
|
+
|
|
41439
|
+
/**
|
|
41440
|
+
* Decodes a StateSync message from the specified reader or buffer.
|
|
41441
|
+
* @function decode
|
|
41442
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41443
|
+
* @static
|
|
41444
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
41445
|
+
* @param {number} [length] Message length if known beforehand
|
|
41446
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} StateSync
|
|
41447
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
41448
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
41449
|
+
*/
|
|
41450
|
+
StateSync.decode = function decode(reader, length) {
|
|
41451
|
+
if (!(reader instanceof $Reader))
|
|
41452
|
+
reader = $Reader.create(reader);
|
|
41453
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync();
|
|
41454
|
+
while (reader.pos < end) {
|
|
41455
|
+
var tag = reader.uint32();
|
|
41456
|
+
switch (tag >>> 3) {
|
|
41457
|
+
case 1:
|
|
41458
|
+
message.totalSyncedTime = reader.uint64();
|
|
41459
|
+
break;
|
|
41460
|
+
case 2:
|
|
41461
|
+
message.remainingTime = reader.uint64();
|
|
41462
|
+
break;
|
|
41463
|
+
case 3:
|
|
41464
|
+
message.totalSnapshots = reader.uint32();
|
|
41465
|
+
break;
|
|
41466
|
+
case 4:
|
|
41467
|
+
message.chunkProcessAvgTime = reader.uint64();
|
|
41468
|
+
break;
|
|
41469
|
+
case 5:
|
|
41470
|
+
message.snapshotHeight = reader.uint64();
|
|
41471
|
+
break;
|
|
41472
|
+
case 6:
|
|
41473
|
+
message.snapshotChunksCount = reader.uint64();
|
|
41474
|
+
break;
|
|
41475
|
+
case 7:
|
|
41476
|
+
message.backfilledBlocks = reader.uint64();
|
|
41477
|
+
break;
|
|
41478
|
+
case 8:
|
|
41479
|
+
message.backfillBlocksTotal = reader.uint64();
|
|
41480
|
+
break;
|
|
41481
|
+
default:
|
|
41482
|
+
reader.skipType(tag & 7);
|
|
41483
|
+
break;
|
|
41484
|
+
}
|
|
41485
|
+
}
|
|
41486
|
+
return message;
|
|
41487
|
+
};
|
|
41488
|
+
|
|
41489
|
+
/**
|
|
41490
|
+
* Decodes a StateSync message from the specified reader or buffer, length delimited.
|
|
41491
|
+
* @function decodeDelimited
|
|
41492
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41493
|
+
* @static
|
|
41494
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
41495
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} StateSync
|
|
41496
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
41497
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
41498
|
+
*/
|
|
41499
|
+
StateSync.decodeDelimited = function decodeDelimited(reader) {
|
|
41500
|
+
if (!(reader instanceof $Reader))
|
|
41501
|
+
reader = new $Reader(reader);
|
|
41502
|
+
return this.decode(reader, reader.uint32());
|
|
41503
|
+
};
|
|
41504
|
+
|
|
41505
|
+
/**
|
|
41506
|
+
* Verifies a StateSync message.
|
|
41507
|
+
* @function verify
|
|
41508
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41509
|
+
* @static
|
|
41510
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
41511
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
41512
|
+
*/
|
|
41513
|
+
StateSync.verify = function verify(message) {
|
|
41514
|
+
if (typeof message !== "object" || message === null)
|
|
41515
|
+
return "object expected";
|
|
41516
|
+
if (message.totalSyncedTime != null && message.hasOwnProperty("totalSyncedTime"))
|
|
41517
|
+
if (!$util.isInteger(message.totalSyncedTime) && !(message.totalSyncedTime && $util.isInteger(message.totalSyncedTime.low) && $util.isInteger(message.totalSyncedTime.high)))
|
|
41518
|
+
return "totalSyncedTime: integer|Long expected";
|
|
41519
|
+
if (message.remainingTime != null && message.hasOwnProperty("remainingTime"))
|
|
41520
|
+
if (!$util.isInteger(message.remainingTime) && !(message.remainingTime && $util.isInteger(message.remainingTime.low) && $util.isInteger(message.remainingTime.high)))
|
|
41521
|
+
return "remainingTime: integer|Long expected";
|
|
41522
|
+
if (message.totalSnapshots != null && message.hasOwnProperty("totalSnapshots"))
|
|
41523
|
+
if (!$util.isInteger(message.totalSnapshots))
|
|
41524
|
+
return "totalSnapshots: integer expected";
|
|
41525
|
+
if (message.chunkProcessAvgTime != null && message.hasOwnProperty("chunkProcessAvgTime"))
|
|
41526
|
+
if (!$util.isInteger(message.chunkProcessAvgTime) && !(message.chunkProcessAvgTime && $util.isInteger(message.chunkProcessAvgTime.low) && $util.isInteger(message.chunkProcessAvgTime.high)))
|
|
41527
|
+
return "chunkProcessAvgTime: integer|Long expected";
|
|
41528
|
+
if (message.snapshotHeight != null && message.hasOwnProperty("snapshotHeight"))
|
|
41529
|
+
if (!$util.isInteger(message.snapshotHeight) && !(message.snapshotHeight && $util.isInteger(message.snapshotHeight.low) && $util.isInteger(message.snapshotHeight.high)))
|
|
41530
|
+
return "snapshotHeight: integer|Long expected";
|
|
41531
|
+
if (message.snapshotChunksCount != null && message.hasOwnProperty("snapshotChunksCount"))
|
|
41532
|
+
if (!$util.isInteger(message.snapshotChunksCount) && !(message.snapshotChunksCount && $util.isInteger(message.snapshotChunksCount.low) && $util.isInteger(message.snapshotChunksCount.high)))
|
|
41533
|
+
return "snapshotChunksCount: integer|Long expected";
|
|
41534
|
+
if (message.backfilledBlocks != null && message.hasOwnProperty("backfilledBlocks"))
|
|
41535
|
+
if (!$util.isInteger(message.backfilledBlocks) && !(message.backfilledBlocks && $util.isInteger(message.backfilledBlocks.low) && $util.isInteger(message.backfilledBlocks.high)))
|
|
41536
|
+
return "backfilledBlocks: integer|Long expected";
|
|
41537
|
+
if (message.backfillBlocksTotal != null && message.hasOwnProperty("backfillBlocksTotal"))
|
|
41538
|
+
if (!$util.isInteger(message.backfillBlocksTotal) && !(message.backfillBlocksTotal && $util.isInteger(message.backfillBlocksTotal.low) && $util.isInteger(message.backfillBlocksTotal.high)))
|
|
41539
|
+
return "backfillBlocksTotal: integer|Long expected";
|
|
41540
|
+
return null;
|
|
41541
|
+
};
|
|
41542
|
+
|
|
41543
|
+
/**
|
|
41544
|
+
* Creates a StateSync message from a plain object. Also converts values to their respective internal types.
|
|
41545
|
+
* @function fromObject
|
|
41546
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41547
|
+
* @static
|
|
41548
|
+
* @param {Object.<string,*>} object Plain object
|
|
41549
|
+
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} StateSync
|
|
41550
|
+
*/
|
|
41551
|
+
StateSync.fromObject = function fromObject(object) {
|
|
41552
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync)
|
|
41553
|
+
return object;
|
|
41554
|
+
var message = new $root.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync();
|
|
41555
|
+
if (object.totalSyncedTime != null)
|
|
41556
|
+
if ($util.Long)
|
|
41557
|
+
(message.totalSyncedTime = $util.Long.fromValue(object.totalSyncedTime)).unsigned = true;
|
|
41558
|
+
else if (typeof object.totalSyncedTime === "string")
|
|
41559
|
+
message.totalSyncedTime = parseInt(object.totalSyncedTime, 10);
|
|
41560
|
+
else if (typeof object.totalSyncedTime === "number")
|
|
41561
|
+
message.totalSyncedTime = object.totalSyncedTime;
|
|
41562
|
+
else if (typeof object.totalSyncedTime === "object")
|
|
41563
|
+
message.totalSyncedTime = new $util.LongBits(object.totalSyncedTime.low >>> 0, object.totalSyncedTime.high >>> 0).toNumber(true);
|
|
41564
|
+
if (object.remainingTime != null)
|
|
41565
|
+
if ($util.Long)
|
|
41566
|
+
(message.remainingTime = $util.Long.fromValue(object.remainingTime)).unsigned = true;
|
|
41567
|
+
else if (typeof object.remainingTime === "string")
|
|
41568
|
+
message.remainingTime = parseInt(object.remainingTime, 10);
|
|
41569
|
+
else if (typeof object.remainingTime === "number")
|
|
41570
|
+
message.remainingTime = object.remainingTime;
|
|
41571
|
+
else if (typeof object.remainingTime === "object")
|
|
41572
|
+
message.remainingTime = new $util.LongBits(object.remainingTime.low >>> 0, object.remainingTime.high >>> 0).toNumber(true);
|
|
41573
|
+
if (object.totalSnapshots != null)
|
|
41574
|
+
message.totalSnapshots = object.totalSnapshots >>> 0;
|
|
41575
|
+
if (object.chunkProcessAvgTime != null)
|
|
41576
|
+
if ($util.Long)
|
|
41577
|
+
(message.chunkProcessAvgTime = $util.Long.fromValue(object.chunkProcessAvgTime)).unsigned = true;
|
|
41578
|
+
else if (typeof object.chunkProcessAvgTime === "string")
|
|
41579
|
+
message.chunkProcessAvgTime = parseInt(object.chunkProcessAvgTime, 10);
|
|
41580
|
+
else if (typeof object.chunkProcessAvgTime === "number")
|
|
41581
|
+
message.chunkProcessAvgTime = object.chunkProcessAvgTime;
|
|
41582
|
+
else if (typeof object.chunkProcessAvgTime === "object")
|
|
41583
|
+
message.chunkProcessAvgTime = new $util.LongBits(object.chunkProcessAvgTime.low >>> 0, object.chunkProcessAvgTime.high >>> 0).toNumber(true);
|
|
41584
|
+
if (object.snapshotHeight != null)
|
|
41585
|
+
if ($util.Long)
|
|
41586
|
+
(message.snapshotHeight = $util.Long.fromValue(object.snapshotHeight)).unsigned = true;
|
|
41587
|
+
else if (typeof object.snapshotHeight === "string")
|
|
41588
|
+
message.snapshotHeight = parseInt(object.snapshotHeight, 10);
|
|
41589
|
+
else if (typeof object.snapshotHeight === "number")
|
|
41590
|
+
message.snapshotHeight = object.snapshotHeight;
|
|
41591
|
+
else if (typeof object.snapshotHeight === "object")
|
|
41592
|
+
message.snapshotHeight = new $util.LongBits(object.snapshotHeight.low >>> 0, object.snapshotHeight.high >>> 0).toNumber(true);
|
|
41593
|
+
if (object.snapshotChunksCount != null)
|
|
41594
|
+
if ($util.Long)
|
|
41595
|
+
(message.snapshotChunksCount = $util.Long.fromValue(object.snapshotChunksCount)).unsigned = true;
|
|
41596
|
+
else if (typeof object.snapshotChunksCount === "string")
|
|
41597
|
+
message.snapshotChunksCount = parseInt(object.snapshotChunksCount, 10);
|
|
41598
|
+
else if (typeof object.snapshotChunksCount === "number")
|
|
41599
|
+
message.snapshotChunksCount = object.snapshotChunksCount;
|
|
41600
|
+
else if (typeof object.snapshotChunksCount === "object")
|
|
41601
|
+
message.snapshotChunksCount = new $util.LongBits(object.snapshotChunksCount.low >>> 0, object.snapshotChunksCount.high >>> 0).toNumber(true);
|
|
41602
|
+
if (object.backfilledBlocks != null)
|
|
41603
|
+
if ($util.Long)
|
|
41604
|
+
(message.backfilledBlocks = $util.Long.fromValue(object.backfilledBlocks)).unsigned = true;
|
|
41605
|
+
else if (typeof object.backfilledBlocks === "string")
|
|
41606
|
+
message.backfilledBlocks = parseInt(object.backfilledBlocks, 10);
|
|
41607
|
+
else if (typeof object.backfilledBlocks === "number")
|
|
41608
|
+
message.backfilledBlocks = object.backfilledBlocks;
|
|
41609
|
+
else if (typeof object.backfilledBlocks === "object")
|
|
41610
|
+
message.backfilledBlocks = new $util.LongBits(object.backfilledBlocks.low >>> 0, object.backfilledBlocks.high >>> 0).toNumber(true);
|
|
41611
|
+
if (object.backfillBlocksTotal != null)
|
|
41612
|
+
if ($util.Long)
|
|
41613
|
+
(message.backfillBlocksTotal = $util.Long.fromValue(object.backfillBlocksTotal)).unsigned = true;
|
|
41614
|
+
else if (typeof object.backfillBlocksTotal === "string")
|
|
41615
|
+
message.backfillBlocksTotal = parseInt(object.backfillBlocksTotal, 10);
|
|
41616
|
+
else if (typeof object.backfillBlocksTotal === "number")
|
|
41617
|
+
message.backfillBlocksTotal = object.backfillBlocksTotal;
|
|
41618
|
+
else if (typeof object.backfillBlocksTotal === "object")
|
|
41619
|
+
message.backfillBlocksTotal = new $util.LongBits(object.backfillBlocksTotal.low >>> 0, object.backfillBlocksTotal.high >>> 0).toNumber(true);
|
|
41620
|
+
return message;
|
|
41621
|
+
};
|
|
41622
|
+
|
|
41623
|
+
/**
|
|
41624
|
+
* Creates a plain object from a StateSync message. Also converts values to other types if specified.
|
|
41625
|
+
* @function toObject
|
|
41626
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41627
|
+
* @static
|
|
41628
|
+
* @param {org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} message StateSync
|
|
41629
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
41630
|
+
* @returns {Object.<string,*>} Plain object
|
|
41631
|
+
*/
|
|
41632
|
+
StateSync.toObject = function toObject(message, options) {
|
|
41633
|
+
if (!options)
|
|
41634
|
+
options = {};
|
|
41635
|
+
var object = {};
|
|
41636
|
+
if (options.defaults) {
|
|
41637
|
+
if ($util.Long) {
|
|
41638
|
+
var long = new $util.Long(0, 0, true);
|
|
41639
|
+
object.totalSyncedTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41640
|
+
} else
|
|
41641
|
+
object.totalSyncedTime = options.longs === String ? "0" : 0;
|
|
41642
|
+
if ($util.Long) {
|
|
41643
|
+
var long = new $util.Long(0, 0, true);
|
|
41644
|
+
object.remainingTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41645
|
+
} else
|
|
41646
|
+
object.remainingTime = options.longs === String ? "0" : 0;
|
|
41647
|
+
object.totalSnapshots = 0;
|
|
41648
|
+
if ($util.Long) {
|
|
41649
|
+
var long = new $util.Long(0, 0, true);
|
|
41650
|
+
object.chunkProcessAvgTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41651
|
+
} else
|
|
41652
|
+
object.chunkProcessAvgTime = options.longs === String ? "0" : 0;
|
|
41653
|
+
if ($util.Long) {
|
|
41654
|
+
var long = new $util.Long(0, 0, true);
|
|
41655
|
+
object.snapshotHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41656
|
+
} else
|
|
41657
|
+
object.snapshotHeight = options.longs === String ? "0" : 0;
|
|
41658
|
+
if ($util.Long) {
|
|
41659
|
+
var long = new $util.Long(0, 0, true);
|
|
41660
|
+
object.snapshotChunksCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41661
|
+
} else
|
|
41662
|
+
object.snapshotChunksCount = options.longs === String ? "0" : 0;
|
|
41663
|
+
if ($util.Long) {
|
|
41664
|
+
var long = new $util.Long(0, 0, true);
|
|
41665
|
+
object.backfilledBlocks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41666
|
+
} else
|
|
41667
|
+
object.backfilledBlocks = options.longs === String ? "0" : 0;
|
|
41668
|
+
if ($util.Long) {
|
|
41669
|
+
var long = new $util.Long(0, 0, true);
|
|
41670
|
+
object.backfillBlocksTotal = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
41671
|
+
} else
|
|
41672
|
+
object.backfillBlocksTotal = options.longs === String ? "0" : 0;
|
|
41673
|
+
}
|
|
41674
|
+
if (message.totalSyncedTime != null && message.hasOwnProperty("totalSyncedTime"))
|
|
41675
|
+
if (typeof message.totalSyncedTime === "number")
|
|
41676
|
+
object.totalSyncedTime = options.longs === String ? String(message.totalSyncedTime) : message.totalSyncedTime;
|
|
41677
|
+
else
|
|
41678
|
+
object.totalSyncedTime = options.longs === String ? $util.Long.prototype.toString.call(message.totalSyncedTime) : options.longs === Number ? new $util.LongBits(message.totalSyncedTime.low >>> 0, message.totalSyncedTime.high >>> 0).toNumber(true) : message.totalSyncedTime;
|
|
41679
|
+
if (message.remainingTime != null && message.hasOwnProperty("remainingTime"))
|
|
41680
|
+
if (typeof message.remainingTime === "number")
|
|
41681
|
+
object.remainingTime = options.longs === String ? String(message.remainingTime) : message.remainingTime;
|
|
41682
|
+
else
|
|
41683
|
+
object.remainingTime = options.longs === String ? $util.Long.prototype.toString.call(message.remainingTime) : options.longs === Number ? new $util.LongBits(message.remainingTime.low >>> 0, message.remainingTime.high >>> 0).toNumber(true) : message.remainingTime;
|
|
41684
|
+
if (message.totalSnapshots != null && message.hasOwnProperty("totalSnapshots"))
|
|
41685
|
+
object.totalSnapshots = message.totalSnapshots;
|
|
41686
|
+
if (message.chunkProcessAvgTime != null && message.hasOwnProperty("chunkProcessAvgTime"))
|
|
41687
|
+
if (typeof message.chunkProcessAvgTime === "number")
|
|
41688
|
+
object.chunkProcessAvgTime = options.longs === String ? String(message.chunkProcessAvgTime) : message.chunkProcessAvgTime;
|
|
41689
|
+
else
|
|
41690
|
+
object.chunkProcessAvgTime = options.longs === String ? $util.Long.prototype.toString.call(message.chunkProcessAvgTime) : options.longs === Number ? new $util.LongBits(message.chunkProcessAvgTime.low >>> 0, message.chunkProcessAvgTime.high >>> 0).toNumber(true) : message.chunkProcessAvgTime;
|
|
41691
|
+
if (message.snapshotHeight != null && message.hasOwnProperty("snapshotHeight"))
|
|
41692
|
+
if (typeof message.snapshotHeight === "number")
|
|
41693
|
+
object.snapshotHeight = options.longs === String ? String(message.snapshotHeight) : message.snapshotHeight;
|
|
41694
|
+
else
|
|
41695
|
+
object.snapshotHeight = options.longs === String ? $util.Long.prototype.toString.call(message.snapshotHeight) : options.longs === Number ? new $util.LongBits(message.snapshotHeight.low >>> 0, message.snapshotHeight.high >>> 0).toNumber(true) : message.snapshotHeight;
|
|
41696
|
+
if (message.snapshotChunksCount != null && message.hasOwnProperty("snapshotChunksCount"))
|
|
41697
|
+
if (typeof message.snapshotChunksCount === "number")
|
|
41698
|
+
object.snapshotChunksCount = options.longs === String ? String(message.snapshotChunksCount) : message.snapshotChunksCount;
|
|
41699
|
+
else
|
|
41700
|
+
object.snapshotChunksCount = options.longs === String ? $util.Long.prototype.toString.call(message.snapshotChunksCount) : options.longs === Number ? new $util.LongBits(message.snapshotChunksCount.low >>> 0, message.snapshotChunksCount.high >>> 0).toNumber(true) : message.snapshotChunksCount;
|
|
41701
|
+
if (message.backfilledBlocks != null && message.hasOwnProperty("backfilledBlocks"))
|
|
41702
|
+
if (typeof message.backfilledBlocks === "number")
|
|
41703
|
+
object.backfilledBlocks = options.longs === String ? String(message.backfilledBlocks) : message.backfilledBlocks;
|
|
41704
|
+
else
|
|
41705
|
+
object.backfilledBlocks = options.longs === String ? $util.Long.prototype.toString.call(message.backfilledBlocks) : options.longs === Number ? new $util.LongBits(message.backfilledBlocks.low >>> 0, message.backfilledBlocks.high >>> 0).toNumber(true) : message.backfilledBlocks;
|
|
41706
|
+
if (message.backfillBlocksTotal != null && message.hasOwnProperty("backfillBlocksTotal"))
|
|
41707
|
+
if (typeof message.backfillBlocksTotal === "number")
|
|
41708
|
+
object.backfillBlocksTotal = options.longs === String ? String(message.backfillBlocksTotal) : message.backfillBlocksTotal;
|
|
41709
|
+
else
|
|
41710
|
+
object.backfillBlocksTotal = options.longs === String ? $util.Long.prototype.toString.call(message.backfillBlocksTotal) : options.longs === Number ? new $util.LongBits(message.backfillBlocksTotal.low >>> 0, message.backfillBlocksTotal.high >>> 0).toNumber(true) : message.backfillBlocksTotal;
|
|
41711
|
+
return object;
|
|
41712
|
+
};
|
|
41713
|
+
|
|
41714
|
+
/**
|
|
41715
|
+
* Converts this StateSync to JSON.
|
|
41716
|
+
* @function toJSON
|
|
41717
|
+
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync
|
|
41718
|
+
* @instance
|
|
41719
|
+
* @returns {Object.<string,*>} JSON object
|
|
41720
|
+
*/
|
|
41721
|
+
StateSync.prototype.toJSON = function toJSON() {
|
|
41722
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
41723
|
+
};
|
|
41724
|
+
|
|
41725
|
+
return StateSync;
|
|
41726
|
+
})();
|
|
41727
|
+
|
|
41728
|
+
return GetStatusResponseV0;
|
|
41729
|
+
})();
|
|
41730
|
+
|
|
41731
|
+
return GetStatusResponse;
|
|
41732
|
+
})();
|
|
41733
|
+
|
|
38061
41734
|
return v0;
|
|
38062
41735
|
})();
|
|
38063
41736
|
|