@dashevo/dapi-grpc 0.25.22 → 1.0.0-beta.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 +35 -16
- package/build.rs +139 -56
- package/clients/core/v0/nodejs/CorePromiseClient.js +124 -13
- package/clients/core/v0/nodejs/core_pbjs.js +1922 -987
- package/clients/core/v0/nodejs/core_protoc.js +1291 -645
- package/clients/core/v0/rust/core_example.rs +1 -1
- package/clients/core/v0/web/CorePromiseClient.js +49 -5
- package/clients/core/v0/web/core_pb.d.ts +173 -89
- package/clients/core/v0/web/core_pb.js +1291 -645
- package/clients/core/v0/web/core_pb_service.d.ts +59 -10
- package/clients/core/v0/web/core_pb_service.js +134 -6
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +208 -14
- package/clients/platform/v0/nodejs/platform_pbjs.js +22951 -9938
- package/clients/platform/v0/nodejs/platform_protoc.js +22332 -9091
- package/clients/platform/v0/rust/platform_example.rs +1 -1
- package/clients/platform/v0/web/PlatformPromiseClient.js +64 -8
- package/clients/platform/v0/web/platform_pb.d.ts +2057 -302
- package/clients/platform/v0/web/platform_pb.js +22332 -9091
- package/clients/platform/v0/web/platform_pb_service.d.ts +187 -35
- package/clients/platform/v0/web/platform_pb_service.js +355 -35
- package/package.json +2 -2
- package/protos/core/v0/core.proto +45 -23
- package/protos/platform/v0/platform.proto +429 -50
- package/src/lib.rs +26 -2
- package/src/mock/serde_mockable.rs +105 -0
- package/src/mock.rs +130 -0
- package/test/unit/clients/core/v0/nodejs/CorePromiseClient.spec.js +27 -6
- package/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js +55 -1
- package/test/unit/getCoreDefinition.spec.js +5 -2
- package/src/core/proto/org.dash.platform.dapi.v0.rs +0 -666
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +0 -2481
|
@@ -87,35 +87,68 @@ $root.org = (function() {
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* Callback as used by {@link org.dash.platform.dapi.v0.Core#
|
|
90
|
+
* Callback as used by {@link org.dash.platform.dapi.v0.Core#getBlockchainStatus}.
|
|
91
91
|
* @memberof org.dash.platform.dapi.v0.Core
|
|
92
|
-
* @typedef
|
|
92
|
+
* @typedef getBlockchainStatusCallback
|
|
93
93
|
* @type {function}
|
|
94
94
|
* @param {Error|null} error Error, if any
|
|
95
|
-
* @param {org.dash.platform.dapi.v0.
|
|
95
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse} [response] GetBlockchainStatusResponse
|
|
96
96
|
*/
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* Calls
|
|
100
|
-
* @function
|
|
99
|
+
* Calls getBlockchainStatus.
|
|
100
|
+
* @function getBlockchainStatus
|
|
101
101
|
* @memberof org.dash.platform.dapi.v0.Core
|
|
102
102
|
* @instance
|
|
103
|
-
* @param {org.dash.platform.dapi.v0.
|
|
104
|
-
* @param {org.dash.platform.dapi.v0.Core.
|
|
103
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusRequest} request GetBlockchainStatusRequest message or plain object
|
|
104
|
+
* @param {org.dash.platform.dapi.v0.Core.getBlockchainStatusCallback} callback Node-style callback called with the error, if any, and GetBlockchainStatusResponse
|
|
105
105
|
* @returns {undefined}
|
|
106
106
|
* @variation 1
|
|
107
107
|
*/
|
|
108
|
-
Object.defineProperty(Core.prototype.
|
|
109
|
-
return this.rpcCall(
|
|
110
|
-
}, "name", { value: "
|
|
108
|
+
Object.defineProperty(Core.prototype.getBlockchainStatus = function getBlockchainStatus(request, callback) {
|
|
109
|
+
return this.rpcCall(getBlockchainStatus, $root.org.dash.platform.dapi.v0.GetBlockchainStatusRequest, $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse, request, callback);
|
|
110
|
+
}, "name", { value: "getBlockchainStatus" });
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
* Calls
|
|
114
|
-
* @function
|
|
113
|
+
* Calls getBlockchainStatus.
|
|
114
|
+
* @function getBlockchainStatus
|
|
115
115
|
* @memberof org.dash.platform.dapi.v0.Core
|
|
116
116
|
* @instance
|
|
117
|
-
* @param {org.dash.platform.dapi.v0.
|
|
118
|
-
* @returns {Promise<org.dash.platform.dapi.v0.
|
|
117
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusRequest} request GetBlockchainStatusRequest message or plain object
|
|
118
|
+
* @returns {Promise<org.dash.platform.dapi.v0.GetBlockchainStatusResponse>} Promise
|
|
119
|
+
* @variation 2
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Callback as used by {@link org.dash.platform.dapi.v0.Core#getMasternodeStatus}.
|
|
124
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
125
|
+
* @typedef getMasternodeStatusCallback
|
|
126
|
+
* @type {function}
|
|
127
|
+
* @param {Error|null} error Error, if any
|
|
128
|
+
* @param {org.dash.platform.dapi.v0.GetMasternodeStatusResponse} [response] GetMasternodeStatusResponse
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Calls getMasternodeStatus.
|
|
133
|
+
* @function getMasternodeStatus
|
|
134
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
135
|
+
* @instance
|
|
136
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusRequest} request GetMasternodeStatusRequest message or plain object
|
|
137
|
+
* @param {org.dash.platform.dapi.v0.Core.getMasternodeStatusCallback} callback Node-style callback called with the error, if any, and GetMasternodeStatusResponse
|
|
138
|
+
* @returns {undefined}
|
|
139
|
+
* @variation 1
|
|
140
|
+
*/
|
|
141
|
+
Object.defineProperty(Core.prototype.getMasternodeStatus = function getMasternodeStatus(request, callback) {
|
|
142
|
+
return this.rpcCall(getMasternodeStatus, $root.org.dash.platform.dapi.v0.GetMasternodeStatusRequest, $root.org.dash.platform.dapi.v0.GetMasternodeStatusResponse, request, callback);
|
|
143
|
+
}, "name", { value: "getMasternodeStatus" });
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Calls getMasternodeStatus.
|
|
147
|
+
* @function getMasternodeStatus
|
|
148
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
149
|
+
* @instance
|
|
150
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusRequest} request GetMasternodeStatusRequest message or plain object
|
|
151
|
+
* @returns {Promise<org.dash.platform.dapi.v0.GetMasternodeStatusResponse>} Promise
|
|
119
152
|
* @variation 2
|
|
120
153
|
*/
|
|
121
154
|
|
|
@@ -152,6 +185,39 @@ $root.org = (function() {
|
|
|
152
185
|
* @variation 2
|
|
153
186
|
*/
|
|
154
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Callback as used by {@link org.dash.platform.dapi.v0.Core#getBestBlockHeight}.
|
|
190
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
191
|
+
* @typedef getBestBlockHeightCallback
|
|
192
|
+
* @type {function}
|
|
193
|
+
* @param {Error|null} error Error, if any
|
|
194
|
+
* @param {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} [response] GetBestBlockHeightResponse
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Calls getBestBlockHeight.
|
|
199
|
+
* @function getBestBlockHeight
|
|
200
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
201
|
+
* @instance
|
|
202
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest} request GetBestBlockHeightRequest message or plain object
|
|
203
|
+
* @param {org.dash.platform.dapi.v0.Core.getBestBlockHeightCallback} callback Node-style callback called with the error, if any, and GetBestBlockHeightResponse
|
|
204
|
+
* @returns {undefined}
|
|
205
|
+
* @variation 1
|
|
206
|
+
*/
|
|
207
|
+
Object.defineProperty(Core.prototype.getBestBlockHeight = function getBestBlockHeight(request, callback) {
|
|
208
|
+
return this.rpcCall(getBestBlockHeight, $root.org.dash.platform.dapi.v0.GetBestBlockHeightRequest, $root.org.dash.platform.dapi.v0.GetBestBlockHeightResponse, request, callback);
|
|
209
|
+
}, "name", { value: "getBestBlockHeight" });
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Calls getBestBlockHeight.
|
|
213
|
+
* @function getBestBlockHeight
|
|
214
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
215
|
+
* @instance
|
|
216
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest} request GetBestBlockHeightRequest message or plain object
|
|
217
|
+
* @returns {Promise<org.dash.platform.dapi.v0.GetBestBlockHeightResponse>} Promise
|
|
218
|
+
* @variation 2
|
|
219
|
+
*/
|
|
220
|
+
|
|
155
221
|
/**
|
|
156
222
|
* Callback as used by {@link org.dash.platform.dapi.v0.Core#broadcastTransaction}.
|
|
157
223
|
* @memberof org.dash.platform.dapi.v0.Core
|
|
@@ -317,26 +383,59 @@ $root.org = (function() {
|
|
|
317
383
|
* @variation 2
|
|
318
384
|
*/
|
|
319
385
|
|
|
386
|
+
/**
|
|
387
|
+
* Callback as used by {@link org.dash.platform.dapi.v0.Core#subscribeToMasternodeList}.
|
|
388
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
389
|
+
* @typedef subscribeToMasternodeListCallback
|
|
390
|
+
* @type {function}
|
|
391
|
+
* @param {Error|null} error Error, if any
|
|
392
|
+
* @param {org.dash.platform.dapi.v0.MasternodeListResponse} [response] MasternodeListResponse
|
|
393
|
+
*/
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Calls subscribeToMasternodeList.
|
|
397
|
+
* @function subscribeToMasternodeList
|
|
398
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
399
|
+
* @instance
|
|
400
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListRequest} request MasternodeListRequest message or plain object
|
|
401
|
+
* @param {org.dash.platform.dapi.v0.Core.subscribeToMasternodeListCallback} callback Node-style callback called with the error, if any, and MasternodeListResponse
|
|
402
|
+
* @returns {undefined}
|
|
403
|
+
* @variation 1
|
|
404
|
+
*/
|
|
405
|
+
Object.defineProperty(Core.prototype.subscribeToMasternodeList = function subscribeToMasternodeList(request, callback) {
|
|
406
|
+
return this.rpcCall(subscribeToMasternodeList, $root.org.dash.platform.dapi.v0.MasternodeListRequest, $root.org.dash.platform.dapi.v0.MasternodeListResponse, request, callback);
|
|
407
|
+
}, "name", { value: "subscribeToMasternodeList" });
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Calls subscribeToMasternodeList.
|
|
411
|
+
* @function subscribeToMasternodeList
|
|
412
|
+
* @memberof org.dash.platform.dapi.v0.Core
|
|
413
|
+
* @instance
|
|
414
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListRequest} request MasternodeListRequest message or plain object
|
|
415
|
+
* @returns {Promise<org.dash.platform.dapi.v0.MasternodeListResponse>} Promise
|
|
416
|
+
* @variation 2
|
|
417
|
+
*/
|
|
418
|
+
|
|
320
419
|
return Core;
|
|
321
420
|
})();
|
|
322
421
|
|
|
323
|
-
v0.
|
|
422
|
+
v0.GetBlockchainStatusRequest = (function() {
|
|
324
423
|
|
|
325
424
|
/**
|
|
326
|
-
* Properties of a
|
|
425
|
+
* Properties of a GetBlockchainStatusRequest.
|
|
327
426
|
* @memberof org.dash.platform.dapi.v0
|
|
328
|
-
* @interface
|
|
427
|
+
* @interface IGetBlockchainStatusRequest
|
|
329
428
|
*/
|
|
330
429
|
|
|
331
430
|
/**
|
|
332
|
-
* Constructs a new
|
|
431
|
+
* Constructs a new GetBlockchainStatusRequest.
|
|
333
432
|
* @memberof org.dash.platform.dapi.v0
|
|
334
|
-
* @classdesc Represents a
|
|
335
|
-
* @implements
|
|
433
|
+
* @classdesc Represents a GetBlockchainStatusRequest.
|
|
434
|
+
* @implements IGetBlockchainStatusRequest
|
|
336
435
|
* @constructor
|
|
337
|
-
* @param {org.dash.platform.dapi.v0.
|
|
436
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusRequest=} [properties] Properties to set
|
|
338
437
|
*/
|
|
339
|
-
function
|
|
438
|
+
function GetBlockchainStatusRequest(properties) {
|
|
340
439
|
if (properties)
|
|
341
440
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
342
441
|
if (properties[keys[i]] != null)
|
|
@@ -344,60 +443,60 @@ $root.org = (function() {
|
|
|
344
443
|
}
|
|
345
444
|
|
|
346
445
|
/**
|
|
347
|
-
* Creates a new
|
|
446
|
+
* Creates a new GetBlockchainStatusRequest instance using the specified properties.
|
|
348
447
|
* @function create
|
|
349
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
448
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
350
449
|
* @static
|
|
351
|
-
* @param {org.dash.platform.dapi.v0.
|
|
352
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
450
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusRequest=} [properties] Properties to set
|
|
451
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusRequest} GetBlockchainStatusRequest instance
|
|
353
452
|
*/
|
|
354
|
-
|
|
355
|
-
return new
|
|
453
|
+
GetBlockchainStatusRequest.create = function create(properties) {
|
|
454
|
+
return new GetBlockchainStatusRequest(properties);
|
|
356
455
|
};
|
|
357
456
|
|
|
358
457
|
/**
|
|
359
|
-
* Encodes the specified
|
|
458
|
+
* Encodes the specified GetBlockchainStatusRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusRequest.verify|verify} messages.
|
|
360
459
|
* @function encode
|
|
361
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
460
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
362
461
|
* @static
|
|
363
|
-
* @param {org.dash.platform.dapi.v0.
|
|
462
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusRequest} message GetBlockchainStatusRequest message or plain object to encode
|
|
364
463
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
365
464
|
* @returns {$protobuf.Writer} Writer
|
|
366
465
|
*/
|
|
367
|
-
|
|
466
|
+
GetBlockchainStatusRequest.encode = function encode(message, writer) {
|
|
368
467
|
if (!writer)
|
|
369
468
|
writer = $Writer.create();
|
|
370
469
|
return writer;
|
|
371
470
|
};
|
|
372
471
|
|
|
373
472
|
/**
|
|
374
|
-
* Encodes the specified
|
|
473
|
+
* Encodes the specified GetBlockchainStatusRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusRequest.verify|verify} messages.
|
|
375
474
|
* @function encodeDelimited
|
|
376
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
475
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
377
476
|
* @static
|
|
378
|
-
* @param {org.dash.platform.dapi.v0.
|
|
477
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusRequest} message GetBlockchainStatusRequest message or plain object to encode
|
|
379
478
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
380
479
|
* @returns {$protobuf.Writer} Writer
|
|
381
480
|
*/
|
|
382
|
-
|
|
481
|
+
GetBlockchainStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
383
482
|
return this.encode(message, writer).ldelim();
|
|
384
483
|
};
|
|
385
484
|
|
|
386
485
|
/**
|
|
387
|
-
* Decodes a
|
|
486
|
+
* Decodes a GetBlockchainStatusRequest message from the specified reader or buffer.
|
|
388
487
|
* @function decode
|
|
389
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
488
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
390
489
|
* @static
|
|
391
490
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
392
491
|
* @param {number} [length] Message length if known beforehand
|
|
393
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
492
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusRequest} GetBlockchainStatusRequest
|
|
394
493
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
395
494
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
396
495
|
*/
|
|
397
|
-
|
|
496
|
+
GetBlockchainStatusRequest.decode = function decode(reader, length) {
|
|
398
497
|
if (!(reader instanceof $Reader))
|
|
399
498
|
reader = $Reader.create(reader);
|
|
400
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
499
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusRequest();
|
|
401
500
|
while (reader.pos < end) {
|
|
402
501
|
var tag = reader.uint32();
|
|
403
502
|
switch (tag >>> 3) {
|
|
@@ -410,100 +509,99 @@ $root.org = (function() {
|
|
|
410
509
|
};
|
|
411
510
|
|
|
412
511
|
/**
|
|
413
|
-
* Decodes a
|
|
512
|
+
* Decodes a GetBlockchainStatusRequest message from the specified reader or buffer, length delimited.
|
|
414
513
|
* @function decodeDelimited
|
|
415
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
514
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
416
515
|
* @static
|
|
417
516
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
418
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
517
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusRequest} GetBlockchainStatusRequest
|
|
419
518
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
420
519
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
421
520
|
*/
|
|
422
|
-
|
|
521
|
+
GetBlockchainStatusRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
423
522
|
if (!(reader instanceof $Reader))
|
|
424
523
|
reader = new $Reader(reader);
|
|
425
524
|
return this.decode(reader, reader.uint32());
|
|
426
525
|
};
|
|
427
526
|
|
|
428
527
|
/**
|
|
429
|
-
* Verifies a
|
|
528
|
+
* Verifies a GetBlockchainStatusRequest message.
|
|
430
529
|
* @function verify
|
|
431
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
530
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
432
531
|
* @static
|
|
433
532
|
* @param {Object.<string,*>} message Plain object to verify
|
|
434
533
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
435
534
|
*/
|
|
436
|
-
|
|
535
|
+
GetBlockchainStatusRequest.verify = function verify(message) {
|
|
437
536
|
if (typeof message !== "object" || message === null)
|
|
438
537
|
return "object expected";
|
|
439
538
|
return null;
|
|
440
539
|
};
|
|
441
540
|
|
|
442
541
|
/**
|
|
443
|
-
* Creates a
|
|
542
|
+
* Creates a GetBlockchainStatusRequest message from a plain object. Also converts values to their respective internal types.
|
|
444
543
|
* @function fromObject
|
|
445
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
544
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
446
545
|
* @static
|
|
447
546
|
* @param {Object.<string,*>} object Plain object
|
|
448
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
547
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusRequest} GetBlockchainStatusRequest
|
|
449
548
|
*/
|
|
450
|
-
|
|
451
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
549
|
+
GetBlockchainStatusRequest.fromObject = function fromObject(object) {
|
|
550
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockchainStatusRequest)
|
|
452
551
|
return object;
|
|
453
|
-
return new $root.org.dash.platform.dapi.v0.
|
|
552
|
+
return new $root.org.dash.platform.dapi.v0.GetBlockchainStatusRequest();
|
|
454
553
|
};
|
|
455
554
|
|
|
456
555
|
/**
|
|
457
|
-
* Creates a plain object from a
|
|
556
|
+
* Creates a plain object from a GetBlockchainStatusRequest message. Also converts values to other types if specified.
|
|
458
557
|
* @function toObject
|
|
459
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
558
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
460
559
|
* @static
|
|
461
|
-
* @param {org.dash.platform.dapi.v0.
|
|
560
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusRequest} message GetBlockchainStatusRequest
|
|
462
561
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
463
562
|
* @returns {Object.<string,*>} Plain object
|
|
464
563
|
*/
|
|
465
|
-
|
|
564
|
+
GetBlockchainStatusRequest.toObject = function toObject() {
|
|
466
565
|
return {};
|
|
467
566
|
};
|
|
468
567
|
|
|
469
568
|
/**
|
|
470
|
-
* Converts this
|
|
569
|
+
* Converts this GetBlockchainStatusRequest to JSON.
|
|
471
570
|
* @function toJSON
|
|
472
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
571
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusRequest
|
|
473
572
|
* @instance
|
|
474
573
|
* @returns {Object.<string,*>} JSON object
|
|
475
574
|
*/
|
|
476
|
-
|
|
575
|
+
GetBlockchainStatusRequest.prototype.toJSON = function toJSON() {
|
|
477
576
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
478
577
|
};
|
|
479
578
|
|
|
480
|
-
return
|
|
579
|
+
return GetBlockchainStatusRequest;
|
|
481
580
|
})();
|
|
482
581
|
|
|
483
|
-
v0.
|
|
582
|
+
v0.GetBlockchainStatusResponse = (function() {
|
|
484
583
|
|
|
485
584
|
/**
|
|
486
|
-
* Properties of a
|
|
585
|
+
* Properties of a GetBlockchainStatusResponse.
|
|
487
586
|
* @memberof org.dash.platform.dapi.v0
|
|
488
|
-
* @interface
|
|
489
|
-
* @property {org.dash.platform.dapi.v0.
|
|
490
|
-
* @property {org.dash.platform.dapi.v0.
|
|
491
|
-
* @property {org.dash.platform.dapi.v0.
|
|
492
|
-
* @property {number|null} [syncProgress]
|
|
493
|
-
* @property {org.dash.platform.dapi.v0.
|
|
494
|
-
* @property {org.dash.platform.dapi.v0.
|
|
495
|
-
* @property {org.dash.platform.dapi.v0.GetStatusResponse.INetwork|null} [network] GetStatusResponse network
|
|
587
|
+
* @interface IGetBlockchainStatusResponse
|
|
588
|
+
* @property {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IVersion|null} [version] GetBlockchainStatusResponse version
|
|
589
|
+
* @property {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.ITime|null} [time] GetBlockchainStatusResponse time
|
|
590
|
+
* @property {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status|null} [status] GetBlockchainStatusResponse status
|
|
591
|
+
* @property {number|null} [syncProgress] GetBlockchainStatusResponse syncProgress
|
|
592
|
+
* @property {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IChain|null} [chain] GetBlockchainStatusResponse chain
|
|
593
|
+
* @property {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetwork|null} [network] GetBlockchainStatusResponse network
|
|
496
594
|
*/
|
|
497
595
|
|
|
498
596
|
/**
|
|
499
|
-
* Constructs a new
|
|
597
|
+
* Constructs a new GetBlockchainStatusResponse.
|
|
500
598
|
* @memberof org.dash.platform.dapi.v0
|
|
501
|
-
* @classdesc Represents a
|
|
502
|
-
* @implements
|
|
599
|
+
* @classdesc Represents a GetBlockchainStatusResponse.
|
|
600
|
+
* @implements IGetBlockchainStatusResponse
|
|
503
601
|
* @constructor
|
|
504
|
-
* @param {org.dash.platform.dapi.v0.
|
|
602
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusResponse=} [properties] Properties to set
|
|
505
603
|
*/
|
|
506
|
-
function
|
|
604
|
+
function GetBlockchainStatusResponse(properties) {
|
|
507
605
|
if (properties)
|
|
508
606
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
509
607
|
if (properties[keys[i]] != null)
|
|
@@ -511,138 +609,128 @@ $root.org = (function() {
|
|
|
511
609
|
}
|
|
512
610
|
|
|
513
611
|
/**
|
|
514
|
-
*
|
|
515
|
-
* @member {org.dash.platform.dapi.v0.
|
|
516
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
612
|
+
* GetBlockchainStatusResponse version.
|
|
613
|
+
* @member {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IVersion|null|undefined} version
|
|
614
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
517
615
|
* @instance
|
|
518
616
|
*/
|
|
519
|
-
|
|
617
|
+
GetBlockchainStatusResponse.prototype.version = null;
|
|
520
618
|
|
|
521
619
|
/**
|
|
522
|
-
*
|
|
523
|
-
* @member {org.dash.platform.dapi.v0.
|
|
524
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
620
|
+
* GetBlockchainStatusResponse time.
|
|
621
|
+
* @member {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.ITime|null|undefined} time
|
|
622
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
525
623
|
* @instance
|
|
526
624
|
*/
|
|
527
|
-
|
|
625
|
+
GetBlockchainStatusResponse.prototype.time = null;
|
|
528
626
|
|
|
529
627
|
/**
|
|
530
|
-
*
|
|
531
|
-
* @member {org.dash.platform.dapi.v0.
|
|
532
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
628
|
+
* GetBlockchainStatusResponse status.
|
|
629
|
+
* @member {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status} status
|
|
630
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
533
631
|
* @instance
|
|
534
632
|
*/
|
|
535
|
-
|
|
633
|
+
GetBlockchainStatusResponse.prototype.status = 0;
|
|
536
634
|
|
|
537
635
|
/**
|
|
538
|
-
*
|
|
636
|
+
* GetBlockchainStatusResponse syncProgress.
|
|
539
637
|
* @member {number} syncProgress
|
|
540
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
541
|
-
* @instance
|
|
542
|
-
*/
|
|
543
|
-
GetStatusResponse.prototype.syncProgress = 0;
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* GetStatusResponse chain.
|
|
547
|
-
* @member {org.dash.platform.dapi.v0.GetStatusResponse.IChain|null|undefined} chain
|
|
548
|
-
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
638
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
549
639
|
* @instance
|
|
550
640
|
*/
|
|
551
|
-
|
|
641
|
+
GetBlockchainStatusResponse.prototype.syncProgress = 0;
|
|
552
642
|
|
|
553
643
|
/**
|
|
554
|
-
*
|
|
555
|
-
* @member {org.dash.platform.dapi.v0.
|
|
556
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
644
|
+
* GetBlockchainStatusResponse chain.
|
|
645
|
+
* @member {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IChain|null|undefined} chain
|
|
646
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
557
647
|
* @instance
|
|
558
648
|
*/
|
|
559
|
-
|
|
649
|
+
GetBlockchainStatusResponse.prototype.chain = null;
|
|
560
650
|
|
|
561
651
|
/**
|
|
562
|
-
*
|
|
563
|
-
* @member {org.dash.platform.dapi.v0.
|
|
564
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
652
|
+
* GetBlockchainStatusResponse network.
|
|
653
|
+
* @member {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetwork|null|undefined} network
|
|
654
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
565
655
|
* @instance
|
|
566
656
|
*/
|
|
567
|
-
|
|
657
|
+
GetBlockchainStatusResponse.prototype.network = null;
|
|
568
658
|
|
|
569
659
|
/**
|
|
570
|
-
* Creates a new
|
|
660
|
+
* Creates a new GetBlockchainStatusResponse instance using the specified properties.
|
|
571
661
|
* @function create
|
|
572
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
662
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
573
663
|
* @static
|
|
574
|
-
* @param {org.dash.platform.dapi.v0.
|
|
575
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
664
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusResponse=} [properties] Properties to set
|
|
665
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse} GetBlockchainStatusResponse instance
|
|
576
666
|
*/
|
|
577
|
-
|
|
578
|
-
return new
|
|
667
|
+
GetBlockchainStatusResponse.create = function create(properties) {
|
|
668
|
+
return new GetBlockchainStatusResponse(properties);
|
|
579
669
|
};
|
|
580
670
|
|
|
581
671
|
/**
|
|
582
|
-
* Encodes the specified
|
|
672
|
+
* Encodes the specified GetBlockchainStatusResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.verify|verify} messages.
|
|
583
673
|
* @function encode
|
|
584
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
674
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
585
675
|
* @static
|
|
586
|
-
* @param {org.dash.platform.dapi.v0.
|
|
676
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusResponse} message GetBlockchainStatusResponse message or plain object to encode
|
|
587
677
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
588
678
|
* @returns {$protobuf.Writer} Writer
|
|
589
679
|
*/
|
|
590
|
-
|
|
680
|
+
GetBlockchainStatusResponse.encode = function encode(message, writer) {
|
|
591
681
|
if (!writer)
|
|
592
682
|
writer = $Writer.create();
|
|
593
683
|
if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
|
594
|
-
$root.org.dash.platform.dapi.v0.
|
|
684
|
+
$root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
595
685
|
if (message.time != null && Object.hasOwnProperty.call(message, "time"))
|
|
596
|
-
$root.org.dash.platform.dapi.v0.
|
|
686
|
+
$root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time.encode(message.time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
597
687
|
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
598
688
|
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status);
|
|
599
689
|
if (message.syncProgress != null && Object.hasOwnProperty.call(message, "syncProgress"))
|
|
600
690
|
writer.uint32(/* id 4, wireType 1 =*/33).double(message.syncProgress);
|
|
601
691
|
if (message.chain != null && Object.hasOwnProperty.call(message, "chain"))
|
|
602
|
-
$root.org.dash.platform.dapi.v0.
|
|
603
|
-
if (message.masternode != null && Object.hasOwnProperty.call(message, "masternode"))
|
|
604
|
-
$root.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.encode(message.masternode, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
692
|
+
$root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain.encode(message.chain, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
605
693
|
if (message.network != null && Object.hasOwnProperty.call(message, "network"))
|
|
606
|
-
$root.org.dash.platform.dapi.v0.
|
|
694
|
+
$root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network.encode(message.network, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
607
695
|
return writer;
|
|
608
696
|
};
|
|
609
697
|
|
|
610
698
|
/**
|
|
611
|
-
* Encodes the specified
|
|
699
|
+
* Encodes the specified GetBlockchainStatusResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.verify|verify} messages.
|
|
612
700
|
* @function encodeDelimited
|
|
613
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
701
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
614
702
|
* @static
|
|
615
|
-
* @param {org.dash.platform.dapi.v0.
|
|
703
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockchainStatusResponse} message GetBlockchainStatusResponse message or plain object to encode
|
|
616
704
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
617
705
|
* @returns {$protobuf.Writer} Writer
|
|
618
706
|
*/
|
|
619
|
-
|
|
707
|
+
GetBlockchainStatusResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
620
708
|
return this.encode(message, writer).ldelim();
|
|
621
709
|
};
|
|
622
710
|
|
|
623
711
|
/**
|
|
624
|
-
* Decodes a
|
|
712
|
+
* Decodes a GetBlockchainStatusResponse message from the specified reader or buffer.
|
|
625
713
|
* @function decode
|
|
626
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
714
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
627
715
|
* @static
|
|
628
716
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
629
717
|
* @param {number} [length] Message length if known beforehand
|
|
630
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
718
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse} GetBlockchainStatusResponse
|
|
631
719
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
632
720
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
633
721
|
*/
|
|
634
|
-
|
|
722
|
+
GetBlockchainStatusResponse.decode = function decode(reader, length) {
|
|
635
723
|
if (!(reader instanceof $Reader))
|
|
636
724
|
reader = $Reader.create(reader);
|
|
637
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
725
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse();
|
|
638
726
|
while (reader.pos < end) {
|
|
639
727
|
var tag = reader.uint32();
|
|
640
728
|
switch (tag >>> 3) {
|
|
641
729
|
case 1:
|
|
642
|
-
message.version = $root.org.dash.platform.dapi.v0.
|
|
730
|
+
message.version = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version.decode(reader, reader.uint32());
|
|
643
731
|
break;
|
|
644
732
|
case 2:
|
|
645
|
-
message.time = $root.org.dash.platform.dapi.v0.
|
|
733
|
+
message.time = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time.decode(reader, reader.uint32());
|
|
646
734
|
break;
|
|
647
735
|
case 3:
|
|
648
736
|
message.status = reader.int32();
|
|
@@ -651,13 +739,10 @@ $root.org = (function() {
|
|
|
651
739
|
message.syncProgress = reader.double();
|
|
652
740
|
break;
|
|
653
741
|
case 5:
|
|
654
|
-
message.chain = $root.org.dash.platform.dapi.v0.
|
|
655
|
-
break;
|
|
656
|
-
case 6:
|
|
657
|
-
message.masternode = $root.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.decode(reader, reader.uint32());
|
|
742
|
+
message.chain = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain.decode(reader, reader.uint32());
|
|
658
743
|
break;
|
|
659
744
|
case 7:
|
|
660
|
-
message.network = $root.org.dash.platform.dapi.v0.
|
|
745
|
+
message.network = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network.decode(reader, reader.uint32());
|
|
661
746
|
break;
|
|
662
747
|
default:
|
|
663
748
|
reader.skipType(tag & 7);
|
|
@@ -668,39 +753,39 @@ $root.org = (function() {
|
|
|
668
753
|
};
|
|
669
754
|
|
|
670
755
|
/**
|
|
671
|
-
* Decodes a
|
|
756
|
+
* Decodes a GetBlockchainStatusResponse message from the specified reader or buffer, length delimited.
|
|
672
757
|
* @function decodeDelimited
|
|
673
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
758
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
674
759
|
* @static
|
|
675
760
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
676
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
761
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse} GetBlockchainStatusResponse
|
|
677
762
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
678
763
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
679
764
|
*/
|
|
680
|
-
|
|
765
|
+
GetBlockchainStatusResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
681
766
|
if (!(reader instanceof $Reader))
|
|
682
767
|
reader = new $Reader(reader);
|
|
683
768
|
return this.decode(reader, reader.uint32());
|
|
684
769
|
};
|
|
685
770
|
|
|
686
771
|
/**
|
|
687
|
-
* Verifies a
|
|
772
|
+
* Verifies a GetBlockchainStatusResponse message.
|
|
688
773
|
* @function verify
|
|
689
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
774
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
690
775
|
* @static
|
|
691
776
|
* @param {Object.<string,*>} message Plain object to verify
|
|
692
777
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
693
778
|
*/
|
|
694
|
-
|
|
779
|
+
GetBlockchainStatusResponse.verify = function verify(message) {
|
|
695
780
|
if (typeof message !== "object" || message === null)
|
|
696
781
|
return "object expected";
|
|
697
782
|
if (message.version != null && message.hasOwnProperty("version")) {
|
|
698
|
-
var error = $root.org.dash.platform.dapi.v0.
|
|
783
|
+
var error = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version.verify(message.version);
|
|
699
784
|
if (error)
|
|
700
785
|
return "version." + error;
|
|
701
786
|
}
|
|
702
787
|
if (message.time != null && message.hasOwnProperty("time")) {
|
|
703
|
-
var error = $root.org.dash.platform.dapi.v0.
|
|
788
|
+
var error = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time.verify(message.time);
|
|
704
789
|
if (error)
|
|
705
790
|
return "time." + error;
|
|
706
791
|
}
|
|
@@ -718,17 +803,12 @@ $root.org = (function() {
|
|
|
718
803
|
if (typeof message.syncProgress !== "number")
|
|
719
804
|
return "syncProgress: number expected";
|
|
720
805
|
if (message.chain != null && message.hasOwnProperty("chain")) {
|
|
721
|
-
var error = $root.org.dash.platform.dapi.v0.
|
|
806
|
+
var error = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain.verify(message.chain);
|
|
722
807
|
if (error)
|
|
723
808
|
return "chain." + error;
|
|
724
809
|
}
|
|
725
|
-
if (message.masternode != null && message.hasOwnProperty("masternode")) {
|
|
726
|
-
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.verify(message.masternode);
|
|
727
|
-
if (error)
|
|
728
|
-
return "masternode." + error;
|
|
729
|
-
}
|
|
730
810
|
if (message.network != null && message.hasOwnProperty("network")) {
|
|
731
|
-
var error = $root.org.dash.platform.dapi.v0.
|
|
811
|
+
var error = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network.verify(message.network);
|
|
732
812
|
if (error)
|
|
733
813
|
return "network." + error;
|
|
734
814
|
}
|
|
@@ -736,26 +816,26 @@ $root.org = (function() {
|
|
|
736
816
|
};
|
|
737
817
|
|
|
738
818
|
/**
|
|
739
|
-
* Creates a
|
|
819
|
+
* Creates a GetBlockchainStatusResponse message from a plain object. Also converts values to their respective internal types.
|
|
740
820
|
* @function fromObject
|
|
741
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
821
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
742
822
|
* @static
|
|
743
823
|
* @param {Object.<string,*>} object Plain object
|
|
744
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
824
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse} GetBlockchainStatusResponse
|
|
745
825
|
*/
|
|
746
|
-
|
|
747
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
826
|
+
GetBlockchainStatusResponse.fromObject = function fromObject(object) {
|
|
827
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse)
|
|
748
828
|
return object;
|
|
749
|
-
var message = new $root.org.dash.platform.dapi.v0.
|
|
829
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse();
|
|
750
830
|
if (object.version != null) {
|
|
751
831
|
if (typeof object.version !== "object")
|
|
752
|
-
throw TypeError(".org.dash.platform.dapi.v0.
|
|
753
|
-
message.version = $root.org.dash.platform.dapi.v0.
|
|
832
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetBlockchainStatusResponse.version: object expected");
|
|
833
|
+
message.version = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version.fromObject(object.version);
|
|
754
834
|
}
|
|
755
835
|
if (object.time != null) {
|
|
756
836
|
if (typeof object.time !== "object")
|
|
757
|
-
throw TypeError(".org.dash.platform.dapi.v0.
|
|
758
|
-
message.time = $root.org.dash.platform.dapi.v0.
|
|
837
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetBlockchainStatusResponse.time: object expected");
|
|
838
|
+
message.time = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time.fromObject(object.time);
|
|
759
839
|
}
|
|
760
840
|
switch (object.status) {
|
|
761
841
|
case "NOT_STARTED":
|
|
@@ -779,32 +859,27 @@ $root.org = (function() {
|
|
|
779
859
|
message.syncProgress = Number(object.syncProgress);
|
|
780
860
|
if (object.chain != null) {
|
|
781
861
|
if (typeof object.chain !== "object")
|
|
782
|
-
throw TypeError(".org.dash.platform.dapi.v0.
|
|
783
|
-
message.chain = $root.org.dash.platform.dapi.v0.
|
|
784
|
-
}
|
|
785
|
-
if (object.masternode != null) {
|
|
786
|
-
if (typeof object.masternode !== "object")
|
|
787
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.masternode: object expected");
|
|
788
|
-
message.masternode = $root.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.fromObject(object.masternode);
|
|
862
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetBlockchainStatusResponse.chain: object expected");
|
|
863
|
+
message.chain = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain.fromObject(object.chain);
|
|
789
864
|
}
|
|
790
865
|
if (object.network != null) {
|
|
791
866
|
if (typeof object.network !== "object")
|
|
792
|
-
throw TypeError(".org.dash.platform.dapi.v0.
|
|
793
|
-
message.network = $root.org.dash.platform.dapi.v0.
|
|
867
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetBlockchainStatusResponse.network: object expected");
|
|
868
|
+
message.network = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network.fromObject(object.network);
|
|
794
869
|
}
|
|
795
870
|
return message;
|
|
796
871
|
};
|
|
797
872
|
|
|
798
873
|
/**
|
|
799
|
-
* Creates a plain object from a
|
|
874
|
+
* Creates a plain object from a GetBlockchainStatusResponse message. Also converts values to other types if specified.
|
|
800
875
|
* @function toObject
|
|
801
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
876
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
802
877
|
* @static
|
|
803
|
-
* @param {org.dash.platform.dapi.v0.
|
|
878
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse} message GetBlockchainStatusResponse
|
|
804
879
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
805
880
|
* @returns {Object.<string,*>} Plain object
|
|
806
881
|
*/
|
|
807
|
-
|
|
882
|
+
GetBlockchainStatusResponse.toObject = function toObject(message, options) {
|
|
808
883
|
if (!options)
|
|
809
884
|
options = {};
|
|
810
885
|
var object = {};
|
|
@@ -814,42 +889,39 @@ $root.org = (function() {
|
|
|
814
889
|
object.status = options.enums === String ? "NOT_STARTED" : 0;
|
|
815
890
|
object.syncProgress = 0;
|
|
816
891
|
object.chain = null;
|
|
817
|
-
object.masternode = null;
|
|
818
892
|
object.network = null;
|
|
819
893
|
}
|
|
820
894
|
if (message.version != null && message.hasOwnProperty("version"))
|
|
821
|
-
object.version = $root.org.dash.platform.dapi.v0.
|
|
895
|
+
object.version = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version.toObject(message.version, options);
|
|
822
896
|
if (message.time != null && message.hasOwnProperty("time"))
|
|
823
|
-
object.time = $root.org.dash.platform.dapi.v0.
|
|
897
|
+
object.time = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time.toObject(message.time, options);
|
|
824
898
|
if (message.status != null && message.hasOwnProperty("status"))
|
|
825
|
-
object.status = options.enums === String ? $root.org.dash.platform.dapi.v0.
|
|
899
|
+
object.status = options.enums === String ? $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status[message.status] : message.status;
|
|
826
900
|
if (message.syncProgress != null && message.hasOwnProperty("syncProgress"))
|
|
827
901
|
object.syncProgress = options.json && !isFinite(message.syncProgress) ? String(message.syncProgress) : message.syncProgress;
|
|
828
902
|
if (message.chain != null && message.hasOwnProperty("chain"))
|
|
829
|
-
object.chain = $root.org.dash.platform.dapi.v0.
|
|
830
|
-
if (message.masternode != null && message.hasOwnProperty("masternode"))
|
|
831
|
-
object.masternode = $root.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.toObject(message.masternode, options);
|
|
903
|
+
object.chain = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain.toObject(message.chain, options);
|
|
832
904
|
if (message.network != null && message.hasOwnProperty("network"))
|
|
833
|
-
object.network = $root.org.dash.platform.dapi.v0.
|
|
905
|
+
object.network = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network.toObject(message.network, options);
|
|
834
906
|
return object;
|
|
835
907
|
};
|
|
836
908
|
|
|
837
909
|
/**
|
|
838
|
-
* Converts this
|
|
910
|
+
* Converts this GetBlockchainStatusResponse to JSON.
|
|
839
911
|
* @function toJSON
|
|
840
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
912
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
841
913
|
* @instance
|
|
842
914
|
* @returns {Object.<string,*>} JSON object
|
|
843
915
|
*/
|
|
844
|
-
|
|
916
|
+
GetBlockchainStatusResponse.prototype.toJSON = function toJSON() {
|
|
845
917
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
846
918
|
};
|
|
847
919
|
|
|
848
|
-
|
|
920
|
+
GetBlockchainStatusResponse.Version = (function() {
|
|
849
921
|
|
|
850
922
|
/**
|
|
851
923
|
* Properties of a Version.
|
|
852
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
924
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
853
925
|
* @interface IVersion
|
|
854
926
|
* @property {number|null} [protocol] Version protocol
|
|
855
927
|
* @property {number|null} [software] Version software
|
|
@@ -858,11 +930,11 @@ $root.org = (function() {
|
|
|
858
930
|
|
|
859
931
|
/**
|
|
860
932
|
* Constructs a new Version.
|
|
861
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
933
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
862
934
|
* @classdesc Represents a Version.
|
|
863
935
|
* @implements IVersion
|
|
864
936
|
* @constructor
|
|
865
|
-
* @param {org.dash.platform.dapi.v0.
|
|
937
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IVersion=} [properties] Properties to set
|
|
866
938
|
*/
|
|
867
939
|
function Version(properties) {
|
|
868
940
|
if (properties)
|
|
@@ -874,7 +946,7 @@ $root.org = (function() {
|
|
|
874
946
|
/**
|
|
875
947
|
* Version protocol.
|
|
876
948
|
* @member {number} protocol
|
|
877
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
949
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
878
950
|
* @instance
|
|
879
951
|
*/
|
|
880
952
|
Version.prototype.protocol = 0;
|
|
@@ -882,7 +954,7 @@ $root.org = (function() {
|
|
|
882
954
|
/**
|
|
883
955
|
* Version software.
|
|
884
956
|
* @member {number} software
|
|
885
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
957
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
886
958
|
* @instance
|
|
887
959
|
*/
|
|
888
960
|
Version.prototype.software = 0;
|
|
@@ -890,7 +962,7 @@ $root.org = (function() {
|
|
|
890
962
|
/**
|
|
891
963
|
* Version agent.
|
|
892
964
|
* @member {string} agent
|
|
893
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
965
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
894
966
|
* @instance
|
|
895
967
|
*/
|
|
896
968
|
Version.prototype.agent = "";
|
|
@@ -898,21 +970,21 @@ $root.org = (function() {
|
|
|
898
970
|
/**
|
|
899
971
|
* Creates a new Version instance using the specified properties.
|
|
900
972
|
* @function create
|
|
901
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
973
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
902
974
|
* @static
|
|
903
|
-
* @param {org.dash.platform.dapi.v0.
|
|
904
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
975
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IVersion=} [properties] Properties to set
|
|
976
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version} Version instance
|
|
905
977
|
*/
|
|
906
978
|
Version.create = function create(properties) {
|
|
907
979
|
return new Version(properties);
|
|
908
980
|
};
|
|
909
981
|
|
|
910
982
|
/**
|
|
911
|
-
* Encodes the specified Version message. Does not implicitly {@link org.dash.platform.dapi.v0.
|
|
983
|
+
* Encodes the specified Version message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version.verify|verify} messages.
|
|
912
984
|
* @function encode
|
|
913
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
985
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
914
986
|
* @static
|
|
915
|
-
* @param {org.dash.platform.dapi.v0.
|
|
987
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IVersion} message Version message or plain object to encode
|
|
916
988
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
917
989
|
* @returns {$protobuf.Writer} Writer
|
|
918
990
|
*/
|
|
@@ -929,11 +1001,11 @@ $root.org = (function() {
|
|
|
929
1001
|
};
|
|
930
1002
|
|
|
931
1003
|
/**
|
|
932
|
-
* Encodes the specified Version message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.
|
|
1004
|
+
* Encodes the specified Version message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version.verify|verify} messages.
|
|
933
1005
|
* @function encodeDelimited
|
|
934
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1006
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
935
1007
|
* @static
|
|
936
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1008
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IVersion} message Version message or plain object to encode
|
|
937
1009
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
938
1010
|
* @returns {$protobuf.Writer} Writer
|
|
939
1011
|
*/
|
|
@@ -944,18 +1016,18 @@ $root.org = (function() {
|
|
|
944
1016
|
/**
|
|
945
1017
|
* Decodes a Version message from the specified reader or buffer.
|
|
946
1018
|
* @function decode
|
|
947
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1019
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
948
1020
|
* @static
|
|
949
1021
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
950
1022
|
* @param {number} [length] Message length if known beforehand
|
|
951
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1023
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version} Version
|
|
952
1024
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
953
1025
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
954
1026
|
*/
|
|
955
1027
|
Version.decode = function decode(reader, length) {
|
|
956
1028
|
if (!(reader instanceof $Reader))
|
|
957
1029
|
reader = $Reader.create(reader);
|
|
958
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
1030
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version();
|
|
959
1031
|
while (reader.pos < end) {
|
|
960
1032
|
var tag = reader.uint32();
|
|
961
1033
|
switch (tag >>> 3) {
|
|
@@ -979,10 +1051,10 @@ $root.org = (function() {
|
|
|
979
1051
|
/**
|
|
980
1052
|
* Decodes a Version message from the specified reader or buffer, length delimited.
|
|
981
1053
|
* @function decodeDelimited
|
|
982
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1054
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
983
1055
|
* @static
|
|
984
1056
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
985
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1057
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version} Version
|
|
986
1058
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
987
1059
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
988
1060
|
*/
|
|
@@ -995,7 +1067,7 @@ $root.org = (function() {
|
|
|
995
1067
|
/**
|
|
996
1068
|
* Verifies a Version message.
|
|
997
1069
|
* @function verify
|
|
998
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1070
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
999
1071
|
* @static
|
|
1000
1072
|
* @param {Object.<string,*>} message Plain object to verify
|
|
1001
1073
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
@@ -1018,15 +1090,15 @@ $root.org = (function() {
|
|
|
1018
1090
|
/**
|
|
1019
1091
|
* Creates a Version message from a plain object. Also converts values to their respective internal types.
|
|
1020
1092
|
* @function fromObject
|
|
1021
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1093
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
1022
1094
|
* @static
|
|
1023
1095
|
* @param {Object.<string,*>} object Plain object
|
|
1024
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1096
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version} Version
|
|
1025
1097
|
*/
|
|
1026
1098
|
Version.fromObject = function fromObject(object) {
|
|
1027
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
1099
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version)
|
|
1028
1100
|
return object;
|
|
1029
|
-
var message = new $root.org.dash.platform.dapi.v0.
|
|
1101
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version();
|
|
1030
1102
|
if (object.protocol != null)
|
|
1031
1103
|
message.protocol = object.protocol >>> 0;
|
|
1032
1104
|
if (object.software != null)
|
|
@@ -1039,9 +1111,9 @@ $root.org = (function() {
|
|
|
1039
1111
|
/**
|
|
1040
1112
|
* Creates a plain object from a Version message. Also converts values to other types if specified.
|
|
1041
1113
|
* @function toObject
|
|
1042
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1114
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
1043
1115
|
* @static
|
|
1044
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1116
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version} message Version
|
|
1045
1117
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1046
1118
|
* @returns {Object.<string,*>} Plain object
|
|
1047
1119
|
*/
|
|
@@ -1066,7 +1138,7 @@ $root.org = (function() {
|
|
|
1066
1138
|
/**
|
|
1067
1139
|
* Converts this Version to JSON.
|
|
1068
1140
|
* @function toJSON
|
|
1069
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1141
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version
|
|
1070
1142
|
* @instance
|
|
1071
1143
|
* @returns {Object.<string,*>} JSON object
|
|
1072
1144
|
*/
|
|
@@ -1077,11 +1149,11 @@ $root.org = (function() {
|
|
|
1077
1149
|
return Version;
|
|
1078
1150
|
})();
|
|
1079
1151
|
|
|
1080
|
-
|
|
1152
|
+
GetBlockchainStatusResponse.Time = (function() {
|
|
1081
1153
|
|
|
1082
1154
|
/**
|
|
1083
1155
|
* Properties of a Time.
|
|
1084
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1156
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
1085
1157
|
* @interface ITime
|
|
1086
1158
|
* @property {number|null} [now] Time now
|
|
1087
1159
|
* @property {number|null} [offset] Time offset
|
|
@@ -1090,11 +1162,11 @@ $root.org = (function() {
|
|
|
1090
1162
|
|
|
1091
1163
|
/**
|
|
1092
1164
|
* Constructs a new Time.
|
|
1093
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1165
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
1094
1166
|
* @classdesc Represents a Time.
|
|
1095
1167
|
* @implements ITime
|
|
1096
1168
|
* @constructor
|
|
1097
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1169
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.ITime=} [properties] Properties to set
|
|
1098
1170
|
*/
|
|
1099
1171
|
function Time(properties) {
|
|
1100
1172
|
if (properties)
|
|
@@ -1106,7 +1178,7 @@ $root.org = (function() {
|
|
|
1106
1178
|
/**
|
|
1107
1179
|
* Time now.
|
|
1108
1180
|
* @member {number} now
|
|
1109
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1181
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1110
1182
|
* @instance
|
|
1111
1183
|
*/
|
|
1112
1184
|
Time.prototype.now = 0;
|
|
@@ -1114,7 +1186,7 @@ $root.org = (function() {
|
|
|
1114
1186
|
/**
|
|
1115
1187
|
* Time offset.
|
|
1116
1188
|
* @member {number} offset
|
|
1117
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1189
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1118
1190
|
* @instance
|
|
1119
1191
|
*/
|
|
1120
1192
|
Time.prototype.offset = 0;
|
|
@@ -1122,7 +1194,7 @@ $root.org = (function() {
|
|
|
1122
1194
|
/**
|
|
1123
1195
|
* Time median.
|
|
1124
1196
|
* @member {number} median
|
|
1125
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1197
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1126
1198
|
* @instance
|
|
1127
1199
|
*/
|
|
1128
1200
|
Time.prototype.median = 0;
|
|
@@ -1130,21 +1202,21 @@ $root.org = (function() {
|
|
|
1130
1202
|
/**
|
|
1131
1203
|
* Creates a new Time instance using the specified properties.
|
|
1132
1204
|
* @function create
|
|
1133
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1205
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1134
1206
|
* @static
|
|
1135
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1136
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1207
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.ITime=} [properties] Properties to set
|
|
1208
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time} Time instance
|
|
1137
1209
|
*/
|
|
1138
1210
|
Time.create = function create(properties) {
|
|
1139
1211
|
return new Time(properties);
|
|
1140
1212
|
};
|
|
1141
1213
|
|
|
1142
1214
|
/**
|
|
1143
|
-
* Encodes the specified Time message. Does not implicitly {@link org.dash.platform.dapi.v0.
|
|
1215
|
+
* Encodes the specified Time message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time.verify|verify} messages.
|
|
1144
1216
|
* @function encode
|
|
1145
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1217
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1146
1218
|
* @static
|
|
1147
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1219
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.ITime} message Time message or plain object to encode
|
|
1148
1220
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1149
1221
|
* @returns {$protobuf.Writer} Writer
|
|
1150
1222
|
*/
|
|
@@ -1161,11 +1233,11 @@ $root.org = (function() {
|
|
|
1161
1233
|
};
|
|
1162
1234
|
|
|
1163
1235
|
/**
|
|
1164
|
-
* Encodes the specified Time message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.
|
|
1236
|
+
* Encodes the specified Time message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time.verify|verify} messages.
|
|
1165
1237
|
* @function encodeDelimited
|
|
1166
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1238
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1167
1239
|
* @static
|
|
1168
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1240
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.ITime} message Time message or plain object to encode
|
|
1169
1241
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1170
1242
|
* @returns {$protobuf.Writer} Writer
|
|
1171
1243
|
*/
|
|
@@ -1176,18 +1248,18 @@ $root.org = (function() {
|
|
|
1176
1248
|
/**
|
|
1177
1249
|
* Decodes a Time message from the specified reader or buffer.
|
|
1178
1250
|
* @function decode
|
|
1179
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1251
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1180
1252
|
* @static
|
|
1181
1253
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1182
1254
|
* @param {number} [length] Message length if known beforehand
|
|
1183
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1255
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time} Time
|
|
1184
1256
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1185
1257
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1186
1258
|
*/
|
|
1187
1259
|
Time.decode = function decode(reader, length) {
|
|
1188
1260
|
if (!(reader instanceof $Reader))
|
|
1189
1261
|
reader = $Reader.create(reader);
|
|
1190
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
1262
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time();
|
|
1191
1263
|
while (reader.pos < end) {
|
|
1192
1264
|
var tag = reader.uint32();
|
|
1193
1265
|
switch (tag >>> 3) {
|
|
@@ -1211,10 +1283,10 @@ $root.org = (function() {
|
|
|
1211
1283
|
/**
|
|
1212
1284
|
* Decodes a Time message from the specified reader or buffer, length delimited.
|
|
1213
1285
|
* @function decodeDelimited
|
|
1214
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1286
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1215
1287
|
* @static
|
|
1216
1288
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1217
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1289
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time} Time
|
|
1218
1290
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1219
1291
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1220
1292
|
*/
|
|
@@ -1227,7 +1299,7 @@ $root.org = (function() {
|
|
|
1227
1299
|
/**
|
|
1228
1300
|
* Verifies a Time message.
|
|
1229
1301
|
* @function verify
|
|
1230
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1302
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1231
1303
|
* @static
|
|
1232
1304
|
* @param {Object.<string,*>} message Plain object to verify
|
|
1233
1305
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
@@ -1250,15 +1322,15 @@ $root.org = (function() {
|
|
|
1250
1322
|
/**
|
|
1251
1323
|
* Creates a Time message from a plain object. Also converts values to their respective internal types.
|
|
1252
1324
|
* @function fromObject
|
|
1253
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1325
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1254
1326
|
* @static
|
|
1255
1327
|
* @param {Object.<string,*>} object Plain object
|
|
1256
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1328
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time} Time
|
|
1257
1329
|
*/
|
|
1258
1330
|
Time.fromObject = function fromObject(object) {
|
|
1259
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
1331
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time)
|
|
1260
1332
|
return object;
|
|
1261
|
-
var message = new $root.org.dash.platform.dapi.v0.
|
|
1333
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time();
|
|
1262
1334
|
if (object.now != null)
|
|
1263
1335
|
message.now = object.now >>> 0;
|
|
1264
1336
|
if (object.offset != null)
|
|
@@ -1271,9 +1343,9 @@ $root.org = (function() {
|
|
|
1271
1343
|
/**
|
|
1272
1344
|
* Creates a plain object from a Time message. Also converts values to other types if specified.
|
|
1273
1345
|
* @function toObject
|
|
1274
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1346
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1275
1347
|
* @static
|
|
1276
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1348
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time} message Time
|
|
1277
1349
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1278
1350
|
* @returns {Object.<string,*>} Plain object
|
|
1279
1351
|
*/
|
|
@@ -1298,7 +1370,7 @@ $root.org = (function() {
|
|
|
1298
1370
|
/**
|
|
1299
1371
|
* Converts this Time to JSON.
|
|
1300
1372
|
* @function toJSON
|
|
1301
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1373
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time
|
|
1302
1374
|
* @instance
|
|
1303
1375
|
* @returns {Object.<string,*>} JSON object
|
|
1304
1376
|
*/
|
|
@@ -1311,14 +1383,14 @@ $root.org = (function() {
|
|
|
1311
1383
|
|
|
1312
1384
|
/**
|
|
1313
1385
|
* Status enum.
|
|
1314
|
-
* @name org.dash.platform.dapi.v0.
|
|
1386
|
+
* @name org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status
|
|
1315
1387
|
* @enum {number}
|
|
1316
1388
|
* @property {number} NOT_STARTED=0 NOT_STARTED value
|
|
1317
1389
|
* @property {number} SYNCING=1 SYNCING value
|
|
1318
1390
|
* @property {number} READY=2 READY value
|
|
1319
1391
|
* @property {number} ERROR=3 ERROR value
|
|
1320
1392
|
*/
|
|
1321
|
-
|
|
1393
|
+
GetBlockchainStatusResponse.Status = (function() {
|
|
1322
1394
|
var valuesById = {}, values = Object.create(valuesById);
|
|
1323
1395
|
values[valuesById[0] = "NOT_STARTED"] = 0;
|
|
1324
1396
|
values[valuesById[1] = "SYNCING"] = 1;
|
|
@@ -1327,11 +1399,11 @@ $root.org = (function() {
|
|
|
1327
1399
|
return values;
|
|
1328
1400
|
})();
|
|
1329
1401
|
|
|
1330
|
-
|
|
1402
|
+
GetBlockchainStatusResponse.Chain = (function() {
|
|
1331
1403
|
|
|
1332
1404
|
/**
|
|
1333
1405
|
* Properties of a Chain.
|
|
1334
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1406
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
1335
1407
|
* @interface IChain
|
|
1336
1408
|
* @property {string|null} [name] Chain name
|
|
1337
1409
|
* @property {number|null} [headersCount] Chain headersCount
|
|
@@ -1345,11 +1417,11 @@ $root.org = (function() {
|
|
|
1345
1417
|
|
|
1346
1418
|
/**
|
|
1347
1419
|
* Constructs a new Chain.
|
|
1348
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1420
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
1349
1421
|
* @classdesc Represents a Chain.
|
|
1350
1422
|
* @implements IChain
|
|
1351
1423
|
* @constructor
|
|
1352
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1424
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IChain=} [properties] Properties to set
|
|
1353
1425
|
*/
|
|
1354
1426
|
function Chain(properties) {
|
|
1355
1427
|
if (properties)
|
|
@@ -1361,7 +1433,7 @@ $root.org = (function() {
|
|
|
1361
1433
|
/**
|
|
1362
1434
|
* Chain name.
|
|
1363
1435
|
* @member {string} name
|
|
1364
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1436
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1365
1437
|
* @instance
|
|
1366
1438
|
*/
|
|
1367
1439
|
Chain.prototype.name = "";
|
|
@@ -1369,7 +1441,7 @@ $root.org = (function() {
|
|
|
1369
1441
|
/**
|
|
1370
1442
|
* Chain headersCount.
|
|
1371
1443
|
* @member {number} headersCount
|
|
1372
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1444
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1373
1445
|
* @instance
|
|
1374
1446
|
*/
|
|
1375
1447
|
Chain.prototype.headersCount = 0;
|
|
@@ -1377,7 +1449,7 @@ $root.org = (function() {
|
|
|
1377
1449
|
/**
|
|
1378
1450
|
* Chain blocksCount.
|
|
1379
1451
|
* @member {number} blocksCount
|
|
1380
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1452
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1381
1453
|
* @instance
|
|
1382
1454
|
*/
|
|
1383
1455
|
Chain.prototype.blocksCount = 0;
|
|
@@ -1385,7 +1457,7 @@ $root.org = (function() {
|
|
|
1385
1457
|
/**
|
|
1386
1458
|
* Chain bestBlockHash.
|
|
1387
1459
|
* @member {Uint8Array} bestBlockHash
|
|
1388
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1460
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1389
1461
|
* @instance
|
|
1390
1462
|
*/
|
|
1391
1463
|
Chain.prototype.bestBlockHash = $util.newBuffer([]);
|
|
@@ -1393,7 +1465,7 @@ $root.org = (function() {
|
|
|
1393
1465
|
/**
|
|
1394
1466
|
* Chain difficulty.
|
|
1395
1467
|
* @member {number} difficulty
|
|
1396
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1468
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1397
1469
|
* @instance
|
|
1398
1470
|
*/
|
|
1399
1471
|
Chain.prototype.difficulty = 0;
|
|
@@ -1401,7 +1473,7 @@ $root.org = (function() {
|
|
|
1401
1473
|
/**
|
|
1402
1474
|
* Chain chainWork.
|
|
1403
1475
|
* @member {Uint8Array} chainWork
|
|
1404
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1476
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1405
1477
|
* @instance
|
|
1406
1478
|
*/
|
|
1407
1479
|
Chain.prototype.chainWork = $util.newBuffer([]);
|
|
@@ -1409,7 +1481,7 @@ $root.org = (function() {
|
|
|
1409
1481
|
/**
|
|
1410
1482
|
* Chain isSynced.
|
|
1411
1483
|
* @member {boolean} isSynced
|
|
1412
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1484
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1413
1485
|
* @instance
|
|
1414
1486
|
*/
|
|
1415
1487
|
Chain.prototype.isSynced = false;
|
|
@@ -1417,7 +1489,7 @@ $root.org = (function() {
|
|
|
1417
1489
|
/**
|
|
1418
1490
|
* Chain syncProgress.
|
|
1419
1491
|
* @member {number} syncProgress
|
|
1420
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1492
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1421
1493
|
* @instance
|
|
1422
1494
|
*/
|
|
1423
1495
|
Chain.prototype.syncProgress = 0;
|
|
@@ -1425,21 +1497,21 @@ $root.org = (function() {
|
|
|
1425
1497
|
/**
|
|
1426
1498
|
* Creates a new Chain instance using the specified properties.
|
|
1427
1499
|
* @function create
|
|
1428
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1500
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1429
1501
|
* @static
|
|
1430
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1431
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1502
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IChain=} [properties] Properties to set
|
|
1503
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain} Chain instance
|
|
1432
1504
|
*/
|
|
1433
1505
|
Chain.create = function create(properties) {
|
|
1434
1506
|
return new Chain(properties);
|
|
1435
1507
|
};
|
|
1436
1508
|
|
|
1437
1509
|
/**
|
|
1438
|
-
* Encodes the specified Chain message. Does not implicitly {@link org.dash.platform.dapi.v0.
|
|
1510
|
+
* Encodes the specified Chain message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain.verify|verify} messages.
|
|
1439
1511
|
* @function encode
|
|
1440
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1512
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1441
1513
|
* @static
|
|
1442
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1514
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IChain} message Chain message or plain object to encode
|
|
1443
1515
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1444
1516
|
* @returns {$protobuf.Writer} Writer
|
|
1445
1517
|
*/
|
|
@@ -1466,11 +1538,11 @@ $root.org = (function() {
|
|
|
1466
1538
|
};
|
|
1467
1539
|
|
|
1468
1540
|
/**
|
|
1469
|
-
* Encodes the specified Chain message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.
|
|
1541
|
+
* Encodes the specified Chain message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain.verify|verify} messages.
|
|
1470
1542
|
* @function encodeDelimited
|
|
1471
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1543
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1472
1544
|
* @static
|
|
1473
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1545
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.IChain} message Chain message or plain object to encode
|
|
1474
1546
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1475
1547
|
* @returns {$protobuf.Writer} Writer
|
|
1476
1548
|
*/
|
|
@@ -1481,18 +1553,18 @@ $root.org = (function() {
|
|
|
1481
1553
|
/**
|
|
1482
1554
|
* Decodes a Chain message from the specified reader or buffer.
|
|
1483
1555
|
* @function decode
|
|
1484
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1556
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1485
1557
|
* @static
|
|
1486
1558
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1487
1559
|
* @param {number} [length] Message length if known beforehand
|
|
1488
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1560
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain} Chain
|
|
1489
1561
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1490
1562
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1491
1563
|
*/
|
|
1492
1564
|
Chain.decode = function decode(reader, length) {
|
|
1493
1565
|
if (!(reader instanceof $Reader))
|
|
1494
1566
|
reader = $Reader.create(reader);
|
|
1495
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
1567
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain();
|
|
1496
1568
|
while (reader.pos < end) {
|
|
1497
1569
|
var tag = reader.uint32();
|
|
1498
1570
|
switch (tag >>> 3) {
|
|
@@ -1531,10 +1603,10 @@ $root.org = (function() {
|
|
|
1531
1603
|
/**
|
|
1532
1604
|
* Decodes a Chain message from the specified reader or buffer, length delimited.
|
|
1533
1605
|
* @function decodeDelimited
|
|
1534
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1606
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1535
1607
|
* @static
|
|
1536
1608
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1537
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1609
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain} Chain
|
|
1538
1610
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1539
1611
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1540
1612
|
*/
|
|
@@ -1547,7 +1619,7 @@ $root.org = (function() {
|
|
|
1547
1619
|
/**
|
|
1548
1620
|
* Verifies a Chain message.
|
|
1549
1621
|
* @function verify
|
|
1550
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1622
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1551
1623
|
* @static
|
|
1552
1624
|
* @param {Object.<string,*>} message Plain object to verify
|
|
1553
1625
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
@@ -1585,15 +1657,15 @@ $root.org = (function() {
|
|
|
1585
1657
|
/**
|
|
1586
1658
|
* Creates a Chain message from a plain object. Also converts values to their respective internal types.
|
|
1587
1659
|
* @function fromObject
|
|
1588
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1660
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1589
1661
|
* @static
|
|
1590
1662
|
* @param {Object.<string,*>} object Plain object
|
|
1591
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1663
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain} Chain
|
|
1592
1664
|
*/
|
|
1593
1665
|
Chain.fromObject = function fromObject(object) {
|
|
1594
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
1666
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain)
|
|
1595
1667
|
return object;
|
|
1596
|
-
var message = new $root.org.dash.platform.dapi.v0.
|
|
1668
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain();
|
|
1597
1669
|
if (object.name != null)
|
|
1598
1670
|
message.name = String(object.name);
|
|
1599
1671
|
if (object.headersCount != null)
|
|
@@ -1622,9 +1694,9 @@ $root.org = (function() {
|
|
|
1622
1694
|
/**
|
|
1623
1695
|
* Creates a plain object from a Chain message. Also converts values to other types if specified.
|
|
1624
1696
|
* @function toObject
|
|
1625
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1697
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1626
1698
|
* @static
|
|
1627
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1699
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain} message Chain
|
|
1628
1700
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1629
1701
|
* @returns {Object.<string,*>} Plain object
|
|
1630
1702
|
*/
|
|
@@ -1676,7 +1748,7 @@ $root.org = (function() {
|
|
|
1676
1748
|
/**
|
|
1677
1749
|
* Converts this Chain to JSON.
|
|
1678
1750
|
* @function toJSON
|
|
1679
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1751
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain
|
|
1680
1752
|
* @instance
|
|
1681
1753
|
* @returns {Object.<string,*>} JSON object
|
|
1682
1754
|
*/
|
|
@@ -1687,28 +1759,25 @@ $root.org = (function() {
|
|
|
1687
1759
|
return Chain;
|
|
1688
1760
|
})();
|
|
1689
1761
|
|
|
1690
|
-
|
|
1762
|
+
GetBlockchainStatusResponse.NetworkFee = (function() {
|
|
1691
1763
|
|
|
1692
1764
|
/**
|
|
1693
|
-
* Properties of a
|
|
1694
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1695
|
-
* @interface
|
|
1696
|
-
* @property {
|
|
1697
|
-
* @property {
|
|
1698
|
-
* @property {number|null} [posePenalty] Masternode posePenalty
|
|
1699
|
-
* @property {boolean|null} [isSynced] Masternode isSynced
|
|
1700
|
-
* @property {number|null} [syncProgress] Masternode syncProgress
|
|
1765
|
+
* Properties of a NetworkFee.
|
|
1766
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
1767
|
+
* @interface INetworkFee
|
|
1768
|
+
* @property {number|null} [relay] NetworkFee relay
|
|
1769
|
+
* @property {number|null} [incremental] NetworkFee incremental
|
|
1701
1770
|
*/
|
|
1702
1771
|
|
|
1703
1772
|
/**
|
|
1704
|
-
* Constructs a new
|
|
1705
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1706
|
-
* @classdesc Represents a
|
|
1707
|
-
* @implements
|
|
1773
|
+
* Constructs a new NetworkFee.
|
|
1774
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
1775
|
+
* @classdesc Represents a NetworkFee.
|
|
1776
|
+
* @implements INetworkFee
|
|
1708
1777
|
* @constructor
|
|
1709
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1778
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetworkFee=} [properties] Properties to set
|
|
1710
1779
|
*/
|
|
1711
|
-
function
|
|
1780
|
+
function NetworkFee(properties) {
|
|
1712
1781
|
if (properties)
|
|
1713
1782
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1714
1783
|
if (properties[keys[i]] != null)
|
|
@@ -1716,127 +1785,88 @@ $root.org = (function() {
|
|
|
1716
1785
|
}
|
|
1717
1786
|
|
|
1718
1787
|
/**
|
|
1719
|
-
*
|
|
1720
|
-
* @member {
|
|
1721
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1722
|
-
* @instance
|
|
1723
|
-
*/
|
|
1724
|
-
Masternode.prototype.status = 0;
|
|
1725
|
-
|
|
1726
|
-
/**
|
|
1727
|
-
* Masternode proTxHash.
|
|
1728
|
-
* @member {Uint8Array} proTxHash
|
|
1729
|
-
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.Masternode
|
|
1730
|
-
* @instance
|
|
1731
|
-
*/
|
|
1732
|
-
Masternode.prototype.proTxHash = $util.newBuffer([]);
|
|
1733
|
-
|
|
1734
|
-
/**
|
|
1735
|
-
* Masternode posePenalty.
|
|
1736
|
-
* @member {number} posePenalty
|
|
1737
|
-
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.Masternode
|
|
1738
|
-
* @instance
|
|
1739
|
-
*/
|
|
1740
|
-
Masternode.prototype.posePenalty = 0;
|
|
1741
|
-
|
|
1742
|
-
/**
|
|
1743
|
-
* Masternode isSynced.
|
|
1744
|
-
* @member {boolean} isSynced
|
|
1745
|
-
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.Masternode
|
|
1788
|
+
* NetworkFee relay.
|
|
1789
|
+
* @member {number} relay
|
|
1790
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1746
1791
|
* @instance
|
|
1747
1792
|
*/
|
|
1748
|
-
|
|
1793
|
+
NetworkFee.prototype.relay = 0;
|
|
1749
1794
|
|
|
1750
1795
|
/**
|
|
1751
|
-
*
|
|
1752
|
-
* @member {number}
|
|
1753
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1796
|
+
* NetworkFee incremental.
|
|
1797
|
+
* @member {number} incremental
|
|
1798
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1754
1799
|
* @instance
|
|
1755
1800
|
*/
|
|
1756
|
-
|
|
1801
|
+
NetworkFee.prototype.incremental = 0;
|
|
1757
1802
|
|
|
1758
1803
|
/**
|
|
1759
|
-
* Creates a new
|
|
1804
|
+
* Creates a new NetworkFee instance using the specified properties.
|
|
1760
1805
|
* @function create
|
|
1761
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1806
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1762
1807
|
* @static
|
|
1763
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1764
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1808
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetworkFee=} [properties] Properties to set
|
|
1809
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee} NetworkFee instance
|
|
1765
1810
|
*/
|
|
1766
|
-
|
|
1767
|
-
return new
|
|
1811
|
+
NetworkFee.create = function create(properties) {
|
|
1812
|
+
return new NetworkFee(properties);
|
|
1768
1813
|
};
|
|
1769
1814
|
|
|
1770
1815
|
/**
|
|
1771
|
-
* Encodes the specified
|
|
1816
|
+
* Encodes the specified NetworkFee message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee.verify|verify} messages.
|
|
1772
1817
|
* @function encode
|
|
1773
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1818
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1774
1819
|
* @static
|
|
1775
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1820
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetworkFee} message NetworkFee message or plain object to encode
|
|
1776
1821
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1777
1822
|
* @returns {$protobuf.Writer} Writer
|
|
1778
1823
|
*/
|
|
1779
|
-
|
|
1824
|
+
NetworkFee.encode = function encode(message, writer) {
|
|
1780
1825
|
if (!writer)
|
|
1781
1826
|
writer = $Writer.create();
|
|
1782
|
-
if (message.
|
|
1783
|
-
writer.uint32(/* id 1, wireType
|
|
1784
|
-
if (message.
|
|
1785
|
-
writer.uint32(/* id 2, wireType
|
|
1786
|
-
if (message.posePenalty != null && Object.hasOwnProperty.call(message, "posePenalty"))
|
|
1787
|
-
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.posePenalty);
|
|
1788
|
-
if (message.isSynced != null && Object.hasOwnProperty.call(message, "isSynced"))
|
|
1789
|
-
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isSynced);
|
|
1790
|
-
if (message.syncProgress != null && Object.hasOwnProperty.call(message, "syncProgress"))
|
|
1791
|
-
writer.uint32(/* id 5, wireType 1 =*/41).double(message.syncProgress);
|
|
1827
|
+
if (message.relay != null && Object.hasOwnProperty.call(message, "relay"))
|
|
1828
|
+
writer.uint32(/* id 1, wireType 1 =*/9).double(message.relay);
|
|
1829
|
+
if (message.incremental != null && Object.hasOwnProperty.call(message, "incremental"))
|
|
1830
|
+
writer.uint32(/* id 2, wireType 1 =*/17).double(message.incremental);
|
|
1792
1831
|
return writer;
|
|
1793
1832
|
};
|
|
1794
1833
|
|
|
1795
1834
|
/**
|
|
1796
|
-
* Encodes the specified
|
|
1835
|
+
* Encodes the specified NetworkFee message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee.verify|verify} messages.
|
|
1797
1836
|
* @function encodeDelimited
|
|
1798
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1837
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1799
1838
|
* @static
|
|
1800
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1839
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetworkFee} message NetworkFee message or plain object to encode
|
|
1801
1840
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1802
1841
|
* @returns {$protobuf.Writer} Writer
|
|
1803
1842
|
*/
|
|
1804
|
-
|
|
1843
|
+
NetworkFee.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1805
1844
|
return this.encode(message, writer).ldelim();
|
|
1806
1845
|
};
|
|
1807
1846
|
|
|
1808
1847
|
/**
|
|
1809
|
-
* Decodes a
|
|
1848
|
+
* Decodes a NetworkFee message from the specified reader or buffer.
|
|
1810
1849
|
* @function decode
|
|
1811
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1850
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1812
1851
|
* @static
|
|
1813
1852
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1814
1853
|
* @param {number} [length] Message length if known beforehand
|
|
1815
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1854
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee} NetworkFee
|
|
1816
1855
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1817
1856
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1818
1857
|
*/
|
|
1819
|
-
|
|
1858
|
+
NetworkFee.decode = function decode(reader, length) {
|
|
1820
1859
|
if (!(reader instanceof $Reader))
|
|
1821
1860
|
reader = $Reader.create(reader);
|
|
1822
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
1861
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee();
|
|
1823
1862
|
while (reader.pos < end) {
|
|
1824
1863
|
var tag = reader.uint32();
|
|
1825
1864
|
switch (tag >>> 3) {
|
|
1826
1865
|
case 1:
|
|
1827
|
-
message.
|
|
1866
|
+
message.relay = reader.double();
|
|
1828
1867
|
break;
|
|
1829
1868
|
case 2:
|
|
1830
|
-
message.
|
|
1831
|
-
break;
|
|
1832
|
-
case 3:
|
|
1833
|
-
message.posePenalty = reader.uint32();
|
|
1834
|
-
break;
|
|
1835
|
-
case 4:
|
|
1836
|
-
message.isSynced = reader.bool();
|
|
1837
|
-
break;
|
|
1838
|
-
case 5:
|
|
1839
|
-
message.syncProgress = reader.double();
|
|
1869
|
+
message.incremental = reader.double();
|
|
1840
1870
|
break;
|
|
1841
1871
|
default:
|
|
1842
1872
|
reader.skipType(tag & 7);
|
|
@@ -1847,219 +1877,117 @@ $root.org = (function() {
|
|
|
1847
1877
|
};
|
|
1848
1878
|
|
|
1849
1879
|
/**
|
|
1850
|
-
* Decodes a
|
|
1880
|
+
* Decodes a NetworkFee message from the specified reader or buffer, length delimited.
|
|
1851
1881
|
* @function decodeDelimited
|
|
1852
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1882
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1853
1883
|
* @static
|
|
1854
1884
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1855
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1885
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee} NetworkFee
|
|
1856
1886
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1857
1887
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1858
1888
|
*/
|
|
1859
|
-
|
|
1889
|
+
NetworkFee.decodeDelimited = function decodeDelimited(reader) {
|
|
1860
1890
|
if (!(reader instanceof $Reader))
|
|
1861
1891
|
reader = new $Reader(reader);
|
|
1862
1892
|
return this.decode(reader, reader.uint32());
|
|
1863
1893
|
};
|
|
1864
1894
|
|
|
1865
1895
|
/**
|
|
1866
|
-
* Verifies a
|
|
1896
|
+
* Verifies a NetworkFee message.
|
|
1867
1897
|
* @function verify
|
|
1868
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1898
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1869
1899
|
* @static
|
|
1870
1900
|
* @param {Object.<string,*>} message Plain object to verify
|
|
1871
1901
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
1872
1902
|
*/
|
|
1873
|
-
|
|
1903
|
+
NetworkFee.verify = function verify(message) {
|
|
1874
1904
|
if (typeof message !== "object" || message === null)
|
|
1875
1905
|
return "object expected";
|
|
1876
|
-
if (message.
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
case 2:
|
|
1883
|
-
case 3:
|
|
1884
|
-
case 4:
|
|
1885
|
-
case 5:
|
|
1886
|
-
case 6:
|
|
1887
|
-
case 7:
|
|
1888
|
-
break;
|
|
1889
|
-
}
|
|
1890
|
-
if (message.proTxHash != null && message.hasOwnProperty("proTxHash"))
|
|
1891
|
-
if (!(message.proTxHash && typeof message.proTxHash.length === "number" || $util.isString(message.proTxHash)))
|
|
1892
|
-
return "proTxHash: buffer expected";
|
|
1893
|
-
if (message.posePenalty != null && message.hasOwnProperty("posePenalty"))
|
|
1894
|
-
if (!$util.isInteger(message.posePenalty))
|
|
1895
|
-
return "posePenalty: integer expected";
|
|
1896
|
-
if (message.isSynced != null && message.hasOwnProperty("isSynced"))
|
|
1897
|
-
if (typeof message.isSynced !== "boolean")
|
|
1898
|
-
return "isSynced: boolean expected";
|
|
1899
|
-
if (message.syncProgress != null && message.hasOwnProperty("syncProgress"))
|
|
1900
|
-
if (typeof message.syncProgress !== "number")
|
|
1901
|
-
return "syncProgress: number expected";
|
|
1906
|
+
if (message.relay != null && message.hasOwnProperty("relay"))
|
|
1907
|
+
if (typeof message.relay !== "number")
|
|
1908
|
+
return "relay: number expected";
|
|
1909
|
+
if (message.incremental != null && message.hasOwnProperty("incremental"))
|
|
1910
|
+
if (typeof message.incremental !== "number")
|
|
1911
|
+
return "incremental: number expected";
|
|
1902
1912
|
return null;
|
|
1903
1913
|
};
|
|
1904
1914
|
|
|
1905
1915
|
/**
|
|
1906
|
-
* Creates a
|
|
1916
|
+
* Creates a NetworkFee message from a plain object. Also converts values to their respective internal types.
|
|
1907
1917
|
* @function fromObject
|
|
1908
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1918
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1909
1919
|
* @static
|
|
1910
1920
|
* @param {Object.<string,*>} object Plain object
|
|
1911
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
1921
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee} NetworkFee
|
|
1912
1922
|
*/
|
|
1913
|
-
|
|
1914
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
1923
|
+
NetworkFee.fromObject = function fromObject(object) {
|
|
1924
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee)
|
|
1915
1925
|
return object;
|
|
1916
|
-
var message = new $root.org.dash.platform.dapi.v0.
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
message.
|
|
1921
|
-
break;
|
|
1922
|
-
case "WAITING_FOR_PROTX":
|
|
1923
|
-
case 1:
|
|
1924
|
-
message.status = 1;
|
|
1925
|
-
break;
|
|
1926
|
-
case "POSE_BANNED":
|
|
1927
|
-
case 2:
|
|
1928
|
-
message.status = 2;
|
|
1929
|
-
break;
|
|
1930
|
-
case "REMOVED":
|
|
1931
|
-
case 3:
|
|
1932
|
-
message.status = 3;
|
|
1933
|
-
break;
|
|
1934
|
-
case "OPERATOR_KEY_CHANGED":
|
|
1935
|
-
case 4:
|
|
1936
|
-
message.status = 4;
|
|
1937
|
-
break;
|
|
1938
|
-
case "PROTX_IP_CHANGED":
|
|
1939
|
-
case 5:
|
|
1940
|
-
message.status = 5;
|
|
1941
|
-
break;
|
|
1942
|
-
case "READY":
|
|
1943
|
-
case 6:
|
|
1944
|
-
message.status = 6;
|
|
1945
|
-
break;
|
|
1946
|
-
case "ERROR":
|
|
1947
|
-
case 7:
|
|
1948
|
-
message.status = 7;
|
|
1949
|
-
break;
|
|
1950
|
-
}
|
|
1951
|
-
if (object.proTxHash != null)
|
|
1952
|
-
if (typeof object.proTxHash === "string")
|
|
1953
|
-
$util.base64.decode(object.proTxHash, message.proTxHash = $util.newBuffer($util.base64.length(object.proTxHash)), 0);
|
|
1954
|
-
else if (object.proTxHash.length >= 0)
|
|
1955
|
-
message.proTxHash = object.proTxHash;
|
|
1956
|
-
if (object.posePenalty != null)
|
|
1957
|
-
message.posePenalty = object.posePenalty >>> 0;
|
|
1958
|
-
if (object.isSynced != null)
|
|
1959
|
-
message.isSynced = Boolean(object.isSynced);
|
|
1960
|
-
if (object.syncProgress != null)
|
|
1961
|
-
message.syncProgress = Number(object.syncProgress);
|
|
1926
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee();
|
|
1927
|
+
if (object.relay != null)
|
|
1928
|
+
message.relay = Number(object.relay);
|
|
1929
|
+
if (object.incremental != null)
|
|
1930
|
+
message.incremental = Number(object.incremental);
|
|
1962
1931
|
return message;
|
|
1963
1932
|
};
|
|
1964
1933
|
|
|
1965
1934
|
/**
|
|
1966
|
-
* Creates a plain object from a
|
|
1935
|
+
* Creates a plain object from a NetworkFee message. Also converts values to other types if specified.
|
|
1967
1936
|
* @function toObject
|
|
1968
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1937
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
1969
1938
|
* @static
|
|
1970
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1939
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee} message NetworkFee
|
|
1971
1940
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1972
1941
|
* @returns {Object.<string,*>} Plain object
|
|
1973
1942
|
*/
|
|
1974
|
-
|
|
1943
|
+
NetworkFee.toObject = function toObject(message, options) {
|
|
1975
1944
|
if (!options)
|
|
1976
1945
|
options = {};
|
|
1977
1946
|
var object = {};
|
|
1978
1947
|
if (options.defaults) {
|
|
1979
|
-
object.
|
|
1980
|
-
|
|
1981
|
-
object.proTxHash = "";
|
|
1982
|
-
else {
|
|
1983
|
-
object.proTxHash = [];
|
|
1984
|
-
if (options.bytes !== Array)
|
|
1985
|
-
object.proTxHash = $util.newBuffer(object.proTxHash);
|
|
1986
|
-
}
|
|
1987
|
-
object.posePenalty = 0;
|
|
1988
|
-
object.isSynced = false;
|
|
1989
|
-
object.syncProgress = 0;
|
|
1948
|
+
object.relay = 0;
|
|
1949
|
+
object.incremental = 0;
|
|
1990
1950
|
}
|
|
1991
|
-
if (message.
|
|
1992
|
-
object.
|
|
1993
|
-
if (message.
|
|
1994
|
-
object.
|
|
1995
|
-
if (message.posePenalty != null && message.hasOwnProperty("posePenalty"))
|
|
1996
|
-
object.posePenalty = message.posePenalty;
|
|
1997
|
-
if (message.isSynced != null && message.hasOwnProperty("isSynced"))
|
|
1998
|
-
object.isSynced = message.isSynced;
|
|
1999
|
-
if (message.syncProgress != null && message.hasOwnProperty("syncProgress"))
|
|
2000
|
-
object.syncProgress = options.json && !isFinite(message.syncProgress) ? String(message.syncProgress) : message.syncProgress;
|
|
1951
|
+
if (message.relay != null && message.hasOwnProperty("relay"))
|
|
1952
|
+
object.relay = options.json && !isFinite(message.relay) ? String(message.relay) : message.relay;
|
|
1953
|
+
if (message.incremental != null && message.hasOwnProperty("incremental"))
|
|
1954
|
+
object.incremental = options.json && !isFinite(message.incremental) ? String(message.incremental) : message.incremental;
|
|
2001
1955
|
return object;
|
|
2002
1956
|
};
|
|
2003
1957
|
|
|
2004
1958
|
/**
|
|
2005
|
-
* Converts this
|
|
1959
|
+
* Converts this NetworkFee to JSON.
|
|
2006
1960
|
* @function toJSON
|
|
2007
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1961
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee
|
|
2008
1962
|
* @instance
|
|
2009
1963
|
* @returns {Object.<string,*>} JSON object
|
|
2010
1964
|
*/
|
|
2011
|
-
|
|
1965
|
+
NetworkFee.prototype.toJSON = function toJSON() {
|
|
2012
1966
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2013
1967
|
};
|
|
2014
1968
|
|
|
2015
|
-
|
|
2016
|
-
* Status enum.
|
|
2017
|
-
* @name org.dash.platform.dapi.v0.GetStatusResponse.Masternode.Status
|
|
2018
|
-
* @enum {number}
|
|
2019
|
-
* @property {number} UNKNOWN=0 UNKNOWN value
|
|
2020
|
-
* @property {number} WAITING_FOR_PROTX=1 WAITING_FOR_PROTX value
|
|
2021
|
-
* @property {number} POSE_BANNED=2 POSE_BANNED value
|
|
2022
|
-
* @property {number} REMOVED=3 REMOVED value
|
|
2023
|
-
* @property {number} OPERATOR_KEY_CHANGED=4 OPERATOR_KEY_CHANGED value
|
|
2024
|
-
* @property {number} PROTX_IP_CHANGED=5 PROTX_IP_CHANGED value
|
|
2025
|
-
* @property {number} READY=6 READY value
|
|
2026
|
-
* @property {number} ERROR=7 ERROR value
|
|
2027
|
-
*/
|
|
2028
|
-
Masternode.Status = (function() {
|
|
2029
|
-
var valuesById = {}, values = Object.create(valuesById);
|
|
2030
|
-
values[valuesById[0] = "UNKNOWN"] = 0;
|
|
2031
|
-
values[valuesById[1] = "WAITING_FOR_PROTX"] = 1;
|
|
2032
|
-
values[valuesById[2] = "POSE_BANNED"] = 2;
|
|
2033
|
-
values[valuesById[3] = "REMOVED"] = 3;
|
|
2034
|
-
values[valuesById[4] = "OPERATOR_KEY_CHANGED"] = 4;
|
|
2035
|
-
values[valuesById[5] = "PROTX_IP_CHANGED"] = 5;
|
|
2036
|
-
values[valuesById[6] = "READY"] = 6;
|
|
2037
|
-
values[valuesById[7] = "ERROR"] = 7;
|
|
2038
|
-
return values;
|
|
2039
|
-
})();
|
|
2040
|
-
|
|
2041
|
-
return Masternode;
|
|
1969
|
+
return NetworkFee;
|
|
2042
1970
|
})();
|
|
2043
1971
|
|
|
2044
|
-
|
|
1972
|
+
GetBlockchainStatusResponse.Network = (function() {
|
|
2045
1973
|
|
|
2046
1974
|
/**
|
|
2047
|
-
* Properties of a
|
|
2048
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2049
|
-
* @interface
|
|
2050
|
-
* @property {number|null} [
|
|
2051
|
-
* @property {
|
|
1975
|
+
* Properties of a Network.
|
|
1976
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
1977
|
+
* @interface INetwork
|
|
1978
|
+
* @property {number|null} [peersCount] Network peersCount
|
|
1979
|
+
* @property {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetworkFee|null} [fee] Network fee
|
|
2052
1980
|
*/
|
|
2053
1981
|
|
|
2054
1982
|
/**
|
|
2055
|
-
* Constructs a new
|
|
2056
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2057
|
-
* @classdesc Represents a
|
|
2058
|
-
* @implements
|
|
1983
|
+
* Constructs a new Network.
|
|
1984
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse
|
|
1985
|
+
* @classdesc Represents a Network.
|
|
1986
|
+
* @implements INetwork
|
|
2059
1987
|
* @constructor
|
|
2060
|
-
* @param {org.dash.platform.dapi.v0.
|
|
1988
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetwork=} [properties] Properties to set
|
|
2061
1989
|
*/
|
|
2062
|
-
function
|
|
1990
|
+
function Network(properties) {
|
|
2063
1991
|
if (properties)
|
|
2064
1992
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2065
1993
|
if (properties[keys[i]] != null)
|
|
@@ -2067,88 +1995,88 @@ $root.org = (function() {
|
|
|
2067
1995
|
}
|
|
2068
1996
|
|
|
2069
1997
|
/**
|
|
2070
|
-
*
|
|
2071
|
-
* @member {number}
|
|
2072
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
1998
|
+
* Network peersCount.
|
|
1999
|
+
* @member {number} peersCount
|
|
2000
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2073
2001
|
* @instance
|
|
2074
2002
|
*/
|
|
2075
|
-
|
|
2003
|
+
Network.prototype.peersCount = 0;
|
|
2076
2004
|
|
|
2077
2005
|
/**
|
|
2078
|
-
*
|
|
2079
|
-
* @member {
|
|
2080
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2006
|
+
* Network fee.
|
|
2007
|
+
* @member {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetworkFee|null|undefined} fee
|
|
2008
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2081
2009
|
* @instance
|
|
2082
2010
|
*/
|
|
2083
|
-
|
|
2011
|
+
Network.prototype.fee = null;
|
|
2084
2012
|
|
|
2085
2013
|
/**
|
|
2086
|
-
* Creates a new
|
|
2014
|
+
* Creates a new Network instance using the specified properties.
|
|
2087
2015
|
* @function create
|
|
2088
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2016
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2089
2017
|
* @static
|
|
2090
|
-
* @param {org.dash.platform.dapi.v0.
|
|
2091
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
2018
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetwork=} [properties] Properties to set
|
|
2019
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network} Network instance
|
|
2092
2020
|
*/
|
|
2093
|
-
|
|
2094
|
-
return new
|
|
2021
|
+
Network.create = function create(properties) {
|
|
2022
|
+
return new Network(properties);
|
|
2095
2023
|
};
|
|
2096
2024
|
|
|
2097
2025
|
/**
|
|
2098
|
-
* Encodes the specified
|
|
2026
|
+
* Encodes the specified Network message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network.verify|verify} messages.
|
|
2099
2027
|
* @function encode
|
|
2100
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2028
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2101
2029
|
* @static
|
|
2102
|
-
* @param {org.dash.platform.dapi.v0.
|
|
2030
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetwork} message Network message or plain object to encode
|
|
2103
2031
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2104
2032
|
* @returns {$protobuf.Writer} Writer
|
|
2105
2033
|
*/
|
|
2106
|
-
|
|
2034
|
+
Network.encode = function encode(message, writer) {
|
|
2107
2035
|
if (!writer)
|
|
2108
2036
|
writer = $Writer.create();
|
|
2109
|
-
if (message.
|
|
2110
|
-
writer.uint32(/* id 1, wireType
|
|
2111
|
-
if (message.
|
|
2112
|
-
writer.uint32(/* id 2, wireType
|
|
2037
|
+
if (message.peersCount != null && Object.hasOwnProperty.call(message, "peersCount"))
|
|
2038
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.peersCount);
|
|
2039
|
+
if (message.fee != null && Object.hasOwnProperty.call(message, "fee"))
|
|
2040
|
+
$root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee.encode(message.fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
2113
2041
|
return writer;
|
|
2114
2042
|
};
|
|
2115
2043
|
|
|
2116
2044
|
/**
|
|
2117
|
-
* Encodes the specified
|
|
2045
|
+
* Encodes the specified Network message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network.verify|verify} messages.
|
|
2118
2046
|
* @function encodeDelimited
|
|
2119
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2047
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2120
2048
|
* @static
|
|
2121
|
-
* @param {org.dash.platform.dapi.v0.
|
|
2049
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.INetwork} message Network message or plain object to encode
|
|
2122
2050
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2123
2051
|
* @returns {$protobuf.Writer} Writer
|
|
2124
2052
|
*/
|
|
2125
|
-
|
|
2053
|
+
Network.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2126
2054
|
return this.encode(message, writer).ldelim();
|
|
2127
2055
|
};
|
|
2128
2056
|
|
|
2129
2057
|
/**
|
|
2130
|
-
* Decodes a
|
|
2058
|
+
* Decodes a Network message from the specified reader or buffer.
|
|
2131
2059
|
* @function decode
|
|
2132
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2060
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2133
2061
|
* @static
|
|
2134
2062
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2135
2063
|
* @param {number} [length] Message length if known beforehand
|
|
2136
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
2064
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network} Network
|
|
2137
2065
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2138
2066
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2139
2067
|
*/
|
|
2140
|
-
|
|
2068
|
+
Network.decode = function decode(reader, length) {
|
|
2141
2069
|
if (!(reader instanceof $Reader))
|
|
2142
2070
|
reader = $Reader.create(reader);
|
|
2143
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
2071
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network();
|
|
2144
2072
|
while (reader.pos < end) {
|
|
2145
2073
|
var tag = reader.uint32();
|
|
2146
2074
|
switch (tag >>> 3) {
|
|
2147
2075
|
case 1:
|
|
2148
|
-
message.
|
|
2076
|
+
message.peersCount = reader.uint32();
|
|
2149
2077
|
break;
|
|
2150
2078
|
case 2:
|
|
2151
|
-
message.
|
|
2079
|
+
message.fee = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee.decode(reader, reader.uint32());
|
|
2152
2080
|
break;
|
|
2153
2081
|
default:
|
|
2154
2082
|
reader.skipType(tag & 7);
|
|
@@ -2159,335 +2087,1066 @@ $root.org = (function() {
|
|
|
2159
2087
|
};
|
|
2160
2088
|
|
|
2161
2089
|
/**
|
|
2162
|
-
* Decodes a
|
|
2090
|
+
* Decodes a Network message from the specified reader or buffer, length delimited.
|
|
2163
2091
|
* @function decodeDelimited
|
|
2164
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2092
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2165
2093
|
* @static
|
|
2166
2094
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2167
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
2095
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network} Network
|
|
2168
2096
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2169
2097
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2170
2098
|
*/
|
|
2171
|
-
|
|
2099
|
+
Network.decodeDelimited = function decodeDelimited(reader) {
|
|
2172
2100
|
if (!(reader instanceof $Reader))
|
|
2173
2101
|
reader = new $Reader(reader);
|
|
2174
2102
|
return this.decode(reader, reader.uint32());
|
|
2175
2103
|
};
|
|
2176
2104
|
|
|
2177
2105
|
/**
|
|
2178
|
-
* Verifies a
|
|
2106
|
+
* Verifies a Network message.
|
|
2179
2107
|
* @function verify
|
|
2180
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2108
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2181
2109
|
* @static
|
|
2182
2110
|
* @param {Object.<string,*>} message Plain object to verify
|
|
2183
2111
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2184
2112
|
*/
|
|
2185
|
-
|
|
2113
|
+
Network.verify = function verify(message) {
|
|
2186
2114
|
if (typeof message !== "object" || message === null)
|
|
2187
2115
|
return "object expected";
|
|
2188
|
-
if (message.
|
|
2189
|
-
if (
|
|
2190
|
-
return "
|
|
2191
|
-
if (message.
|
|
2192
|
-
|
|
2193
|
-
|
|
2116
|
+
if (message.peersCount != null && message.hasOwnProperty("peersCount"))
|
|
2117
|
+
if (!$util.isInteger(message.peersCount))
|
|
2118
|
+
return "peersCount: integer expected";
|
|
2119
|
+
if (message.fee != null && message.hasOwnProperty("fee")) {
|
|
2120
|
+
var error = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee.verify(message.fee);
|
|
2121
|
+
if (error)
|
|
2122
|
+
return "fee." + error;
|
|
2123
|
+
}
|
|
2194
2124
|
return null;
|
|
2195
2125
|
};
|
|
2196
2126
|
|
|
2197
2127
|
/**
|
|
2198
|
-
* Creates a
|
|
2128
|
+
* Creates a Network message from a plain object. Also converts values to their respective internal types.
|
|
2199
2129
|
* @function fromObject
|
|
2200
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2130
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2201
2131
|
* @static
|
|
2202
2132
|
* @param {Object.<string,*>} object Plain object
|
|
2203
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
2133
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network} Network
|
|
2204
2134
|
*/
|
|
2205
|
-
|
|
2206
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
2135
|
+
Network.fromObject = function fromObject(object) {
|
|
2136
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network)
|
|
2207
2137
|
return object;
|
|
2208
|
-
var message = new $root.org.dash.platform.dapi.v0.
|
|
2209
|
-
if (object.
|
|
2210
|
-
message.
|
|
2211
|
-
if (object.
|
|
2212
|
-
|
|
2138
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network();
|
|
2139
|
+
if (object.peersCount != null)
|
|
2140
|
+
message.peersCount = object.peersCount >>> 0;
|
|
2141
|
+
if (object.fee != null) {
|
|
2142
|
+
if (typeof object.fee !== "object")
|
|
2143
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network.fee: object expected");
|
|
2144
|
+
message.fee = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee.fromObject(object.fee);
|
|
2145
|
+
}
|
|
2213
2146
|
return message;
|
|
2214
2147
|
};
|
|
2215
2148
|
|
|
2216
2149
|
/**
|
|
2217
|
-
* Creates a plain object from a
|
|
2150
|
+
* Creates a plain object from a Network message. Also converts values to other types if specified.
|
|
2218
2151
|
* @function toObject
|
|
2219
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2152
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2220
2153
|
* @static
|
|
2221
|
-
* @param {org.dash.platform.dapi.v0.
|
|
2154
|
+
* @param {org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network} message Network
|
|
2222
2155
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2223
2156
|
* @returns {Object.<string,*>} Plain object
|
|
2224
2157
|
*/
|
|
2225
|
-
|
|
2158
|
+
Network.toObject = function toObject(message, options) {
|
|
2226
2159
|
if (!options)
|
|
2227
2160
|
options = {};
|
|
2228
2161
|
var object = {};
|
|
2229
2162
|
if (options.defaults) {
|
|
2230
|
-
object.
|
|
2231
|
-
object.
|
|
2163
|
+
object.peersCount = 0;
|
|
2164
|
+
object.fee = null;
|
|
2232
2165
|
}
|
|
2233
|
-
if (message.
|
|
2234
|
-
object.
|
|
2235
|
-
if (message.
|
|
2236
|
-
object.
|
|
2166
|
+
if (message.peersCount != null && message.hasOwnProperty("peersCount"))
|
|
2167
|
+
object.peersCount = message.peersCount;
|
|
2168
|
+
if (message.fee != null && message.hasOwnProperty("fee"))
|
|
2169
|
+
object.fee = $root.org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee.toObject(message.fee, options);
|
|
2237
2170
|
return object;
|
|
2238
2171
|
};
|
|
2239
2172
|
|
|
2240
2173
|
/**
|
|
2241
|
-
* Converts this
|
|
2174
|
+
* Converts this Network to JSON.
|
|
2242
2175
|
* @function toJSON
|
|
2243
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
2176
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network
|
|
2244
2177
|
* @instance
|
|
2245
2178
|
* @returns {Object.<string,*>} JSON object
|
|
2246
2179
|
*/
|
|
2247
|
-
|
|
2180
|
+
Network.prototype.toJSON = function toJSON() {
|
|
2248
2181
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2249
2182
|
};
|
|
2250
2183
|
|
|
2251
|
-
return
|
|
2184
|
+
return Network;
|
|
2252
2185
|
})();
|
|
2253
2186
|
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
/**
|
|
2257
|
-
* Properties of a Network.
|
|
2258
|
-
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
2259
|
-
* @interface INetwork
|
|
2260
|
-
* @property {number|null} [peersCount] Network peersCount
|
|
2261
|
-
* @property {org.dash.platform.dapi.v0.GetStatusResponse.INetworkFee|null} [fee] Network fee
|
|
2262
|
-
*/
|
|
2187
|
+
return GetBlockchainStatusResponse;
|
|
2188
|
+
})();
|
|
2263
2189
|
|
|
2264
|
-
|
|
2265
|
-
* Constructs a new Network.
|
|
2266
|
-
* @memberof org.dash.platform.dapi.v0.GetStatusResponse
|
|
2267
|
-
* @classdesc Represents a Network.
|
|
2268
|
-
* @implements INetwork
|
|
2269
|
-
* @constructor
|
|
2270
|
-
* @param {org.dash.platform.dapi.v0.GetStatusResponse.INetwork=} [properties] Properties to set
|
|
2271
|
-
*/
|
|
2272
|
-
function Network(properties) {
|
|
2273
|
-
if (properties)
|
|
2274
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2275
|
-
if (properties[keys[i]] != null)
|
|
2276
|
-
this[keys[i]] = properties[keys[i]];
|
|
2277
|
-
}
|
|
2190
|
+
v0.GetMasternodeStatusRequest = (function() {
|
|
2278
2191
|
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
*/
|
|
2285
|
-
Network.prototype.peersCount = 0;
|
|
2192
|
+
/**
|
|
2193
|
+
* Properties of a GetMasternodeStatusRequest.
|
|
2194
|
+
* @memberof org.dash.platform.dapi.v0
|
|
2195
|
+
* @interface IGetMasternodeStatusRequest
|
|
2196
|
+
*/
|
|
2286
2197
|
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2198
|
+
/**
|
|
2199
|
+
* Constructs a new GetMasternodeStatusRequest.
|
|
2200
|
+
* @memberof org.dash.platform.dapi.v0
|
|
2201
|
+
* @classdesc Represents a GetMasternodeStatusRequest.
|
|
2202
|
+
* @implements IGetMasternodeStatusRequest
|
|
2203
|
+
* @constructor
|
|
2204
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusRequest=} [properties] Properties to set
|
|
2205
|
+
*/
|
|
2206
|
+
function GetMasternodeStatusRequest(properties) {
|
|
2207
|
+
if (properties)
|
|
2208
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2209
|
+
if (properties[keys[i]] != null)
|
|
2210
|
+
this[keys[i]] = properties[keys[i]];
|
|
2211
|
+
}
|
|
2294
2212
|
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2213
|
+
/**
|
|
2214
|
+
* Creates a new GetMasternodeStatusRequest instance using the specified properties.
|
|
2215
|
+
* @function create
|
|
2216
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2217
|
+
* @static
|
|
2218
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusRequest=} [properties] Properties to set
|
|
2219
|
+
* @returns {org.dash.platform.dapi.v0.GetMasternodeStatusRequest} GetMasternodeStatusRequest instance
|
|
2220
|
+
*/
|
|
2221
|
+
GetMasternodeStatusRequest.create = function create(properties) {
|
|
2222
|
+
return new GetMasternodeStatusRequest(properties);
|
|
2223
|
+
};
|
|
2306
2224
|
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
if (message.fee != null && Object.hasOwnProperty.call(message, "fee"))
|
|
2322
|
-
$root.org.dash.platform.dapi.v0.GetStatusResponse.NetworkFee.encode(message.fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
2323
|
-
return writer;
|
|
2324
|
-
};
|
|
2225
|
+
/**
|
|
2226
|
+
* Encodes the specified GetMasternodeStatusRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetMasternodeStatusRequest.verify|verify} messages.
|
|
2227
|
+
* @function encode
|
|
2228
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2229
|
+
* @static
|
|
2230
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusRequest} message GetMasternodeStatusRequest message or plain object to encode
|
|
2231
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2232
|
+
* @returns {$protobuf.Writer} Writer
|
|
2233
|
+
*/
|
|
2234
|
+
GetMasternodeStatusRequest.encode = function encode(message, writer) {
|
|
2235
|
+
if (!writer)
|
|
2236
|
+
writer = $Writer.create();
|
|
2237
|
+
return writer;
|
|
2238
|
+
};
|
|
2325
2239
|
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2240
|
+
/**
|
|
2241
|
+
* Encodes the specified GetMasternodeStatusRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetMasternodeStatusRequest.verify|verify} messages.
|
|
2242
|
+
* @function encodeDelimited
|
|
2243
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2244
|
+
* @static
|
|
2245
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusRequest} message GetMasternodeStatusRequest message or plain object to encode
|
|
2246
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2247
|
+
* @returns {$protobuf.Writer} Writer
|
|
2248
|
+
*/
|
|
2249
|
+
GetMasternodeStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2250
|
+
return this.encode(message, writer).ldelim();
|
|
2251
|
+
};
|
|
2338
2252
|
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
case 2:
|
|
2361
|
-
message.fee = $root.org.dash.platform.dapi.v0.GetStatusResponse.NetworkFee.decode(reader, reader.uint32());
|
|
2362
|
-
break;
|
|
2363
|
-
default:
|
|
2364
|
-
reader.skipType(tag & 7);
|
|
2365
|
-
break;
|
|
2366
|
-
}
|
|
2253
|
+
/**
|
|
2254
|
+
* Decodes a GetMasternodeStatusRequest message from the specified reader or buffer.
|
|
2255
|
+
* @function decode
|
|
2256
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2257
|
+
* @static
|
|
2258
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2259
|
+
* @param {number} [length] Message length if known beforehand
|
|
2260
|
+
* @returns {org.dash.platform.dapi.v0.GetMasternodeStatusRequest} GetMasternodeStatusRequest
|
|
2261
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2262
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2263
|
+
*/
|
|
2264
|
+
GetMasternodeStatusRequest.decode = function decode(reader, length) {
|
|
2265
|
+
if (!(reader instanceof $Reader))
|
|
2266
|
+
reader = $Reader.create(reader);
|
|
2267
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetMasternodeStatusRequest();
|
|
2268
|
+
while (reader.pos < end) {
|
|
2269
|
+
var tag = reader.uint32();
|
|
2270
|
+
switch (tag >>> 3) {
|
|
2271
|
+
default:
|
|
2272
|
+
reader.skipType(tag & 7);
|
|
2273
|
+
break;
|
|
2367
2274
|
}
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
/**
|
|
2372
|
-
* Decodes a Network message from the specified reader or buffer, length delimited.
|
|
2373
|
-
* @function decodeDelimited
|
|
2374
|
-
* @memberof org.dash.platform.dapi.v0.GetStatusResponse.Network
|
|
2375
|
-
* @static
|
|
2376
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2377
|
-
* @returns {org.dash.platform.dapi.v0.GetStatusResponse.Network} Network
|
|
2378
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2379
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2380
|
-
*/
|
|
2381
|
-
Network.decodeDelimited = function decodeDelimited(reader) {
|
|
2382
|
-
if (!(reader instanceof $Reader))
|
|
2383
|
-
reader = new $Reader(reader);
|
|
2384
|
-
return this.decode(reader, reader.uint32());
|
|
2385
|
-
};
|
|
2275
|
+
}
|
|
2276
|
+
return message;
|
|
2277
|
+
};
|
|
2386
2278
|
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
var error = $root.org.dash.platform.dapi.v0.GetStatusResponse.NetworkFee.verify(message.fee);
|
|
2403
|
-
if (error)
|
|
2404
|
-
return "fee." + error;
|
|
2405
|
-
}
|
|
2406
|
-
return null;
|
|
2407
|
-
};
|
|
2279
|
+
/**
|
|
2280
|
+
* Decodes a GetMasternodeStatusRequest message from the specified reader or buffer, length delimited.
|
|
2281
|
+
* @function decodeDelimited
|
|
2282
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2283
|
+
* @static
|
|
2284
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2285
|
+
* @returns {org.dash.platform.dapi.v0.GetMasternodeStatusRequest} GetMasternodeStatusRequest
|
|
2286
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2287
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2288
|
+
*/
|
|
2289
|
+
GetMasternodeStatusRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
2290
|
+
if (!(reader instanceof $Reader))
|
|
2291
|
+
reader = new $Reader(reader);
|
|
2292
|
+
return this.decode(reader, reader.uint32());
|
|
2293
|
+
};
|
|
2408
2294
|
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
message.peersCount = object.peersCount >>> 0;
|
|
2423
|
-
if (object.fee != null) {
|
|
2424
|
-
if (typeof object.fee !== "object")
|
|
2425
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetStatusResponse.Network.fee: object expected");
|
|
2426
|
-
message.fee = $root.org.dash.platform.dapi.v0.GetStatusResponse.NetworkFee.fromObject(object.fee);
|
|
2427
|
-
}
|
|
2428
|
-
return message;
|
|
2429
|
-
};
|
|
2295
|
+
/**
|
|
2296
|
+
* Verifies a GetMasternodeStatusRequest message.
|
|
2297
|
+
* @function verify
|
|
2298
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2299
|
+
* @static
|
|
2300
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
2301
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2302
|
+
*/
|
|
2303
|
+
GetMasternodeStatusRequest.verify = function verify(message) {
|
|
2304
|
+
if (typeof message !== "object" || message === null)
|
|
2305
|
+
return "object expected";
|
|
2306
|
+
return null;
|
|
2307
|
+
};
|
|
2430
2308
|
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2309
|
+
/**
|
|
2310
|
+
* Creates a GetMasternodeStatusRequest message from a plain object. Also converts values to their respective internal types.
|
|
2311
|
+
* @function fromObject
|
|
2312
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2313
|
+
* @static
|
|
2314
|
+
* @param {Object.<string,*>} object Plain object
|
|
2315
|
+
* @returns {org.dash.platform.dapi.v0.GetMasternodeStatusRequest} GetMasternodeStatusRequest
|
|
2316
|
+
*/
|
|
2317
|
+
GetMasternodeStatusRequest.fromObject = function fromObject(object) {
|
|
2318
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetMasternodeStatusRequest)
|
|
2319
|
+
return object;
|
|
2320
|
+
return new $root.org.dash.platform.dapi.v0.GetMasternodeStatusRequest();
|
|
2321
|
+
};
|
|
2322
|
+
|
|
2323
|
+
/**
|
|
2324
|
+
* Creates a plain object from a GetMasternodeStatusRequest message. Also converts values to other types if specified.
|
|
2325
|
+
* @function toObject
|
|
2326
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2327
|
+
* @static
|
|
2328
|
+
* @param {org.dash.platform.dapi.v0.GetMasternodeStatusRequest} message GetMasternodeStatusRequest
|
|
2329
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2330
|
+
* @returns {Object.<string,*>} Plain object
|
|
2331
|
+
*/
|
|
2332
|
+
GetMasternodeStatusRequest.toObject = function toObject() {
|
|
2333
|
+
return {};
|
|
2334
|
+
};
|
|
2335
|
+
|
|
2336
|
+
/**
|
|
2337
|
+
* Converts this GetMasternodeStatusRequest to JSON.
|
|
2338
|
+
* @function toJSON
|
|
2339
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusRequest
|
|
2340
|
+
* @instance
|
|
2341
|
+
* @returns {Object.<string,*>} JSON object
|
|
2342
|
+
*/
|
|
2343
|
+
GetMasternodeStatusRequest.prototype.toJSON = function toJSON() {
|
|
2344
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2345
|
+
};
|
|
2346
|
+
|
|
2347
|
+
return GetMasternodeStatusRequest;
|
|
2348
|
+
})();
|
|
2349
|
+
|
|
2350
|
+
v0.GetMasternodeStatusResponse = (function() {
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* Properties of a GetMasternodeStatusResponse.
|
|
2354
|
+
* @memberof org.dash.platform.dapi.v0
|
|
2355
|
+
* @interface IGetMasternodeStatusResponse
|
|
2356
|
+
* @property {org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status|null} [status] GetMasternodeStatusResponse status
|
|
2357
|
+
* @property {Uint8Array|null} [proTxHash] GetMasternodeStatusResponse proTxHash
|
|
2358
|
+
* @property {number|null} [posePenalty] GetMasternodeStatusResponse posePenalty
|
|
2359
|
+
* @property {boolean|null} [isSynced] GetMasternodeStatusResponse isSynced
|
|
2360
|
+
* @property {number|null} [syncProgress] GetMasternodeStatusResponse syncProgress
|
|
2361
|
+
*/
|
|
2362
|
+
|
|
2363
|
+
/**
|
|
2364
|
+
* Constructs a new GetMasternodeStatusResponse.
|
|
2365
|
+
* @memberof org.dash.platform.dapi.v0
|
|
2366
|
+
* @classdesc Represents a GetMasternodeStatusResponse.
|
|
2367
|
+
* @implements IGetMasternodeStatusResponse
|
|
2368
|
+
* @constructor
|
|
2369
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusResponse=} [properties] Properties to set
|
|
2370
|
+
*/
|
|
2371
|
+
function GetMasternodeStatusResponse(properties) {
|
|
2372
|
+
if (properties)
|
|
2373
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2374
|
+
if (properties[keys[i]] != null)
|
|
2375
|
+
this[keys[i]] = properties[keys[i]];
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
/**
|
|
2379
|
+
* GetMasternodeStatusResponse status.
|
|
2380
|
+
* @member {org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status} status
|
|
2381
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2382
|
+
* @instance
|
|
2383
|
+
*/
|
|
2384
|
+
GetMasternodeStatusResponse.prototype.status = 0;
|
|
2385
|
+
|
|
2386
|
+
/**
|
|
2387
|
+
* GetMasternodeStatusResponse proTxHash.
|
|
2388
|
+
* @member {Uint8Array} proTxHash
|
|
2389
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2390
|
+
* @instance
|
|
2391
|
+
*/
|
|
2392
|
+
GetMasternodeStatusResponse.prototype.proTxHash = $util.newBuffer([]);
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* GetMasternodeStatusResponse posePenalty.
|
|
2396
|
+
* @member {number} posePenalty
|
|
2397
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2398
|
+
* @instance
|
|
2399
|
+
*/
|
|
2400
|
+
GetMasternodeStatusResponse.prototype.posePenalty = 0;
|
|
2401
|
+
|
|
2402
|
+
/**
|
|
2403
|
+
* GetMasternodeStatusResponse isSynced.
|
|
2404
|
+
* @member {boolean} isSynced
|
|
2405
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2406
|
+
* @instance
|
|
2407
|
+
*/
|
|
2408
|
+
GetMasternodeStatusResponse.prototype.isSynced = false;
|
|
2409
|
+
|
|
2410
|
+
/**
|
|
2411
|
+
* GetMasternodeStatusResponse syncProgress.
|
|
2412
|
+
* @member {number} syncProgress
|
|
2413
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2414
|
+
* @instance
|
|
2415
|
+
*/
|
|
2416
|
+
GetMasternodeStatusResponse.prototype.syncProgress = 0;
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* Creates a new GetMasternodeStatusResponse instance using the specified properties.
|
|
2420
|
+
* @function create
|
|
2421
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2422
|
+
* @static
|
|
2423
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusResponse=} [properties] Properties to set
|
|
2424
|
+
* @returns {org.dash.platform.dapi.v0.GetMasternodeStatusResponse} GetMasternodeStatusResponse instance
|
|
2425
|
+
*/
|
|
2426
|
+
GetMasternodeStatusResponse.create = function create(properties) {
|
|
2427
|
+
return new GetMasternodeStatusResponse(properties);
|
|
2428
|
+
};
|
|
2429
|
+
|
|
2430
|
+
/**
|
|
2431
|
+
* Encodes the specified GetMasternodeStatusResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetMasternodeStatusResponse.verify|verify} messages.
|
|
2432
|
+
* @function encode
|
|
2433
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2434
|
+
* @static
|
|
2435
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusResponse} message GetMasternodeStatusResponse message or plain object to encode
|
|
2436
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2437
|
+
* @returns {$protobuf.Writer} Writer
|
|
2438
|
+
*/
|
|
2439
|
+
GetMasternodeStatusResponse.encode = function encode(message, writer) {
|
|
2440
|
+
if (!writer)
|
|
2441
|
+
writer = $Writer.create();
|
|
2442
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
2443
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
|
|
2444
|
+
if (message.proTxHash != null && Object.hasOwnProperty.call(message, "proTxHash"))
|
|
2445
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proTxHash);
|
|
2446
|
+
if (message.posePenalty != null && Object.hasOwnProperty.call(message, "posePenalty"))
|
|
2447
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.posePenalty);
|
|
2448
|
+
if (message.isSynced != null && Object.hasOwnProperty.call(message, "isSynced"))
|
|
2449
|
+
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isSynced);
|
|
2450
|
+
if (message.syncProgress != null && Object.hasOwnProperty.call(message, "syncProgress"))
|
|
2451
|
+
writer.uint32(/* id 5, wireType 1 =*/41).double(message.syncProgress);
|
|
2452
|
+
return writer;
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* Encodes the specified GetMasternodeStatusResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetMasternodeStatusResponse.verify|verify} messages.
|
|
2457
|
+
* @function encodeDelimited
|
|
2458
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2459
|
+
* @static
|
|
2460
|
+
* @param {org.dash.platform.dapi.v0.IGetMasternodeStatusResponse} message GetMasternodeStatusResponse message or plain object to encode
|
|
2461
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2462
|
+
* @returns {$protobuf.Writer} Writer
|
|
2463
|
+
*/
|
|
2464
|
+
GetMasternodeStatusResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2465
|
+
return this.encode(message, writer).ldelim();
|
|
2466
|
+
};
|
|
2467
|
+
|
|
2468
|
+
/**
|
|
2469
|
+
* Decodes a GetMasternodeStatusResponse message from the specified reader or buffer.
|
|
2470
|
+
* @function decode
|
|
2471
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2472
|
+
* @static
|
|
2473
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2474
|
+
* @param {number} [length] Message length if known beforehand
|
|
2475
|
+
* @returns {org.dash.platform.dapi.v0.GetMasternodeStatusResponse} GetMasternodeStatusResponse
|
|
2476
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2477
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2478
|
+
*/
|
|
2479
|
+
GetMasternodeStatusResponse.decode = function decode(reader, length) {
|
|
2480
|
+
if (!(reader instanceof $Reader))
|
|
2481
|
+
reader = $Reader.create(reader);
|
|
2482
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetMasternodeStatusResponse();
|
|
2483
|
+
while (reader.pos < end) {
|
|
2484
|
+
var tag = reader.uint32();
|
|
2485
|
+
switch (tag >>> 3) {
|
|
2486
|
+
case 1:
|
|
2487
|
+
message.status = reader.int32();
|
|
2488
|
+
break;
|
|
2489
|
+
case 2:
|
|
2490
|
+
message.proTxHash = reader.bytes();
|
|
2491
|
+
break;
|
|
2492
|
+
case 3:
|
|
2493
|
+
message.posePenalty = reader.uint32();
|
|
2494
|
+
break;
|
|
2495
|
+
case 4:
|
|
2496
|
+
message.isSynced = reader.bool();
|
|
2497
|
+
break;
|
|
2498
|
+
case 5:
|
|
2499
|
+
message.syncProgress = reader.double();
|
|
2500
|
+
break;
|
|
2501
|
+
default:
|
|
2502
|
+
reader.skipType(tag & 7);
|
|
2503
|
+
break;
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
return message;
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2509
|
+
/**
|
|
2510
|
+
* Decodes a GetMasternodeStatusResponse message from the specified reader or buffer, length delimited.
|
|
2511
|
+
* @function decodeDelimited
|
|
2512
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2513
|
+
* @static
|
|
2514
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2515
|
+
* @returns {org.dash.platform.dapi.v0.GetMasternodeStatusResponse} GetMasternodeStatusResponse
|
|
2516
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2517
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2518
|
+
*/
|
|
2519
|
+
GetMasternodeStatusResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
2520
|
+
if (!(reader instanceof $Reader))
|
|
2521
|
+
reader = new $Reader(reader);
|
|
2522
|
+
return this.decode(reader, reader.uint32());
|
|
2523
|
+
};
|
|
2524
|
+
|
|
2525
|
+
/**
|
|
2526
|
+
* Verifies a GetMasternodeStatusResponse message.
|
|
2527
|
+
* @function verify
|
|
2528
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2529
|
+
* @static
|
|
2530
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
2531
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2532
|
+
*/
|
|
2533
|
+
GetMasternodeStatusResponse.verify = function verify(message) {
|
|
2534
|
+
if (typeof message !== "object" || message === null)
|
|
2535
|
+
return "object expected";
|
|
2536
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
2537
|
+
switch (message.status) {
|
|
2538
|
+
default:
|
|
2539
|
+
return "status: enum value expected";
|
|
2540
|
+
case 0:
|
|
2541
|
+
case 1:
|
|
2542
|
+
case 2:
|
|
2543
|
+
case 3:
|
|
2544
|
+
case 4:
|
|
2545
|
+
case 5:
|
|
2546
|
+
case 6:
|
|
2547
|
+
case 7:
|
|
2548
|
+
break;
|
|
2549
|
+
}
|
|
2550
|
+
if (message.proTxHash != null && message.hasOwnProperty("proTxHash"))
|
|
2551
|
+
if (!(message.proTxHash && typeof message.proTxHash.length === "number" || $util.isString(message.proTxHash)))
|
|
2552
|
+
return "proTxHash: buffer expected";
|
|
2553
|
+
if (message.posePenalty != null && message.hasOwnProperty("posePenalty"))
|
|
2554
|
+
if (!$util.isInteger(message.posePenalty))
|
|
2555
|
+
return "posePenalty: integer expected";
|
|
2556
|
+
if (message.isSynced != null && message.hasOwnProperty("isSynced"))
|
|
2557
|
+
if (typeof message.isSynced !== "boolean")
|
|
2558
|
+
return "isSynced: boolean expected";
|
|
2559
|
+
if (message.syncProgress != null && message.hasOwnProperty("syncProgress"))
|
|
2560
|
+
if (typeof message.syncProgress !== "number")
|
|
2561
|
+
return "syncProgress: number expected";
|
|
2562
|
+
return null;
|
|
2563
|
+
};
|
|
2564
|
+
|
|
2565
|
+
/**
|
|
2566
|
+
* Creates a GetMasternodeStatusResponse message from a plain object. Also converts values to their respective internal types.
|
|
2567
|
+
* @function fromObject
|
|
2568
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2569
|
+
* @static
|
|
2570
|
+
* @param {Object.<string,*>} object Plain object
|
|
2571
|
+
* @returns {org.dash.platform.dapi.v0.GetMasternodeStatusResponse} GetMasternodeStatusResponse
|
|
2572
|
+
*/
|
|
2573
|
+
GetMasternodeStatusResponse.fromObject = function fromObject(object) {
|
|
2574
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetMasternodeStatusResponse)
|
|
2575
|
+
return object;
|
|
2576
|
+
var message = new $root.org.dash.platform.dapi.v0.GetMasternodeStatusResponse();
|
|
2577
|
+
switch (object.status) {
|
|
2578
|
+
case "UNKNOWN":
|
|
2579
|
+
case 0:
|
|
2580
|
+
message.status = 0;
|
|
2581
|
+
break;
|
|
2582
|
+
case "WAITING_FOR_PROTX":
|
|
2583
|
+
case 1:
|
|
2584
|
+
message.status = 1;
|
|
2585
|
+
break;
|
|
2586
|
+
case "POSE_BANNED":
|
|
2587
|
+
case 2:
|
|
2588
|
+
message.status = 2;
|
|
2589
|
+
break;
|
|
2590
|
+
case "REMOVED":
|
|
2591
|
+
case 3:
|
|
2592
|
+
message.status = 3;
|
|
2593
|
+
break;
|
|
2594
|
+
case "OPERATOR_KEY_CHANGED":
|
|
2595
|
+
case 4:
|
|
2596
|
+
message.status = 4;
|
|
2597
|
+
break;
|
|
2598
|
+
case "PROTX_IP_CHANGED":
|
|
2599
|
+
case 5:
|
|
2600
|
+
message.status = 5;
|
|
2601
|
+
break;
|
|
2602
|
+
case "READY":
|
|
2603
|
+
case 6:
|
|
2604
|
+
message.status = 6;
|
|
2605
|
+
break;
|
|
2606
|
+
case "ERROR":
|
|
2607
|
+
case 7:
|
|
2608
|
+
message.status = 7;
|
|
2609
|
+
break;
|
|
2610
|
+
}
|
|
2611
|
+
if (object.proTxHash != null)
|
|
2612
|
+
if (typeof object.proTxHash === "string")
|
|
2613
|
+
$util.base64.decode(object.proTxHash, message.proTxHash = $util.newBuffer($util.base64.length(object.proTxHash)), 0);
|
|
2614
|
+
else if (object.proTxHash.length >= 0)
|
|
2615
|
+
message.proTxHash = object.proTxHash;
|
|
2616
|
+
if (object.posePenalty != null)
|
|
2617
|
+
message.posePenalty = object.posePenalty >>> 0;
|
|
2618
|
+
if (object.isSynced != null)
|
|
2619
|
+
message.isSynced = Boolean(object.isSynced);
|
|
2620
|
+
if (object.syncProgress != null)
|
|
2621
|
+
message.syncProgress = Number(object.syncProgress);
|
|
2622
|
+
return message;
|
|
2623
|
+
};
|
|
2624
|
+
|
|
2625
|
+
/**
|
|
2626
|
+
* Creates a plain object from a GetMasternodeStatusResponse message. Also converts values to other types if specified.
|
|
2627
|
+
* @function toObject
|
|
2628
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2629
|
+
* @static
|
|
2630
|
+
* @param {org.dash.platform.dapi.v0.GetMasternodeStatusResponse} message GetMasternodeStatusResponse
|
|
2631
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2632
|
+
* @returns {Object.<string,*>} Plain object
|
|
2633
|
+
*/
|
|
2634
|
+
GetMasternodeStatusResponse.toObject = function toObject(message, options) {
|
|
2635
|
+
if (!options)
|
|
2636
|
+
options = {};
|
|
2637
|
+
var object = {};
|
|
2638
|
+
if (options.defaults) {
|
|
2639
|
+
object.status = options.enums === String ? "UNKNOWN" : 0;
|
|
2640
|
+
if (options.bytes === String)
|
|
2641
|
+
object.proTxHash = "";
|
|
2642
|
+
else {
|
|
2643
|
+
object.proTxHash = [];
|
|
2644
|
+
if (options.bytes !== Array)
|
|
2645
|
+
object.proTxHash = $util.newBuffer(object.proTxHash);
|
|
2646
|
+
}
|
|
2647
|
+
object.posePenalty = 0;
|
|
2648
|
+
object.isSynced = false;
|
|
2649
|
+
object.syncProgress = 0;
|
|
2650
|
+
}
|
|
2651
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
2652
|
+
object.status = options.enums === String ? $root.org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status[message.status] : message.status;
|
|
2653
|
+
if (message.proTxHash != null && message.hasOwnProperty("proTxHash"))
|
|
2654
|
+
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;
|
|
2655
|
+
if (message.posePenalty != null && message.hasOwnProperty("posePenalty"))
|
|
2656
|
+
object.posePenalty = message.posePenalty;
|
|
2657
|
+
if (message.isSynced != null && message.hasOwnProperty("isSynced"))
|
|
2658
|
+
object.isSynced = message.isSynced;
|
|
2659
|
+
if (message.syncProgress != null && message.hasOwnProperty("syncProgress"))
|
|
2660
|
+
object.syncProgress = options.json && !isFinite(message.syncProgress) ? String(message.syncProgress) : message.syncProgress;
|
|
2661
|
+
return object;
|
|
2662
|
+
};
|
|
2663
|
+
|
|
2664
|
+
/**
|
|
2665
|
+
* Converts this GetMasternodeStatusResponse to JSON.
|
|
2666
|
+
* @function toJSON
|
|
2667
|
+
* @memberof org.dash.platform.dapi.v0.GetMasternodeStatusResponse
|
|
2668
|
+
* @instance
|
|
2669
|
+
* @returns {Object.<string,*>} JSON object
|
|
2670
|
+
*/
|
|
2671
|
+
GetMasternodeStatusResponse.prototype.toJSON = function toJSON() {
|
|
2672
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2673
|
+
};
|
|
2674
|
+
|
|
2675
|
+
/**
|
|
2676
|
+
* Status enum.
|
|
2677
|
+
* @name org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status
|
|
2678
|
+
* @enum {number}
|
|
2679
|
+
* @property {number} UNKNOWN=0 UNKNOWN value
|
|
2680
|
+
* @property {number} WAITING_FOR_PROTX=1 WAITING_FOR_PROTX value
|
|
2681
|
+
* @property {number} POSE_BANNED=2 POSE_BANNED value
|
|
2682
|
+
* @property {number} REMOVED=3 REMOVED value
|
|
2683
|
+
* @property {number} OPERATOR_KEY_CHANGED=4 OPERATOR_KEY_CHANGED value
|
|
2684
|
+
* @property {number} PROTX_IP_CHANGED=5 PROTX_IP_CHANGED value
|
|
2685
|
+
* @property {number} READY=6 READY value
|
|
2686
|
+
* @property {number} ERROR=7 ERROR value
|
|
2687
|
+
*/
|
|
2688
|
+
GetMasternodeStatusResponse.Status = (function() {
|
|
2689
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
2690
|
+
values[valuesById[0] = "UNKNOWN"] = 0;
|
|
2691
|
+
values[valuesById[1] = "WAITING_FOR_PROTX"] = 1;
|
|
2692
|
+
values[valuesById[2] = "POSE_BANNED"] = 2;
|
|
2693
|
+
values[valuesById[3] = "REMOVED"] = 3;
|
|
2694
|
+
values[valuesById[4] = "OPERATOR_KEY_CHANGED"] = 4;
|
|
2695
|
+
values[valuesById[5] = "PROTX_IP_CHANGED"] = 5;
|
|
2696
|
+
values[valuesById[6] = "READY"] = 6;
|
|
2697
|
+
values[valuesById[7] = "ERROR"] = 7;
|
|
2698
|
+
return values;
|
|
2699
|
+
})();
|
|
2700
|
+
|
|
2701
|
+
return GetMasternodeStatusResponse;
|
|
2702
|
+
})();
|
|
2703
|
+
|
|
2704
|
+
v0.GetBlockRequest = (function() {
|
|
2705
|
+
|
|
2706
|
+
/**
|
|
2707
|
+
* Properties of a GetBlockRequest.
|
|
2708
|
+
* @memberof org.dash.platform.dapi.v0
|
|
2709
|
+
* @interface IGetBlockRequest
|
|
2710
|
+
* @property {number|null} [height] GetBlockRequest height
|
|
2711
|
+
* @property {string|null} [hash] GetBlockRequest hash
|
|
2712
|
+
*/
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* Constructs a new GetBlockRequest.
|
|
2716
|
+
* @memberof org.dash.platform.dapi.v0
|
|
2717
|
+
* @classdesc Represents a GetBlockRequest.
|
|
2718
|
+
* @implements IGetBlockRequest
|
|
2719
|
+
* @constructor
|
|
2720
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockRequest=} [properties] Properties to set
|
|
2721
|
+
*/
|
|
2722
|
+
function GetBlockRequest(properties) {
|
|
2723
|
+
if (properties)
|
|
2724
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2725
|
+
if (properties[keys[i]] != null)
|
|
2726
|
+
this[keys[i]] = properties[keys[i]];
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
/**
|
|
2730
|
+
* GetBlockRequest height.
|
|
2731
|
+
* @member {number} height
|
|
2732
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2733
|
+
* @instance
|
|
2734
|
+
*/
|
|
2735
|
+
GetBlockRequest.prototype.height = 0;
|
|
2736
|
+
|
|
2737
|
+
/**
|
|
2738
|
+
* GetBlockRequest hash.
|
|
2739
|
+
* @member {string} hash
|
|
2740
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2741
|
+
* @instance
|
|
2742
|
+
*/
|
|
2743
|
+
GetBlockRequest.prototype.hash = "";
|
|
2744
|
+
|
|
2745
|
+
// OneOf field names bound to virtual getters and setters
|
|
2746
|
+
var $oneOfFields;
|
|
2747
|
+
|
|
2748
|
+
/**
|
|
2749
|
+
* GetBlockRequest block.
|
|
2750
|
+
* @member {"height"|"hash"|undefined} block
|
|
2751
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2752
|
+
* @instance
|
|
2753
|
+
*/
|
|
2754
|
+
Object.defineProperty(GetBlockRequest.prototype, "block", {
|
|
2755
|
+
get: $util.oneOfGetter($oneOfFields = ["height", "hash"]),
|
|
2756
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2757
|
+
});
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* Creates a new GetBlockRequest instance using the specified properties.
|
|
2761
|
+
* @function create
|
|
2762
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2763
|
+
* @static
|
|
2764
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockRequest=} [properties] Properties to set
|
|
2765
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockRequest} GetBlockRequest instance
|
|
2766
|
+
*/
|
|
2767
|
+
GetBlockRequest.create = function create(properties) {
|
|
2768
|
+
return new GetBlockRequest(properties);
|
|
2769
|
+
};
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* Encodes the specified GetBlockRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockRequest.verify|verify} messages.
|
|
2773
|
+
* @function encode
|
|
2774
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2775
|
+
* @static
|
|
2776
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockRequest} message GetBlockRequest message or plain object to encode
|
|
2777
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2778
|
+
* @returns {$protobuf.Writer} Writer
|
|
2779
|
+
*/
|
|
2780
|
+
GetBlockRequest.encode = function encode(message, writer) {
|
|
2781
|
+
if (!writer)
|
|
2782
|
+
writer = $Writer.create();
|
|
2783
|
+
if (message.height != null && Object.hasOwnProperty.call(message, "height"))
|
|
2784
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.height);
|
|
2785
|
+
if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
|
|
2786
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.hash);
|
|
2787
|
+
return writer;
|
|
2788
|
+
};
|
|
2789
|
+
|
|
2790
|
+
/**
|
|
2791
|
+
* Encodes the specified GetBlockRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockRequest.verify|verify} messages.
|
|
2792
|
+
* @function encodeDelimited
|
|
2793
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2794
|
+
* @static
|
|
2795
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockRequest} message GetBlockRequest message or plain object to encode
|
|
2796
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2797
|
+
* @returns {$protobuf.Writer} Writer
|
|
2798
|
+
*/
|
|
2799
|
+
GetBlockRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2800
|
+
return this.encode(message, writer).ldelim();
|
|
2801
|
+
};
|
|
2802
|
+
|
|
2803
|
+
/**
|
|
2804
|
+
* Decodes a GetBlockRequest message from the specified reader or buffer.
|
|
2805
|
+
* @function decode
|
|
2806
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2807
|
+
* @static
|
|
2808
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2809
|
+
* @param {number} [length] Message length if known beforehand
|
|
2810
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockRequest} GetBlockRequest
|
|
2811
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2812
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2813
|
+
*/
|
|
2814
|
+
GetBlockRequest.decode = function decode(reader, length) {
|
|
2815
|
+
if (!(reader instanceof $Reader))
|
|
2816
|
+
reader = $Reader.create(reader);
|
|
2817
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockRequest();
|
|
2818
|
+
while (reader.pos < end) {
|
|
2819
|
+
var tag = reader.uint32();
|
|
2820
|
+
switch (tag >>> 3) {
|
|
2821
|
+
case 1:
|
|
2822
|
+
message.height = reader.uint32();
|
|
2823
|
+
break;
|
|
2824
|
+
case 2:
|
|
2825
|
+
message.hash = reader.string();
|
|
2826
|
+
break;
|
|
2827
|
+
default:
|
|
2828
|
+
reader.skipType(tag & 7);
|
|
2829
|
+
break;
|
|
2447
2830
|
}
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2831
|
+
}
|
|
2832
|
+
return message;
|
|
2833
|
+
};
|
|
2834
|
+
|
|
2835
|
+
/**
|
|
2836
|
+
* Decodes a GetBlockRequest message from the specified reader or buffer, length delimited.
|
|
2837
|
+
* @function decodeDelimited
|
|
2838
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2839
|
+
* @static
|
|
2840
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2841
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockRequest} GetBlockRequest
|
|
2842
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2843
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2844
|
+
*/
|
|
2845
|
+
GetBlockRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
2846
|
+
if (!(reader instanceof $Reader))
|
|
2847
|
+
reader = new $Reader(reader);
|
|
2848
|
+
return this.decode(reader, reader.uint32());
|
|
2849
|
+
};
|
|
2850
|
+
|
|
2851
|
+
/**
|
|
2852
|
+
* Verifies a GetBlockRequest message.
|
|
2853
|
+
* @function verify
|
|
2854
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2855
|
+
* @static
|
|
2856
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
2857
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2858
|
+
*/
|
|
2859
|
+
GetBlockRequest.verify = function verify(message) {
|
|
2860
|
+
if (typeof message !== "object" || message === null)
|
|
2861
|
+
return "object expected";
|
|
2862
|
+
var properties = {};
|
|
2863
|
+
if (message.height != null && message.hasOwnProperty("height")) {
|
|
2864
|
+
properties.block = 1;
|
|
2865
|
+
if (!$util.isInteger(message.height))
|
|
2866
|
+
return "height: integer expected";
|
|
2867
|
+
}
|
|
2868
|
+
if (message.hash != null && message.hasOwnProperty("hash")) {
|
|
2869
|
+
if (properties.block === 1)
|
|
2870
|
+
return "block: multiple values";
|
|
2871
|
+
properties.block = 1;
|
|
2872
|
+
if (!$util.isString(message.hash))
|
|
2873
|
+
return "hash: string expected";
|
|
2874
|
+
}
|
|
2875
|
+
return null;
|
|
2876
|
+
};
|
|
2877
|
+
|
|
2878
|
+
/**
|
|
2879
|
+
* Creates a GetBlockRequest message from a plain object. Also converts values to their respective internal types.
|
|
2880
|
+
* @function fromObject
|
|
2881
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2882
|
+
* @static
|
|
2883
|
+
* @param {Object.<string,*>} object Plain object
|
|
2884
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockRequest} GetBlockRequest
|
|
2885
|
+
*/
|
|
2886
|
+
GetBlockRequest.fromObject = function fromObject(object) {
|
|
2887
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockRequest)
|
|
2888
|
+
return object;
|
|
2889
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBlockRequest();
|
|
2890
|
+
if (object.height != null)
|
|
2891
|
+
message.height = object.height >>> 0;
|
|
2892
|
+
if (object.hash != null)
|
|
2893
|
+
message.hash = String(object.hash);
|
|
2894
|
+
return message;
|
|
2895
|
+
};
|
|
2896
|
+
|
|
2897
|
+
/**
|
|
2898
|
+
* Creates a plain object from a GetBlockRequest message. Also converts values to other types if specified.
|
|
2899
|
+
* @function toObject
|
|
2900
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2901
|
+
* @static
|
|
2902
|
+
* @param {org.dash.platform.dapi.v0.GetBlockRequest} message GetBlockRequest
|
|
2903
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2904
|
+
* @returns {Object.<string,*>} Plain object
|
|
2905
|
+
*/
|
|
2906
|
+
GetBlockRequest.toObject = function toObject(message, options) {
|
|
2907
|
+
if (!options)
|
|
2908
|
+
options = {};
|
|
2909
|
+
var object = {};
|
|
2910
|
+
if (message.height != null && message.hasOwnProperty("height")) {
|
|
2911
|
+
object.height = message.height;
|
|
2912
|
+
if (options.oneofs)
|
|
2913
|
+
object.block = "height";
|
|
2914
|
+
}
|
|
2915
|
+
if (message.hash != null && message.hasOwnProperty("hash")) {
|
|
2916
|
+
object.hash = message.hash;
|
|
2917
|
+
if (options.oneofs)
|
|
2918
|
+
object.block = "hash";
|
|
2919
|
+
}
|
|
2920
|
+
return object;
|
|
2921
|
+
};
|
|
2922
|
+
|
|
2923
|
+
/**
|
|
2924
|
+
* Converts this GetBlockRequest to JSON.
|
|
2925
|
+
* @function toJSON
|
|
2926
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2927
|
+
* @instance
|
|
2928
|
+
* @returns {Object.<string,*>} JSON object
|
|
2929
|
+
*/
|
|
2930
|
+
GetBlockRequest.prototype.toJSON = function toJSON() {
|
|
2931
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2932
|
+
};
|
|
2933
|
+
|
|
2934
|
+
return GetBlockRequest;
|
|
2935
|
+
})();
|
|
2936
|
+
|
|
2937
|
+
v0.GetBlockResponse = (function() {
|
|
2938
|
+
|
|
2939
|
+
/**
|
|
2940
|
+
* Properties of a GetBlockResponse.
|
|
2941
|
+
* @memberof org.dash.platform.dapi.v0
|
|
2942
|
+
* @interface IGetBlockResponse
|
|
2943
|
+
* @property {Uint8Array|null} [block] GetBlockResponse block
|
|
2944
|
+
*/
|
|
2945
|
+
|
|
2946
|
+
/**
|
|
2947
|
+
* Constructs a new GetBlockResponse.
|
|
2948
|
+
* @memberof org.dash.platform.dapi.v0
|
|
2949
|
+
* @classdesc Represents a GetBlockResponse.
|
|
2950
|
+
* @implements IGetBlockResponse
|
|
2951
|
+
* @constructor
|
|
2952
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockResponse=} [properties] Properties to set
|
|
2953
|
+
*/
|
|
2954
|
+
function GetBlockResponse(properties) {
|
|
2955
|
+
if (properties)
|
|
2956
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2957
|
+
if (properties[keys[i]] != null)
|
|
2958
|
+
this[keys[i]] = properties[keys[i]];
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2961
|
+
/**
|
|
2962
|
+
* GetBlockResponse block.
|
|
2963
|
+
* @member {Uint8Array} block
|
|
2964
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
2965
|
+
* @instance
|
|
2966
|
+
*/
|
|
2967
|
+
GetBlockResponse.prototype.block = $util.newBuffer([]);
|
|
2968
|
+
|
|
2969
|
+
/**
|
|
2970
|
+
* Creates a new GetBlockResponse instance using the specified properties.
|
|
2971
|
+
* @function create
|
|
2972
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
2973
|
+
* @static
|
|
2974
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockResponse=} [properties] Properties to set
|
|
2975
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockResponse} GetBlockResponse instance
|
|
2976
|
+
*/
|
|
2977
|
+
GetBlockResponse.create = function create(properties) {
|
|
2978
|
+
return new GetBlockResponse(properties);
|
|
2979
|
+
};
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* Encodes the specified GetBlockResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockResponse.verify|verify} messages.
|
|
2983
|
+
* @function encode
|
|
2984
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
2985
|
+
* @static
|
|
2986
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockResponse} message GetBlockResponse message or plain object to encode
|
|
2987
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2988
|
+
* @returns {$protobuf.Writer} Writer
|
|
2989
|
+
*/
|
|
2990
|
+
GetBlockResponse.encode = function encode(message, writer) {
|
|
2991
|
+
if (!writer)
|
|
2992
|
+
writer = $Writer.create();
|
|
2993
|
+
if (message.block != null && Object.hasOwnProperty.call(message, "block"))
|
|
2994
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.block);
|
|
2995
|
+
return writer;
|
|
2996
|
+
};
|
|
2997
|
+
|
|
2998
|
+
/**
|
|
2999
|
+
* Encodes the specified GetBlockResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBlockResponse.verify|verify} messages.
|
|
3000
|
+
* @function encodeDelimited
|
|
3001
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
3002
|
+
* @static
|
|
3003
|
+
* @param {org.dash.platform.dapi.v0.IGetBlockResponse} message GetBlockResponse message or plain object to encode
|
|
3004
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3005
|
+
* @returns {$protobuf.Writer} Writer
|
|
3006
|
+
*/
|
|
3007
|
+
GetBlockResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3008
|
+
return this.encode(message, writer).ldelim();
|
|
3009
|
+
};
|
|
3010
|
+
|
|
3011
|
+
/**
|
|
3012
|
+
* Decodes a GetBlockResponse message from the specified reader or buffer.
|
|
3013
|
+
* @function decode
|
|
3014
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
3015
|
+
* @static
|
|
3016
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3017
|
+
* @param {number} [length] Message length if known beforehand
|
|
3018
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockResponse} GetBlockResponse
|
|
3019
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3020
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3021
|
+
*/
|
|
3022
|
+
GetBlockResponse.decode = function decode(reader, length) {
|
|
3023
|
+
if (!(reader instanceof $Reader))
|
|
3024
|
+
reader = $Reader.create(reader);
|
|
3025
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBlockResponse();
|
|
3026
|
+
while (reader.pos < end) {
|
|
3027
|
+
var tag = reader.uint32();
|
|
3028
|
+
switch (tag >>> 3) {
|
|
3029
|
+
case 1:
|
|
3030
|
+
message.block = reader.bytes();
|
|
3031
|
+
break;
|
|
3032
|
+
default:
|
|
3033
|
+
reader.skipType(tag & 7);
|
|
3034
|
+
break;
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
return message;
|
|
3038
|
+
};
|
|
3039
|
+
|
|
3040
|
+
/**
|
|
3041
|
+
* Decodes a GetBlockResponse message from the specified reader or buffer, length delimited.
|
|
3042
|
+
* @function decodeDelimited
|
|
3043
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
3044
|
+
* @static
|
|
3045
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3046
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockResponse} GetBlockResponse
|
|
3047
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3048
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3049
|
+
*/
|
|
3050
|
+
GetBlockResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
3051
|
+
if (!(reader instanceof $Reader))
|
|
3052
|
+
reader = new $Reader(reader);
|
|
3053
|
+
return this.decode(reader, reader.uint32());
|
|
3054
|
+
};
|
|
3055
|
+
|
|
3056
|
+
/**
|
|
3057
|
+
* Verifies a GetBlockResponse message.
|
|
3058
|
+
* @function verify
|
|
3059
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
3060
|
+
* @static
|
|
3061
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3062
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3063
|
+
*/
|
|
3064
|
+
GetBlockResponse.verify = function verify(message) {
|
|
3065
|
+
if (typeof message !== "object" || message === null)
|
|
3066
|
+
return "object expected";
|
|
3067
|
+
if (message.block != null && message.hasOwnProperty("block"))
|
|
3068
|
+
if (!(message.block && typeof message.block.length === "number" || $util.isString(message.block)))
|
|
3069
|
+
return "block: buffer expected";
|
|
3070
|
+
return null;
|
|
3071
|
+
};
|
|
3072
|
+
|
|
3073
|
+
/**
|
|
3074
|
+
* Creates a GetBlockResponse message from a plain object. Also converts values to their respective internal types.
|
|
3075
|
+
* @function fromObject
|
|
3076
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
3077
|
+
* @static
|
|
3078
|
+
* @param {Object.<string,*>} object Plain object
|
|
3079
|
+
* @returns {org.dash.platform.dapi.v0.GetBlockResponse} GetBlockResponse
|
|
3080
|
+
*/
|
|
3081
|
+
GetBlockResponse.fromObject = function fromObject(object) {
|
|
3082
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBlockResponse)
|
|
2452
3083
|
return object;
|
|
2453
|
-
|
|
3084
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBlockResponse();
|
|
3085
|
+
if (object.block != null)
|
|
3086
|
+
if (typeof object.block === "string")
|
|
3087
|
+
$util.base64.decode(object.block, message.block = $util.newBuffer($util.base64.length(object.block)), 0);
|
|
3088
|
+
else if (object.block.length >= 0)
|
|
3089
|
+
message.block = object.block;
|
|
3090
|
+
return message;
|
|
3091
|
+
};
|
|
2454
3092
|
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
3093
|
+
/**
|
|
3094
|
+
* Creates a plain object from a GetBlockResponse message. Also converts values to other types if specified.
|
|
3095
|
+
* @function toObject
|
|
3096
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
3097
|
+
* @static
|
|
3098
|
+
* @param {org.dash.platform.dapi.v0.GetBlockResponse} message GetBlockResponse
|
|
3099
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3100
|
+
* @returns {Object.<string,*>} Plain object
|
|
3101
|
+
*/
|
|
3102
|
+
GetBlockResponse.toObject = function toObject(message, options) {
|
|
3103
|
+
if (!options)
|
|
3104
|
+
options = {};
|
|
3105
|
+
var object = {};
|
|
3106
|
+
if (options.defaults)
|
|
3107
|
+
if (options.bytes === String)
|
|
3108
|
+
object.block = "";
|
|
3109
|
+
else {
|
|
3110
|
+
object.block = [];
|
|
3111
|
+
if (options.bytes !== Array)
|
|
3112
|
+
object.block = $util.newBuffer(object.block);
|
|
3113
|
+
}
|
|
3114
|
+
if (message.block != null && message.hasOwnProperty("block"))
|
|
3115
|
+
object.block = options.bytes === String ? $util.base64.encode(message.block, 0, message.block.length) : options.bytes === Array ? Array.prototype.slice.call(message.block) : message.block;
|
|
3116
|
+
return object;
|
|
3117
|
+
};
|
|
2465
3118
|
|
|
2466
|
-
|
|
2467
|
-
|
|
3119
|
+
/**
|
|
3120
|
+
* Converts this GetBlockResponse to JSON.
|
|
3121
|
+
* @function toJSON
|
|
3122
|
+
* @memberof org.dash.platform.dapi.v0.GetBlockResponse
|
|
3123
|
+
* @instance
|
|
3124
|
+
* @returns {Object.<string,*>} JSON object
|
|
3125
|
+
*/
|
|
3126
|
+
GetBlockResponse.prototype.toJSON = function toJSON() {
|
|
3127
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3128
|
+
};
|
|
2468
3129
|
|
|
2469
|
-
return
|
|
3130
|
+
return GetBlockResponse;
|
|
2470
3131
|
})();
|
|
2471
3132
|
|
|
2472
|
-
v0.
|
|
3133
|
+
v0.GetBestBlockHeightRequest = (function() {
|
|
2473
3134
|
|
|
2474
3135
|
/**
|
|
2475
|
-
* Properties of a
|
|
3136
|
+
* Properties of a GetBestBlockHeightRequest.
|
|
2476
3137
|
* @memberof org.dash.platform.dapi.v0
|
|
2477
|
-
* @interface
|
|
2478
|
-
* @property {number|null} [height] GetBlockRequest height
|
|
2479
|
-
* @property {string|null} [hash] GetBlockRequest hash
|
|
3138
|
+
* @interface IGetBestBlockHeightRequest
|
|
2480
3139
|
*/
|
|
2481
3140
|
|
|
2482
3141
|
/**
|
|
2483
|
-
* Constructs a new
|
|
3142
|
+
* Constructs a new GetBestBlockHeightRequest.
|
|
2484
3143
|
* @memberof org.dash.platform.dapi.v0
|
|
2485
|
-
* @classdesc Represents a
|
|
2486
|
-
* @implements
|
|
3144
|
+
* @classdesc Represents a GetBestBlockHeightRequest.
|
|
3145
|
+
* @implements IGetBestBlockHeightRequest
|
|
2487
3146
|
* @constructor
|
|
2488
|
-
* @param {org.dash.platform.dapi.v0.
|
|
3147
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest=} [properties] Properties to set
|
|
2489
3148
|
*/
|
|
2490
|
-
function
|
|
3149
|
+
function GetBestBlockHeightRequest(properties) {
|
|
2491
3150
|
if (properties)
|
|
2492
3151
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2493
3152
|
if (properties[keys[i]] != null)
|
|
@@ -2495,103 +3154,63 @@ $root.org = (function() {
|
|
|
2495
3154
|
}
|
|
2496
3155
|
|
|
2497
3156
|
/**
|
|
2498
|
-
*
|
|
2499
|
-
* @member {number} height
|
|
2500
|
-
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2501
|
-
* @instance
|
|
2502
|
-
*/
|
|
2503
|
-
GetBlockRequest.prototype.height = 0;
|
|
2504
|
-
|
|
2505
|
-
/**
|
|
2506
|
-
* GetBlockRequest hash.
|
|
2507
|
-
* @member {string} hash
|
|
2508
|
-
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2509
|
-
* @instance
|
|
2510
|
-
*/
|
|
2511
|
-
GetBlockRequest.prototype.hash = "";
|
|
2512
|
-
|
|
2513
|
-
// OneOf field names bound to virtual getters and setters
|
|
2514
|
-
var $oneOfFields;
|
|
2515
|
-
|
|
2516
|
-
/**
|
|
2517
|
-
* GetBlockRequest block.
|
|
2518
|
-
* @member {"height"|"hash"|undefined} block
|
|
2519
|
-
* @memberof org.dash.platform.dapi.v0.GetBlockRequest
|
|
2520
|
-
* @instance
|
|
2521
|
-
*/
|
|
2522
|
-
Object.defineProperty(GetBlockRequest.prototype, "block", {
|
|
2523
|
-
get: $util.oneOfGetter($oneOfFields = ["height", "hash"]),
|
|
2524
|
-
set: $util.oneOfSetter($oneOfFields)
|
|
2525
|
-
});
|
|
2526
|
-
|
|
2527
|
-
/**
|
|
2528
|
-
* Creates a new GetBlockRequest instance using the specified properties.
|
|
3157
|
+
* Creates a new GetBestBlockHeightRequest instance using the specified properties.
|
|
2529
3158
|
* @function create
|
|
2530
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3159
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2531
3160
|
* @static
|
|
2532
|
-
* @param {org.dash.platform.dapi.v0.
|
|
2533
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
3161
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest=} [properties] Properties to set
|
|
3162
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} GetBestBlockHeightRequest instance
|
|
2534
3163
|
*/
|
|
2535
|
-
|
|
2536
|
-
return new
|
|
3164
|
+
GetBestBlockHeightRequest.create = function create(properties) {
|
|
3165
|
+
return new GetBestBlockHeightRequest(properties);
|
|
2537
3166
|
};
|
|
2538
3167
|
|
|
2539
3168
|
/**
|
|
2540
|
-
* Encodes the specified
|
|
3169
|
+
* Encodes the specified GetBestBlockHeightRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBestBlockHeightRequest.verify|verify} messages.
|
|
2541
3170
|
* @function encode
|
|
2542
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3171
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2543
3172
|
* @static
|
|
2544
|
-
* @param {org.dash.platform.dapi.v0.
|
|
3173
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest} message GetBestBlockHeightRequest message or plain object to encode
|
|
2545
3174
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2546
3175
|
* @returns {$protobuf.Writer} Writer
|
|
2547
3176
|
*/
|
|
2548
|
-
|
|
3177
|
+
GetBestBlockHeightRequest.encode = function encode(message, writer) {
|
|
2549
3178
|
if (!writer)
|
|
2550
3179
|
writer = $Writer.create();
|
|
2551
|
-
if (message.height != null && Object.hasOwnProperty.call(message, "height"))
|
|
2552
|
-
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.height);
|
|
2553
|
-
if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
|
|
2554
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.hash);
|
|
2555
3180
|
return writer;
|
|
2556
3181
|
};
|
|
2557
3182
|
|
|
2558
3183
|
/**
|
|
2559
|
-
* Encodes the specified
|
|
3184
|
+
* Encodes the specified GetBestBlockHeightRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBestBlockHeightRequest.verify|verify} messages.
|
|
2560
3185
|
* @function encodeDelimited
|
|
2561
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3186
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2562
3187
|
* @static
|
|
2563
|
-
* @param {org.dash.platform.dapi.v0.
|
|
3188
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest} message GetBestBlockHeightRequest message or plain object to encode
|
|
2564
3189
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2565
3190
|
* @returns {$protobuf.Writer} Writer
|
|
2566
3191
|
*/
|
|
2567
|
-
|
|
3192
|
+
GetBestBlockHeightRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2568
3193
|
return this.encode(message, writer).ldelim();
|
|
2569
3194
|
};
|
|
2570
3195
|
|
|
2571
3196
|
/**
|
|
2572
|
-
* Decodes a
|
|
3197
|
+
* Decodes a GetBestBlockHeightRequest message from the specified reader or buffer.
|
|
2573
3198
|
* @function decode
|
|
2574
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3199
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2575
3200
|
* @static
|
|
2576
3201
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2577
3202
|
* @param {number} [length] Message length if known beforehand
|
|
2578
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
3203
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} GetBestBlockHeightRequest
|
|
2579
3204
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2580
3205
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2581
3206
|
*/
|
|
2582
|
-
|
|
3207
|
+
GetBestBlockHeightRequest.decode = function decode(reader, length) {
|
|
2583
3208
|
if (!(reader instanceof $Reader))
|
|
2584
3209
|
reader = $Reader.create(reader);
|
|
2585
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
3210
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBestBlockHeightRequest();
|
|
2586
3211
|
while (reader.pos < end) {
|
|
2587
3212
|
var tag = reader.uint32();
|
|
2588
3213
|
switch (tag >>> 3) {
|
|
2589
|
-
case 1:
|
|
2590
|
-
message.height = reader.uint32();
|
|
2591
|
-
break;
|
|
2592
|
-
case 2:
|
|
2593
|
-
message.hash = reader.string();
|
|
2594
|
-
break;
|
|
2595
3214
|
default:
|
|
2596
3215
|
reader.skipType(tag & 7);
|
|
2597
3216
|
break;
|
|
@@ -2601,125 +3220,94 @@ $root.org = (function() {
|
|
|
2601
3220
|
};
|
|
2602
3221
|
|
|
2603
3222
|
/**
|
|
2604
|
-
* Decodes a
|
|
3223
|
+
* Decodes a GetBestBlockHeightRequest message from the specified reader or buffer, length delimited.
|
|
2605
3224
|
* @function decodeDelimited
|
|
2606
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3225
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2607
3226
|
* @static
|
|
2608
3227
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2609
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
3228
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} GetBestBlockHeightRequest
|
|
2610
3229
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2611
3230
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2612
3231
|
*/
|
|
2613
|
-
|
|
3232
|
+
GetBestBlockHeightRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
2614
3233
|
if (!(reader instanceof $Reader))
|
|
2615
3234
|
reader = new $Reader(reader);
|
|
2616
3235
|
return this.decode(reader, reader.uint32());
|
|
2617
3236
|
};
|
|
2618
3237
|
|
|
2619
3238
|
/**
|
|
2620
|
-
* Verifies a
|
|
3239
|
+
* Verifies a GetBestBlockHeightRequest message.
|
|
2621
3240
|
* @function verify
|
|
2622
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3241
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2623
3242
|
* @static
|
|
2624
3243
|
* @param {Object.<string,*>} message Plain object to verify
|
|
2625
3244
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2626
3245
|
*/
|
|
2627
|
-
|
|
3246
|
+
GetBestBlockHeightRequest.verify = function verify(message) {
|
|
2628
3247
|
if (typeof message !== "object" || message === null)
|
|
2629
3248
|
return "object expected";
|
|
2630
|
-
var properties = {};
|
|
2631
|
-
if (message.height != null && message.hasOwnProperty("height")) {
|
|
2632
|
-
properties.block = 1;
|
|
2633
|
-
if (!$util.isInteger(message.height))
|
|
2634
|
-
return "height: integer expected";
|
|
2635
|
-
}
|
|
2636
|
-
if (message.hash != null && message.hasOwnProperty("hash")) {
|
|
2637
|
-
if (properties.block === 1)
|
|
2638
|
-
return "block: multiple values";
|
|
2639
|
-
properties.block = 1;
|
|
2640
|
-
if (!$util.isString(message.hash))
|
|
2641
|
-
return "hash: string expected";
|
|
2642
|
-
}
|
|
2643
3249
|
return null;
|
|
2644
3250
|
};
|
|
2645
3251
|
|
|
2646
3252
|
/**
|
|
2647
|
-
* Creates a
|
|
3253
|
+
* Creates a GetBestBlockHeightRequest message from a plain object. Also converts values to their respective internal types.
|
|
2648
3254
|
* @function fromObject
|
|
2649
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3255
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2650
3256
|
* @static
|
|
2651
3257
|
* @param {Object.<string,*>} object Plain object
|
|
2652
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
3258
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} GetBestBlockHeightRequest
|
|
2653
3259
|
*/
|
|
2654
|
-
|
|
2655
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
3260
|
+
GetBestBlockHeightRequest.fromObject = function fromObject(object) {
|
|
3261
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBestBlockHeightRequest)
|
|
2656
3262
|
return object;
|
|
2657
|
-
|
|
2658
|
-
if (object.height != null)
|
|
2659
|
-
message.height = object.height >>> 0;
|
|
2660
|
-
if (object.hash != null)
|
|
2661
|
-
message.hash = String(object.hash);
|
|
2662
|
-
return message;
|
|
3263
|
+
return new $root.org.dash.platform.dapi.v0.GetBestBlockHeightRequest();
|
|
2663
3264
|
};
|
|
2664
3265
|
|
|
2665
3266
|
/**
|
|
2666
|
-
* Creates a plain object from a
|
|
3267
|
+
* Creates a plain object from a GetBestBlockHeightRequest message. Also converts values to other types if specified.
|
|
2667
3268
|
* @function toObject
|
|
2668
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3269
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2669
3270
|
* @static
|
|
2670
|
-
* @param {org.dash.platform.dapi.v0.
|
|
3271
|
+
* @param {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} message GetBestBlockHeightRequest
|
|
2671
3272
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2672
3273
|
* @returns {Object.<string,*>} Plain object
|
|
2673
3274
|
*/
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
options = {};
|
|
2677
|
-
var object = {};
|
|
2678
|
-
if (message.height != null && message.hasOwnProperty("height")) {
|
|
2679
|
-
object.height = message.height;
|
|
2680
|
-
if (options.oneofs)
|
|
2681
|
-
object.block = "height";
|
|
2682
|
-
}
|
|
2683
|
-
if (message.hash != null && message.hasOwnProperty("hash")) {
|
|
2684
|
-
object.hash = message.hash;
|
|
2685
|
-
if (options.oneofs)
|
|
2686
|
-
object.block = "hash";
|
|
2687
|
-
}
|
|
2688
|
-
return object;
|
|
3275
|
+
GetBestBlockHeightRequest.toObject = function toObject() {
|
|
3276
|
+
return {};
|
|
2689
3277
|
};
|
|
2690
3278
|
|
|
2691
3279
|
/**
|
|
2692
|
-
* Converts this
|
|
3280
|
+
* Converts this GetBestBlockHeightRequest to JSON.
|
|
2693
3281
|
* @function toJSON
|
|
2694
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3282
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
2695
3283
|
* @instance
|
|
2696
3284
|
* @returns {Object.<string,*>} JSON object
|
|
2697
3285
|
*/
|
|
2698
|
-
|
|
3286
|
+
GetBestBlockHeightRequest.prototype.toJSON = function toJSON() {
|
|
2699
3287
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2700
3288
|
};
|
|
2701
3289
|
|
|
2702
|
-
return
|
|
3290
|
+
return GetBestBlockHeightRequest;
|
|
2703
3291
|
})();
|
|
2704
3292
|
|
|
2705
|
-
v0.
|
|
3293
|
+
v0.GetBestBlockHeightResponse = (function() {
|
|
2706
3294
|
|
|
2707
3295
|
/**
|
|
2708
|
-
* Properties of a
|
|
3296
|
+
* Properties of a GetBestBlockHeightResponse.
|
|
2709
3297
|
* @memberof org.dash.platform.dapi.v0
|
|
2710
|
-
* @interface
|
|
2711
|
-
* @property {
|
|
3298
|
+
* @interface IGetBestBlockHeightResponse
|
|
3299
|
+
* @property {number|null} [height] GetBestBlockHeightResponse height
|
|
2712
3300
|
*/
|
|
2713
3301
|
|
|
2714
3302
|
/**
|
|
2715
|
-
* Constructs a new
|
|
3303
|
+
* Constructs a new GetBestBlockHeightResponse.
|
|
2716
3304
|
* @memberof org.dash.platform.dapi.v0
|
|
2717
|
-
* @classdesc Represents a
|
|
2718
|
-
* @implements
|
|
3305
|
+
* @classdesc Represents a GetBestBlockHeightResponse.
|
|
3306
|
+
* @implements IGetBestBlockHeightResponse
|
|
2719
3307
|
* @constructor
|
|
2720
|
-
* @param {org.dash.platform.dapi.v0.
|
|
3308
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightResponse=} [properties] Properties to set
|
|
2721
3309
|
*/
|
|
2722
|
-
function
|
|
3310
|
+
function GetBestBlockHeightResponse(properties) {
|
|
2723
3311
|
if (properties)
|
|
2724
3312
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2725
3313
|
if (properties[keys[i]] != null)
|
|
@@ -2727,75 +3315,75 @@ $root.org = (function() {
|
|
|
2727
3315
|
}
|
|
2728
3316
|
|
|
2729
3317
|
/**
|
|
2730
|
-
*
|
|
2731
|
-
* @member {
|
|
2732
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3318
|
+
* GetBestBlockHeightResponse height.
|
|
3319
|
+
* @member {number} height
|
|
3320
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2733
3321
|
* @instance
|
|
2734
3322
|
*/
|
|
2735
|
-
|
|
3323
|
+
GetBestBlockHeightResponse.prototype.height = 0;
|
|
2736
3324
|
|
|
2737
3325
|
/**
|
|
2738
|
-
* Creates a new
|
|
3326
|
+
* Creates a new GetBestBlockHeightResponse instance using the specified properties.
|
|
2739
3327
|
* @function create
|
|
2740
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3328
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2741
3329
|
* @static
|
|
2742
|
-
* @param {org.dash.platform.dapi.v0.
|
|
2743
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
3330
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightResponse=} [properties] Properties to set
|
|
3331
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} GetBestBlockHeightResponse instance
|
|
2744
3332
|
*/
|
|
2745
|
-
|
|
2746
|
-
return new
|
|
3333
|
+
GetBestBlockHeightResponse.create = function create(properties) {
|
|
3334
|
+
return new GetBestBlockHeightResponse(properties);
|
|
2747
3335
|
};
|
|
2748
3336
|
|
|
2749
3337
|
/**
|
|
2750
|
-
* Encodes the specified
|
|
3338
|
+
* Encodes the specified GetBestBlockHeightResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBestBlockHeightResponse.verify|verify} messages.
|
|
2751
3339
|
* @function encode
|
|
2752
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3340
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2753
3341
|
* @static
|
|
2754
|
-
* @param {org.dash.platform.dapi.v0.
|
|
3342
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightResponse} message GetBestBlockHeightResponse message or plain object to encode
|
|
2755
3343
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2756
3344
|
* @returns {$protobuf.Writer} Writer
|
|
2757
3345
|
*/
|
|
2758
|
-
|
|
3346
|
+
GetBestBlockHeightResponse.encode = function encode(message, writer) {
|
|
2759
3347
|
if (!writer)
|
|
2760
3348
|
writer = $Writer.create();
|
|
2761
|
-
if (message.
|
|
2762
|
-
writer.uint32(/* id 1, wireType
|
|
3349
|
+
if (message.height != null && Object.hasOwnProperty.call(message, "height"))
|
|
3350
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.height);
|
|
2763
3351
|
return writer;
|
|
2764
3352
|
};
|
|
2765
3353
|
|
|
2766
3354
|
/**
|
|
2767
|
-
* Encodes the specified
|
|
3355
|
+
* Encodes the specified GetBestBlockHeightResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBestBlockHeightResponse.verify|verify} messages.
|
|
2768
3356
|
* @function encodeDelimited
|
|
2769
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3357
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2770
3358
|
* @static
|
|
2771
|
-
* @param {org.dash.platform.dapi.v0.
|
|
3359
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightResponse} message GetBestBlockHeightResponse message or plain object to encode
|
|
2772
3360
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2773
3361
|
* @returns {$protobuf.Writer} Writer
|
|
2774
3362
|
*/
|
|
2775
|
-
|
|
3363
|
+
GetBestBlockHeightResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2776
3364
|
return this.encode(message, writer).ldelim();
|
|
2777
3365
|
};
|
|
2778
3366
|
|
|
2779
3367
|
/**
|
|
2780
|
-
* Decodes a
|
|
3368
|
+
* Decodes a GetBestBlockHeightResponse message from the specified reader or buffer.
|
|
2781
3369
|
* @function decode
|
|
2782
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3370
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2783
3371
|
* @static
|
|
2784
3372
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2785
3373
|
* @param {number} [length] Message length if known beforehand
|
|
2786
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
3374
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} GetBestBlockHeightResponse
|
|
2787
3375
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2788
3376
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2789
3377
|
*/
|
|
2790
|
-
|
|
3378
|
+
GetBestBlockHeightResponse.decode = function decode(reader, length) {
|
|
2791
3379
|
if (!(reader instanceof $Reader))
|
|
2792
3380
|
reader = $Reader.create(reader);
|
|
2793
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.
|
|
3381
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBestBlockHeightResponse();
|
|
2794
3382
|
while (reader.pos < end) {
|
|
2795
3383
|
var tag = reader.uint32();
|
|
2796
3384
|
switch (tag >>> 3) {
|
|
2797
3385
|
case 1:
|
|
2798
|
-
message.
|
|
3386
|
+
message.height = reader.uint32();
|
|
2799
3387
|
break;
|
|
2800
3388
|
default:
|
|
2801
3389
|
reader.skipType(tag & 7);
|
|
@@ -2806,96 +3394,87 @@ $root.org = (function() {
|
|
|
2806
3394
|
};
|
|
2807
3395
|
|
|
2808
3396
|
/**
|
|
2809
|
-
* Decodes a
|
|
3397
|
+
* Decodes a GetBestBlockHeightResponse message from the specified reader or buffer, length delimited.
|
|
2810
3398
|
* @function decodeDelimited
|
|
2811
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3399
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2812
3400
|
* @static
|
|
2813
3401
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2814
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
3402
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} GetBestBlockHeightResponse
|
|
2815
3403
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2816
3404
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2817
3405
|
*/
|
|
2818
|
-
|
|
3406
|
+
GetBestBlockHeightResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
2819
3407
|
if (!(reader instanceof $Reader))
|
|
2820
3408
|
reader = new $Reader(reader);
|
|
2821
3409
|
return this.decode(reader, reader.uint32());
|
|
2822
3410
|
};
|
|
2823
3411
|
|
|
2824
3412
|
/**
|
|
2825
|
-
* Verifies a
|
|
3413
|
+
* Verifies a GetBestBlockHeightResponse message.
|
|
2826
3414
|
* @function verify
|
|
2827
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3415
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2828
3416
|
* @static
|
|
2829
3417
|
* @param {Object.<string,*>} message Plain object to verify
|
|
2830
3418
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2831
3419
|
*/
|
|
2832
|
-
|
|
3420
|
+
GetBestBlockHeightResponse.verify = function verify(message) {
|
|
2833
3421
|
if (typeof message !== "object" || message === null)
|
|
2834
3422
|
return "object expected";
|
|
2835
|
-
if (message.
|
|
2836
|
-
if (
|
|
2837
|
-
return "
|
|
3423
|
+
if (message.height != null && message.hasOwnProperty("height"))
|
|
3424
|
+
if (!$util.isInteger(message.height))
|
|
3425
|
+
return "height: integer expected";
|
|
2838
3426
|
return null;
|
|
2839
3427
|
};
|
|
2840
3428
|
|
|
2841
3429
|
/**
|
|
2842
|
-
* Creates a
|
|
3430
|
+
* Creates a GetBestBlockHeightResponse message from a plain object. Also converts values to their respective internal types.
|
|
2843
3431
|
* @function fromObject
|
|
2844
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3432
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2845
3433
|
* @static
|
|
2846
3434
|
* @param {Object.<string,*>} object Plain object
|
|
2847
|
-
* @returns {org.dash.platform.dapi.v0.
|
|
3435
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} GetBestBlockHeightResponse
|
|
2848
3436
|
*/
|
|
2849
|
-
|
|
2850
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.
|
|
3437
|
+
GetBestBlockHeightResponse.fromObject = function fromObject(object) {
|
|
3438
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBestBlockHeightResponse)
|
|
2851
3439
|
return object;
|
|
2852
|
-
var message = new $root.org.dash.platform.dapi.v0.
|
|
2853
|
-
if (object.
|
|
2854
|
-
|
|
2855
|
-
$util.base64.decode(object.block, message.block = $util.newBuffer($util.base64.length(object.block)), 0);
|
|
2856
|
-
else if (object.block.length >= 0)
|
|
2857
|
-
message.block = object.block;
|
|
3440
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBestBlockHeightResponse();
|
|
3441
|
+
if (object.height != null)
|
|
3442
|
+
message.height = object.height >>> 0;
|
|
2858
3443
|
return message;
|
|
2859
3444
|
};
|
|
2860
3445
|
|
|
2861
3446
|
/**
|
|
2862
|
-
* Creates a plain object from a
|
|
3447
|
+
* Creates a plain object from a GetBestBlockHeightResponse message. Also converts values to other types if specified.
|
|
2863
3448
|
* @function toObject
|
|
2864
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3449
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2865
3450
|
* @static
|
|
2866
|
-
* @param {org.dash.platform.dapi.v0.
|
|
3451
|
+
* @param {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} message GetBestBlockHeightResponse
|
|
2867
3452
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2868
3453
|
* @returns {Object.<string,*>} Plain object
|
|
2869
3454
|
*/
|
|
2870
|
-
|
|
3455
|
+
GetBestBlockHeightResponse.toObject = function toObject(message, options) {
|
|
2871
3456
|
if (!options)
|
|
2872
3457
|
options = {};
|
|
2873
3458
|
var object = {};
|
|
2874
3459
|
if (options.defaults)
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
object.block = [];
|
|
2879
|
-
if (options.bytes !== Array)
|
|
2880
|
-
object.block = $util.newBuffer(object.block);
|
|
2881
|
-
}
|
|
2882
|
-
if (message.block != null && message.hasOwnProperty("block"))
|
|
2883
|
-
object.block = options.bytes === String ? $util.base64.encode(message.block, 0, message.block.length) : options.bytes === Array ? Array.prototype.slice.call(message.block) : message.block;
|
|
3460
|
+
object.height = 0;
|
|
3461
|
+
if (message.height != null && message.hasOwnProperty("height"))
|
|
3462
|
+
object.height = message.height;
|
|
2884
3463
|
return object;
|
|
2885
3464
|
};
|
|
2886
3465
|
|
|
2887
3466
|
/**
|
|
2888
|
-
* Converts this
|
|
3467
|
+
* Converts this GetBestBlockHeightResponse to JSON.
|
|
2889
3468
|
* @function toJSON
|
|
2890
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3469
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
2891
3470
|
* @instance
|
|
2892
3471
|
* @returns {Object.<string,*>} JSON object
|
|
2893
3472
|
*/
|
|
2894
|
-
|
|
3473
|
+
GetBestBlockHeightResponse.prototype.toJSON = function toJSON() {
|
|
2895
3474
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2896
3475
|
};
|
|
2897
3476
|
|
|
2898
|
-
return
|
|
3477
|
+
return GetBestBlockHeightResponse;
|
|
2899
3478
|
})();
|
|
2900
3479
|
|
|
2901
3480
|
v0.BroadcastTransactionRequest = (function() {
|
|
@@ -6170,6 +6749,362 @@ $root.org = (function() {
|
|
|
6170
6749
|
return InstantSendLockMessages;
|
|
6171
6750
|
})();
|
|
6172
6751
|
|
|
6752
|
+
v0.MasternodeListRequest = (function() {
|
|
6753
|
+
|
|
6754
|
+
/**
|
|
6755
|
+
* Properties of a MasternodeListRequest.
|
|
6756
|
+
* @memberof org.dash.platform.dapi.v0
|
|
6757
|
+
* @interface IMasternodeListRequest
|
|
6758
|
+
*/
|
|
6759
|
+
|
|
6760
|
+
/**
|
|
6761
|
+
* Constructs a new MasternodeListRequest.
|
|
6762
|
+
* @memberof org.dash.platform.dapi.v0
|
|
6763
|
+
* @classdesc Represents a MasternodeListRequest.
|
|
6764
|
+
* @implements IMasternodeListRequest
|
|
6765
|
+
* @constructor
|
|
6766
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListRequest=} [properties] Properties to set
|
|
6767
|
+
*/
|
|
6768
|
+
function MasternodeListRequest(properties) {
|
|
6769
|
+
if (properties)
|
|
6770
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6771
|
+
if (properties[keys[i]] != null)
|
|
6772
|
+
this[keys[i]] = properties[keys[i]];
|
|
6773
|
+
}
|
|
6774
|
+
|
|
6775
|
+
/**
|
|
6776
|
+
* Creates a new MasternodeListRequest instance using the specified properties.
|
|
6777
|
+
* @function create
|
|
6778
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6779
|
+
* @static
|
|
6780
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListRequest=} [properties] Properties to set
|
|
6781
|
+
* @returns {org.dash.platform.dapi.v0.MasternodeListRequest} MasternodeListRequest instance
|
|
6782
|
+
*/
|
|
6783
|
+
MasternodeListRequest.create = function create(properties) {
|
|
6784
|
+
return new MasternodeListRequest(properties);
|
|
6785
|
+
};
|
|
6786
|
+
|
|
6787
|
+
/**
|
|
6788
|
+
* Encodes the specified MasternodeListRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.MasternodeListRequest.verify|verify} messages.
|
|
6789
|
+
* @function encode
|
|
6790
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6791
|
+
* @static
|
|
6792
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListRequest} message MasternodeListRequest message or plain object to encode
|
|
6793
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6794
|
+
* @returns {$protobuf.Writer} Writer
|
|
6795
|
+
*/
|
|
6796
|
+
MasternodeListRequest.encode = function encode(message, writer) {
|
|
6797
|
+
if (!writer)
|
|
6798
|
+
writer = $Writer.create();
|
|
6799
|
+
return writer;
|
|
6800
|
+
};
|
|
6801
|
+
|
|
6802
|
+
/**
|
|
6803
|
+
* Encodes the specified MasternodeListRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.MasternodeListRequest.verify|verify} messages.
|
|
6804
|
+
* @function encodeDelimited
|
|
6805
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6806
|
+
* @static
|
|
6807
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListRequest} message MasternodeListRequest message or plain object to encode
|
|
6808
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6809
|
+
* @returns {$protobuf.Writer} Writer
|
|
6810
|
+
*/
|
|
6811
|
+
MasternodeListRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6812
|
+
return this.encode(message, writer).ldelim();
|
|
6813
|
+
};
|
|
6814
|
+
|
|
6815
|
+
/**
|
|
6816
|
+
* Decodes a MasternodeListRequest message from the specified reader or buffer.
|
|
6817
|
+
* @function decode
|
|
6818
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6819
|
+
* @static
|
|
6820
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6821
|
+
* @param {number} [length] Message length if known beforehand
|
|
6822
|
+
* @returns {org.dash.platform.dapi.v0.MasternodeListRequest} MasternodeListRequest
|
|
6823
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6824
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6825
|
+
*/
|
|
6826
|
+
MasternodeListRequest.decode = function decode(reader, length) {
|
|
6827
|
+
if (!(reader instanceof $Reader))
|
|
6828
|
+
reader = $Reader.create(reader);
|
|
6829
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.MasternodeListRequest();
|
|
6830
|
+
while (reader.pos < end) {
|
|
6831
|
+
var tag = reader.uint32();
|
|
6832
|
+
switch (tag >>> 3) {
|
|
6833
|
+
default:
|
|
6834
|
+
reader.skipType(tag & 7);
|
|
6835
|
+
break;
|
|
6836
|
+
}
|
|
6837
|
+
}
|
|
6838
|
+
return message;
|
|
6839
|
+
};
|
|
6840
|
+
|
|
6841
|
+
/**
|
|
6842
|
+
* Decodes a MasternodeListRequest message from the specified reader or buffer, length delimited.
|
|
6843
|
+
* @function decodeDelimited
|
|
6844
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6845
|
+
* @static
|
|
6846
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6847
|
+
* @returns {org.dash.platform.dapi.v0.MasternodeListRequest} MasternodeListRequest
|
|
6848
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6849
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6850
|
+
*/
|
|
6851
|
+
MasternodeListRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
6852
|
+
if (!(reader instanceof $Reader))
|
|
6853
|
+
reader = new $Reader(reader);
|
|
6854
|
+
return this.decode(reader, reader.uint32());
|
|
6855
|
+
};
|
|
6856
|
+
|
|
6857
|
+
/**
|
|
6858
|
+
* Verifies a MasternodeListRequest message.
|
|
6859
|
+
* @function verify
|
|
6860
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6861
|
+
* @static
|
|
6862
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
6863
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
6864
|
+
*/
|
|
6865
|
+
MasternodeListRequest.verify = function verify(message) {
|
|
6866
|
+
if (typeof message !== "object" || message === null)
|
|
6867
|
+
return "object expected";
|
|
6868
|
+
return null;
|
|
6869
|
+
};
|
|
6870
|
+
|
|
6871
|
+
/**
|
|
6872
|
+
* Creates a MasternodeListRequest message from a plain object. Also converts values to their respective internal types.
|
|
6873
|
+
* @function fromObject
|
|
6874
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6875
|
+
* @static
|
|
6876
|
+
* @param {Object.<string,*>} object Plain object
|
|
6877
|
+
* @returns {org.dash.platform.dapi.v0.MasternodeListRequest} MasternodeListRequest
|
|
6878
|
+
*/
|
|
6879
|
+
MasternodeListRequest.fromObject = function fromObject(object) {
|
|
6880
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.MasternodeListRequest)
|
|
6881
|
+
return object;
|
|
6882
|
+
return new $root.org.dash.platform.dapi.v0.MasternodeListRequest();
|
|
6883
|
+
};
|
|
6884
|
+
|
|
6885
|
+
/**
|
|
6886
|
+
* Creates a plain object from a MasternodeListRequest message. Also converts values to other types if specified.
|
|
6887
|
+
* @function toObject
|
|
6888
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6889
|
+
* @static
|
|
6890
|
+
* @param {org.dash.platform.dapi.v0.MasternodeListRequest} message MasternodeListRequest
|
|
6891
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
6892
|
+
* @returns {Object.<string,*>} Plain object
|
|
6893
|
+
*/
|
|
6894
|
+
MasternodeListRequest.toObject = function toObject() {
|
|
6895
|
+
return {};
|
|
6896
|
+
};
|
|
6897
|
+
|
|
6898
|
+
/**
|
|
6899
|
+
* Converts this MasternodeListRequest to JSON.
|
|
6900
|
+
* @function toJSON
|
|
6901
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListRequest
|
|
6902
|
+
* @instance
|
|
6903
|
+
* @returns {Object.<string,*>} JSON object
|
|
6904
|
+
*/
|
|
6905
|
+
MasternodeListRequest.prototype.toJSON = function toJSON() {
|
|
6906
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6907
|
+
};
|
|
6908
|
+
|
|
6909
|
+
return MasternodeListRequest;
|
|
6910
|
+
})();
|
|
6911
|
+
|
|
6912
|
+
v0.MasternodeListResponse = (function() {
|
|
6913
|
+
|
|
6914
|
+
/**
|
|
6915
|
+
* Properties of a MasternodeListResponse.
|
|
6916
|
+
* @memberof org.dash.platform.dapi.v0
|
|
6917
|
+
* @interface IMasternodeListResponse
|
|
6918
|
+
* @property {Uint8Array|null} [masternodeListDiff] MasternodeListResponse masternodeListDiff
|
|
6919
|
+
*/
|
|
6920
|
+
|
|
6921
|
+
/**
|
|
6922
|
+
* Constructs a new MasternodeListResponse.
|
|
6923
|
+
* @memberof org.dash.platform.dapi.v0
|
|
6924
|
+
* @classdesc Represents a MasternodeListResponse.
|
|
6925
|
+
* @implements IMasternodeListResponse
|
|
6926
|
+
* @constructor
|
|
6927
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListResponse=} [properties] Properties to set
|
|
6928
|
+
*/
|
|
6929
|
+
function MasternodeListResponse(properties) {
|
|
6930
|
+
if (properties)
|
|
6931
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6932
|
+
if (properties[keys[i]] != null)
|
|
6933
|
+
this[keys[i]] = properties[keys[i]];
|
|
6934
|
+
}
|
|
6935
|
+
|
|
6936
|
+
/**
|
|
6937
|
+
* MasternodeListResponse masternodeListDiff.
|
|
6938
|
+
* @member {Uint8Array} masternodeListDiff
|
|
6939
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
6940
|
+
* @instance
|
|
6941
|
+
*/
|
|
6942
|
+
MasternodeListResponse.prototype.masternodeListDiff = $util.newBuffer([]);
|
|
6943
|
+
|
|
6944
|
+
/**
|
|
6945
|
+
* Creates a new MasternodeListResponse instance using the specified properties.
|
|
6946
|
+
* @function create
|
|
6947
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
6948
|
+
* @static
|
|
6949
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListResponse=} [properties] Properties to set
|
|
6950
|
+
* @returns {org.dash.platform.dapi.v0.MasternodeListResponse} MasternodeListResponse instance
|
|
6951
|
+
*/
|
|
6952
|
+
MasternodeListResponse.create = function create(properties) {
|
|
6953
|
+
return new MasternodeListResponse(properties);
|
|
6954
|
+
};
|
|
6955
|
+
|
|
6956
|
+
/**
|
|
6957
|
+
* Encodes the specified MasternodeListResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.MasternodeListResponse.verify|verify} messages.
|
|
6958
|
+
* @function encode
|
|
6959
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
6960
|
+
* @static
|
|
6961
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListResponse} message MasternodeListResponse message or plain object to encode
|
|
6962
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6963
|
+
* @returns {$protobuf.Writer} Writer
|
|
6964
|
+
*/
|
|
6965
|
+
MasternodeListResponse.encode = function encode(message, writer) {
|
|
6966
|
+
if (!writer)
|
|
6967
|
+
writer = $Writer.create();
|
|
6968
|
+
if (message.masternodeListDiff != null && Object.hasOwnProperty.call(message, "masternodeListDiff"))
|
|
6969
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.masternodeListDiff);
|
|
6970
|
+
return writer;
|
|
6971
|
+
};
|
|
6972
|
+
|
|
6973
|
+
/**
|
|
6974
|
+
* Encodes the specified MasternodeListResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.MasternodeListResponse.verify|verify} messages.
|
|
6975
|
+
* @function encodeDelimited
|
|
6976
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
6977
|
+
* @static
|
|
6978
|
+
* @param {org.dash.platform.dapi.v0.IMasternodeListResponse} message MasternodeListResponse message or plain object to encode
|
|
6979
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6980
|
+
* @returns {$protobuf.Writer} Writer
|
|
6981
|
+
*/
|
|
6982
|
+
MasternodeListResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6983
|
+
return this.encode(message, writer).ldelim();
|
|
6984
|
+
};
|
|
6985
|
+
|
|
6986
|
+
/**
|
|
6987
|
+
* Decodes a MasternodeListResponse message from the specified reader or buffer.
|
|
6988
|
+
* @function decode
|
|
6989
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
6990
|
+
* @static
|
|
6991
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6992
|
+
* @param {number} [length] Message length if known beforehand
|
|
6993
|
+
* @returns {org.dash.platform.dapi.v0.MasternodeListResponse} MasternodeListResponse
|
|
6994
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6995
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6996
|
+
*/
|
|
6997
|
+
MasternodeListResponse.decode = function decode(reader, length) {
|
|
6998
|
+
if (!(reader instanceof $Reader))
|
|
6999
|
+
reader = $Reader.create(reader);
|
|
7000
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.MasternodeListResponse();
|
|
7001
|
+
while (reader.pos < end) {
|
|
7002
|
+
var tag = reader.uint32();
|
|
7003
|
+
switch (tag >>> 3) {
|
|
7004
|
+
case 1:
|
|
7005
|
+
message.masternodeListDiff = reader.bytes();
|
|
7006
|
+
break;
|
|
7007
|
+
default:
|
|
7008
|
+
reader.skipType(tag & 7);
|
|
7009
|
+
break;
|
|
7010
|
+
}
|
|
7011
|
+
}
|
|
7012
|
+
return message;
|
|
7013
|
+
};
|
|
7014
|
+
|
|
7015
|
+
/**
|
|
7016
|
+
* Decodes a MasternodeListResponse message from the specified reader or buffer, length delimited.
|
|
7017
|
+
* @function decodeDelimited
|
|
7018
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
7019
|
+
* @static
|
|
7020
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7021
|
+
* @returns {org.dash.platform.dapi.v0.MasternodeListResponse} MasternodeListResponse
|
|
7022
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7023
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7024
|
+
*/
|
|
7025
|
+
MasternodeListResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
7026
|
+
if (!(reader instanceof $Reader))
|
|
7027
|
+
reader = new $Reader(reader);
|
|
7028
|
+
return this.decode(reader, reader.uint32());
|
|
7029
|
+
};
|
|
7030
|
+
|
|
7031
|
+
/**
|
|
7032
|
+
* Verifies a MasternodeListResponse message.
|
|
7033
|
+
* @function verify
|
|
7034
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
7035
|
+
* @static
|
|
7036
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
7037
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
7038
|
+
*/
|
|
7039
|
+
MasternodeListResponse.verify = function verify(message) {
|
|
7040
|
+
if (typeof message !== "object" || message === null)
|
|
7041
|
+
return "object expected";
|
|
7042
|
+
if (message.masternodeListDiff != null && message.hasOwnProperty("masternodeListDiff"))
|
|
7043
|
+
if (!(message.masternodeListDiff && typeof message.masternodeListDiff.length === "number" || $util.isString(message.masternodeListDiff)))
|
|
7044
|
+
return "masternodeListDiff: buffer expected";
|
|
7045
|
+
return null;
|
|
7046
|
+
};
|
|
7047
|
+
|
|
7048
|
+
/**
|
|
7049
|
+
* Creates a MasternodeListResponse message from a plain object. Also converts values to their respective internal types.
|
|
7050
|
+
* @function fromObject
|
|
7051
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
7052
|
+
* @static
|
|
7053
|
+
* @param {Object.<string,*>} object Plain object
|
|
7054
|
+
* @returns {org.dash.platform.dapi.v0.MasternodeListResponse} MasternodeListResponse
|
|
7055
|
+
*/
|
|
7056
|
+
MasternodeListResponse.fromObject = function fromObject(object) {
|
|
7057
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.MasternodeListResponse)
|
|
7058
|
+
return object;
|
|
7059
|
+
var message = new $root.org.dash.platform.dapi.v0.MasternodeListResponse();
|
|
7060
|
+
if (object.masternodeListDiff != null)
|
|
7061
|
+
if (typeof object.masternodeListDiff === "string")
|
|
7062
|
+
$util.base64.decode(object.masternodeListDiff, message.masternodeListDiff = $util.newBuffer($util.base64.length(object.masternodeListDiff)), 0);
|
|
7063
|
+
else if (object.masternodeListDiff.length >= 0)
|
|
7064
|
+
message.masternodeListDiff = object.masternodeListDiff;
|
|
7065
|
+
return message;
|
|
7066
|
+
};
|
|
7067
|
+
|
|
7068
|
+
/**
|
|
7069
|
+
* Creates a plain object from a MasternodeListResponse message. Also converts values to other types if specified.
|
|
7070
|
+
* @function toObject
|
|
7071
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
7072
|
+
* @static
|
|
7073
|
+
* @param {org.dash.platform.dapi.v0.MasternodeListResponse} message MasternodeListResponse
|
|
7074
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
7075
|
+
* @returns {Object.<string,*>} Plain object
|
|
7076
|
+
*/
|
|
7077
|
+
MasternodeListResponse.toObject = function toObject(message, options) {
|
|
7078
|
+
if (!options)
|
|
7079
|
+
options = {};
|
|
7080
|
+
var object = {};
|
|
7081
|
+
if (options.defaults)
|
|
7082
|
+
if (options.bytes === String)
|
|
7083
|
+
object.masternodeListDiff = "";
|
|
7084
|
+
else {
|
|
7085
|
+
object.masternodeListDiff = [];
|
|
7086
|
+
if (options.bytes !== Array)
|
|
7087
|
+
object.masternodeListDiff = $util.newBuffer(object.masternodeListDiff);
|
|
7088
|
+
}
|
|
7089
|
+
if (message.masternodeListDiff != null && message.hasOwnProperty("masternodeListDiff"))
|
|
7090
|
+
object.masternodeListDiff = options.bytes === String ? $util.base64.encode(message.masternodeListDiff, 0, message.masternodeListDiff.length) : options.bytes === Array ? Array.prototype.slice.call(message.masternodeListDiff) : message.masternodeListDiff;
|
|
7091
|
+
return object;
|
|
7092
|
+
};
|
|
7093
|
+
|
|
7094
|
+
/**
|
|
7095
|
+
* Converts this MasternodeListResponse to JSON.
|
|
7096
|
+
* @function toJSON
|
|
7097
|
+
* @memberof org.dash.platform.dapi.v0.MasternodeListResponse
|
|
7098
|
+
* @instance
|
|
7099
|
+
* @returns {Object.<string,*>} JSON object
|
|
7100
|
+
*/
|
|
7101
|
+
MasternodeListResponse.prototype.toJSON = function toJSON() {
|
|
7102
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
7103
|
+
};
|
|
7104
|
+
|
|
7105
|
+
return MasternodeListResponse;
|
|
7106
|
+
})();
|
|
7107
|
+
|
|
6173
7108
|
return v0;
|
|
6174
7109
|
})();
|
|
6175
7110
|
|