@dashevo/dapi-grpc 1.0.0-dev.15 → 1.0.0-dev.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +9 -7
- package/build.rs +57 -40
- package/clients/core/v0/nodejs/CorePromiseClient.js +73 -0
- package/clients/core/v0/nodejs/core_pbjs.js +783 -14
- package/clients/core/v0/nodejs/core_protoc.js +574 -0
- package/clients/core/v0/web/CorePromiseClient.js +30 -0
- package/clients/core/v0/web/core_pb.d.ts +74 -0
- package/clients/core/v0/web/core_pb.js +574 -0
- package/clients/core/v0/web/core_pb_service.d.ts +30 -0
- package/clients/core/v0/web/core_pb_service.js +88 -0
- package/package.json +2 -2
- package/protos/core/v0/core.proto +18 -0
- package/src/lib.rs +19 -2
- package/src/core/proto/org.dash.platform.dapi.v0.rs +0 -1338
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +0 -4060
|
@@ -185,6 +185,39 @@ $root.org = (function() {
|
|
|
185
185
|
* @variation 2
|
|
186
186
|
*/
|
|
187
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
|
+
|
|
188
221
|
/**
|
|
189
222
|
* Callback as used by {@link org.dash.platform.dapi.v0.Core#broadcastTransaction}.
|
|
190
223
|
* @memberof org.dash.platform.dapi.v0.Core
|
|
@@ -350,6 +383,39 @@ $root.org = (function() {
|
|
|
350
383
|
* @variation 2
|
|
351
384
|
*/
|
|
352
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
|
+
|
|
353
419
|
return Core;
|
|
354
420
|
})();
|
|
355
421
|
|
|
@@ -3033,35 +3099,382 @@ $root.org = (function() {
|
|
|
3033
3099
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3034
3100
|
* @returns {Object.<string,*>} Plain object
|
|
3035
3101
|
*/
|
|
3036
|
-
GetBlockResponse.toObject = function toObject(message, options) {
|
|
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
|
+
};
|
|
3118
|
+
|
|
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
|
+
};
|
|
3129
|
+
|
|
3130
|
+
return GetBlockResponse;
|
|
3131
|
+
})();
|
|
3132
|
+
|
|
3133
|
+
v0.GetBestBlockHeightRequest = (function() {
|
|
3134
|
+
|
|
3135
|
+
/**
|
|
3136
|
+
* Properties of a GetBestBlockHeightRequest.
|
|
3137
|
+
* @memberof org.dash.platform.dapi.v0
|
|
3138
|
+
* @interface IGetBestBlockHeightRequest
|
|
3139
|
+
*/
|
|
3140
|
+
|
|
3141
|
+
/**
|
|
3142
|
+
* Constructs a new GetBestBlockHeightRequest.
|
|
3143
|
+
* @memberof org.dash.platform.dapi.v0
|
|
3144
|
+
* @classdesc Represents a GetBestBlockHeightRequest.
|
|
3145
|
+
* @implements IGetBestBlockHeightRequest
|
|
3146
|
+
* @constructor
|
|
3147
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest=} [properties] Properties to set
|
|
3148
|
+
*/
|
|
3149
|
+
function GetBestBlockHeightRequest(properties) {
|
|
3150
|
+
if (properties)
|
|
3151
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3152
|
+
if (properties[keys[i]] != null)
|
|
3153
|
+
this[keys[i]] = properties[keys[i]];
|
|
3154
|
+
}
|
|
3155
|
+
|
|
3156
|
+
/**
|
|
3157
|
+
* Creates a new GetBestBlockHeightRequest instance using the specified properties.
|
|
3158
|
+
* @function create
|
|
3159
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3160
|
+
* @static
|
|
3161
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest=} [properties] Properties to set
|
|
3162
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} GetBestBlockHeightRequest instance
|
|
3163
|
+
*/
|
|
3164
|
+
GetBestBlockHeightRequest.create = function create(properties) {
|
|
3165
|
+
return new GetBestBlockHeightRequest(properties);
|
|
3166
|
+
};
|
|
3167
|
+
|
|
3168
|
+
/**
|
|
3169
|
+
* Encodes the specified GetBestBlockHeightRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBestBlockHeightRequest.verify|verify} messages.
|
|
3170
|
+
* @function encode
|
|
3171
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3172
|
+
* @static
|
|
3173
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest} message GetBestBlockHeightRequest message or plain object to encode
|
|
3174
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3175
|
+
* @returns {$protobuf.Writer} Writer
|
|
3176
|
+
*/
|
|
3177
|
+
GetBestBlockHeightRequest.encode = function encode(message, writer) {
|
|
3178
|
+
if (!writer)
|
|
3179
|
+
writer = $Writer.create();
|
|
3180
|
+
return writer;
|
|
3181
|
+
};
|
|
3182
|
+
|
|
3183
|
+
/**
|
|
3184
|
+
* Encodes the specified GetBestBlockHeightRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBestBlockHeightRequest.verify|verify} messages.
|
|
3185
|
+
* @function encodeDelimited
|
|
3186
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3187
|
+
* @static
|
|
3188
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightRequest} message GetBestBlockHeightRequest message or plain object to encode
|
|
3189
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3190
|
+
* @returns {$protobuf.Writer} Writer
|
|
3191
|
+
*/
|
|
3192
|
+
GetBestBlockHeightRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3193
|
+
return this.encode(message, writer).ldelim();
|
|
3194
|
+
};
|
|
3195
|
+
|
|
3196
|
+
/**
|
|
3197
|
+
* Decodes a GetBestBlockHeightRequest message from the specified reader or buffer.
|
|
3198
|
+
* @function decode
|
|
3199
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3200
|
+
* @static
|
|
3201
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3202
|
+
* @param {number} [length] Message length if known beforehand
|
|
3203
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} GetBestBlockHeightRequest
|
|
3204
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3205
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3206
|
+
*/
|
|
3207
|
+
GetBestBlockHeightRequest.decode = function decode(reader, length) {
|
|
3208
|
+
if (!(reader instanceof $Reader))
|
|
3209
|
+
reader = $Reader.create(reader);
|
|
3210
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBestBlockHeightRequest();
|
|
3211
|
+
while (reader.pos < end) {
|
|
3212
|
+
var tag = reader.uint32();
|
|
3213
|
+
switch (tag >>> 3) {
|
|
3214
|
+
default:
|
|
3215
|
+
reader.skipType(tag & 7);
|
|
3216
|
+
break;
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3219
|
+
return message;
|
|
3220
|
+
};
|
|
3221
|
+
|
|
3222
|
+
/**
|
|
3223
|
+
* Decodes a GetBestBlockHeightRequest message from the specified reader or buffer, length delimited.
|
|
3224
|
+
* @function decodeDelimited
|
|
3225
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3226
|
+
* @static
|
|
3227
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3228
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} GetBestBlockHeightRequest
|
|
3229
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3230
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3231
|
+
*/
|
|
3232
|
+
GetBestBlockHeightRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
3233
|
+
if (!(reader instanceof $Reader))
|
|
3234
|
+
reader = new $Reader(reader);
|
|
3235
|
+
return this.decode(reader, reader.uint32());
|
|
3236
|
+
};
|
|
3237
|
+
|
|
3238
|
+
/**
|
|
3239
|
+
* Verifies a GetBestBlockHeightRequest message.
|
|
3240
|
+
* @function verify
|
|
3241
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3242
|
+
* @static
|
|
3243
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3244
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3245
|
+
*/
|
|
3246
|
+
GetBestBlockHeightRequest.verify = function verify(message) {
|
|
3247
|
+
if (typeof message !== "object" || message === null)
|
|
3248
|
+
return "object expected";
|
|
3249
|
+
return null;
|
|
3250
|
+
};
|
|
3251
|
+
|
|
3252
|
+
/**
|
|
3253
|
+
* Creates a GetBestBlockHeightRequest message from a plain object. Also converts values to their respective internal types.
|
|
3254
|
+
* @function fromObject
|
|
3255
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3256
|
+
* @static
|
|
3257
|
+
* @param {Object.<string,*>} object Plain object
|
|
3258
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} GetBestBlockHeightRequest
|
|
3259
|
+
*/
|
|
3260
|
+
GetBestBlockHeightRequest.fromObject = function fromObject(object) {
|
|
3261
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBestBlockHeightRequest)
|
|
3262
|
+
return object;
|
|
3263
|
+
return new $root.org.dash.platform.dapi.v0.GetBestBlockHeightRequest();
|
|
3264
|
+
};
|
|
3265
|
+
|
|
3266
|
+
/**
|
|
3267
|
+
* Creates a plain object from a GetBestBlockHeightRequest message. Also converts values to other types if specified.
|
|
3268
|
+
* @function toObject
|
|
3269
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3270
|
+
* @static
|
|
3271
|
+
* @param {org.dash.platform.dapi.v0.GetBestBlockHeightRequest} message GetBestBlockHeightRequest
|
|
3272
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3273
|
+
* @returns {Object.<string,*>} Plain object
|
|
3274
|
+
*/
|
|
3275
|
+
GetBestBlockHeightRequest.toObject = function toObject() {
|
|
3276
|
+
return {};
|
|
3277
|
+
};
|
|
3278
|
+
|
|
3279
|
+
/**
|
|
3280
|
+
* Converts this GetBestBlockHeightRequest to JSON.
|
|
3281
|
+
* @function toJSON
|
|
3282
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightRequest
|
|
3283
|
+
* @instance
|
|
3284
|
+
* @returns {Object.<string,*>} JSON object
|
|
3285
|
+
*/
|
|
3286
|
+
GetBestBlockHeightRequest.prototype.toJSON = function toJSON() {
|
|
3287
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3288
|
+
};
|
|
3289
|
+
|
|
3290
|
+
return GetBestBlockHeightRequest;
|
|
3291
|
+
})();
|
|
3292
|
+
|
|
3293
|
+
v0.GetBestBlockHeightResponse = (function() {
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* Properties of a GetBestBlockHeightResponse.
|
|
3297
|
+
* @memberof org.dash.platform.dapi.v0
|
|
3298
|
+
* @interface IGetBestBlockHeightResponse
|
|
3299
|
+
* @property {number|null} [height] GetBestBlockHeightResponse height
|
|
3300
|
+
*/
|
|
3301
|
+
|
|
3302
|
+
/**
|
|
3303
|
+
* Constructs a new GetBestBlockHeightResponse.
|
|
3304
|
+
* @memberof org.dash.platform.dapi.v0
|
|
3305
|
+
* @classdesc Represents a GetBestBlockHeightResponse.
|
|
3306
|
+
* @implements IGetBestBlockHeightResponse
|
|
3307
|
+
* @constructor
|
|
3308
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightResponse=} [properties] Properties to set
|
|
3309
|
+
*/
|
|
3310
|
+
function GetBestBlockHeightResponse(properties) {
|
|
3311
|
+
if (properties)
|
|
3312
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3313
|
+
if (properties[keys[i]] != null)
|
|
3314
|
+
this[keys[i]] = properties[keys[i]];
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
/**
|
|
3318
|
+
* GetBestBlockHeightResponse height.
|
|
3319
|
+
* @member {number} height
|
|
3320
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3321
|
+
* @instance
|
|
3322
|
+
*/
|
|
3323
|
+
GetBestBlockHeightResponse.prototype.height = 0;
|
|
3324
|
+
|
|
3325
|
+
/**
|
|
3326
|
+
* Creates a new GetBestBlockHeightResponse instance using the specified properties.
|
|
3327
|
+
* @function create
|
|
3328
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3329
|
+
* @static
|
|
3330
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightResponse=} [properties] Properties to set
|
|
3331
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} GetBestBlockHeightResponse instance
|
|
3332
|
+
*/
|
|
3333
|
+
GetBestBlockHeightResponse.create = function create(properties) {
|
|
3334
|
+
return new GetBestBlockHeightResponse(properties);
|
|
3335
|
+
};
|
|
3336
|
+
|
|
3337
|
+
/**
|
|
3338
|
+
* Encodes the specified GetBestBlockHeightResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetBestBlockHeightResponse.verify|verify} messages.
|
|
3339
|
+
* @function encode
|
|
3340
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3341
|
+
* @static
|
|
3342
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightResponse} message GetBestBlockHeightResponse message or plain object to encode
|
|
3343
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3344
|
+
* @returns {$protobuf.Writer} Writer
|
|
3345
|
+
*/
|
|
3346
|
+
GetBestBlockHeightResponse.encode = function encode(message, writer) {
|
|
3347
|
+
if (!writer)
|
|
3348
|
+
writer = $Writer.create();
|
|
3349
|
+
if (message.height != null && Object.hasOwnProperty.call(message, "height"))
|
|
3350
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.height);
|
|
3351
|
+
return writer;
|
|
3352
|
+
};
|
|
3353
|
+
|
|
3354
|
+
/**
|
|
3355
|
+
* Encodes the specified GetBestBlockHeightResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetBestBlockHeightResponse.verify|verify} messages.
|
|
3356
|
+
* @function encodeDelimited
|
|
3357
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3358
|
+
* @static
|
|
3359
|
+
* @param {org.dash.platform.dapi.v0.IGetBestBlockHeightResponse} message GetBestBlockHeightResponse message or plain object to encode
|
|
3360
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3361
|
+
* @returns {$protobuf.Writer} Writer
|
|
3362
|
+
*/
|
|
3363
|
+
GetBestBlockHeightResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3364
|
+
return this.encode(message, writer).ldelim();
|
|
3365
|
+
};
|
|
3366
|
+
|
|
3367
|
+
/**
|
|
3368
|
+
* Decodes a GetBestBlockHeightResponse message from the specified reader or buffer.
|
|
3369
|
+
* @function decode
|
|
3370
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3371
|
+
* @static
|
|
3372
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3373
|
+
* @param {number} [length] Message length if known beforehand
|
|
3374
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} GetBestBlockHeightResponse
|
|
3375
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3376
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3377
|
+
*/
|
|
3378
|
+
GetBestBlockHeightResponse.decode = function decode(reader, length) {
|
|
3379
|
+
if (!(reader instanceof $Reader))
|
|
3380
|
+
reader = $Reader.create(reader);
|
|
3381
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetBestBlockHeightResponse();
|
|
3382
|
+
while (reader.pos < end) {
|
|
3383
|
+
var tag = reader.uint32();
|
|
3384
|
+
switch (tag >>> 3) {
|
|
3385
|
+
case 1:
|
|
3386
|
+
message.height = reader.uint32();
|
|
3387
|
+
break;
|
|
3388
|
+
default:
|
|
3389
|
+
reader.skipType(tag & 7);
|
|
3390
|
+
break;
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
return message;
|
|
3394
|
+
};
|
|
3395
|
+
|
|
3396
|
+
/**
|
|
3397
|
+
* Decodes a GetBestBlockHeightResponse message from the specified reader or buffer, length delimited.
|
|
3398
|
+
* @function decodeDelimited
|
|
3399
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3400
|
+
* @static
|
|
3401
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3402
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} GetBestBlockHeightResponse
|
|
3403
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3404
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3405
|
+
*/
|
|
3406
|
+
GetBestBlockHeightResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
3407
|
+
if (!(reader instanceof $Reader))
|
|
3408
|
+
reader = new $Reader(reader);
|
|
3409
|
+
return this.decode(reader, reader.uint32());
|
|
3410
|
+
};
|
|
3411
|
+
|
|
3412
|
+
/**
|
|
3413
|
+
* Verifies a GetBestBlockHeightResponse message.
|
|
3414
|
+
* @function verify
|
|
3415
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3416
|
+
* @static
|
|
3417
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3418
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3419
|
+
*/
|
|
3420
|
+
GetBestBlockHeightResponse.verify = function verify(message) {
|
|
3421
|
+
if (typeof message !== "object" || message === null)
|
|
3422
|
+
return "object expected";
|
|
3423
|
+
if (message.height != null && message.hasOwnProperty("height"))
|
|
3424
|
+
if (!$util.isInteger(message.height))
|
|
3425
|
+
return "height: integer expected";
|
|
3426
|
+
return null;
|
|
3427
|
+
};
|
|
3428
|
+
|
|
3429
|
+
/**
|
|
3430
|
+
* Creates a GetBestBlockHeightResponse message from a plain object. Also converts values to their respective internal types.
|
|
3431
|
+
* @function fromObject
|
|
3432
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3433
|
+
* @static
|
|
3434
|
+
* @param {Object.<string,*>} object Plain object
|
|
3435
|
+
* @returns {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} GetBestBlockHeightResponse
|
|
3436
|
+
*/
|
|
3437
|
+
GetBestBlockHeightResponse.fromObject = function fromObject(object) {
|
|
3438
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetBestBlockHeightResponse)
|
|
3439
|
+
return object;
|
|
3440
|
+
var message = new $root.org.dash.platform.dapi.v0.GetBestBlockHeightResponse();
|
|
3441
|
+
if (object.height != null)
|
|
3442
|
+
message.height = object.height >>> 0;
|
|
3443
|
+
return message;
|
|
3444
|
+
};
|
|
3445
|
+
|
|
3446
|
+
/**
|
|
3447
|
+
* Creates a plain object from a GetBestBlockHeightResponse message. Also converts values to other types if specified.
|
|
3448
|
+
* @function toObject
|
|
3449
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3450
|
+
* @static
|
|
3451
|
+
* @param {org.dash.platform.dapi.v0.GetBestBlockHeightResponse} message GetBestBlockHeightResponse
|
|
3452
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3453
|
+
* @returns {Object.<string,*>} Plain object
|
|
3454
|
+
*/
|
|
3455
|
+
GetBestBlockHeightResponse.toObject = function toObject(message, options) {
|
|
3037
3456
|
if (!options)
|
|
3038
3457
|
options = {};
|
|
3039
3458
|
var object = {};
|
|
3040
3459
|
if (options.defaults)
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
object.block = [];
|
|
3045
|
-
if (options.bytes !== Array)
|
|
3046
|
-
object.block = $util.newBuffer(object.block);
|
|
3047
|
-
}
|
|
3048
|
-
if (message.block != null && message.hasOwnProperty("block"))
|
|
3049
|
-
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;
|
|
3050
3463
|
return object;
|
|
3051
3464
|
};
|
|
3052
3465
|
|
|
3053
3466
|
/**
|
|
3054
|
-
* Converts this
|
|
3467
|
+
* Converts this GetBestBlockHeightResponse to JSON.
|
|
3055
3468
|
* @function toJSON
|
|
3056
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
3469
|
+
* @memberof org.dash.platform.dapi.v0.GetBestBlockHeightResponse
|
|
3057
3470
|
* @instance
|
|
3058
3471
|
* @returns {Object.<string,*>} JSON object
|
|
3059
3472
|
*/
|
|
3060
|
-
|
|
3473
|
+
GetBestBlockHeightResponse.prototype.toJSON = function toJSON() {
|
|
3061
3474
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3062
3475
|
};
|
|
3063
3476
|
|
|
3064
|
-
return
|
|
3477
|
+
return GetBestBlockHeightResponse;
|
|
3065
3478
|
})();
|
|
3066
3479
|
|
|
3067
3480
|
v0.BroadcastTransactionRequest = (function() {
|
|
@@ -6336,6 +6749,362 @@ $root.org = (function() {
|
|
|
6336
6749
|
return InstantSendLockMessages;
|
|
6337
6750
|
})();
|
|
6338
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
|
+
|
|
6339
7108
|
return v0;
|
|
6340
7109
|
})();
|
|
6341
7110
|
|