@dashevo/dapi-grpc 0.23.0-dev.1 → 0.23.0-dev.4
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/README.md +2 -3
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +0 -40
- package/clients/platform/v0/nodejs/platform_pbjs.js +0 -524
- package/clients/platform/v0/nodejs/platform_protoc.js +0 -536
- package/clients/platform/v0/web/platform_grpc_web_pb.js +0 -61
- package/clients/platform/v0/web/platform_pb.js +0 -536
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +0 -12
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# DAPI GRPC
|
|
2
2
|
|
|
3
|
-
[](https://github.com/dashevo/platform/actions/workflows/release.yml)
|
|
4
4
|
[](https://npmjs.org/package/@dashevo/dapi-grpc)
|
|
5
|
-
[](https://github.com/dashevo/platform/releases/latest)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
Decentralized API GRPC definition files and generated clients
|
|
@@ -125,7 +125,6 @@ Available methods :
|
|
|
125
125
|
- getDataContract
|
|
126
126
|
- getDocuments
|
|
127
127
|
- getIdentitiesByPublicKeyHashes
|
|
128
|
-
- getIdentityIdsByPublicKeyHashes
|
|
129
128
|
- waitForStateTransitionResult
|
|
130
129
|
- getConsensusParams
|
|
131
130
|
- setProtocolVersion
|
|
@@ -33,8 +33,6 @@ const {
|
|
|
33
33
|
GetDocumentsResponse: PBJSGetDocumentsResponse,
|
|
34
34
|
GetIdentitiesByPublicKeyHashesRequest: PBJSGetIdentitiesByPublicKeyHashesRequest,
|
|
35
35
|
GetIdentitiesByPublicKeyHashesResponse: PBJSGetIdentitiesByPublicKeyHashesResponse,
|
|
36
|
-
GetIdentityIdsByPublicKeyHashesRequest: PBJSGetIdentityIdsByPublicKeyHashesRequest,
|
|
37
|
-
GetIdentityIdsByPublicKeyHashesResponse: PBJSGetIdentityIdsByPublicKeyHashesResponse,
|
|
38
36
|
WaitForStateTransitionResultRequest: PBJSWaitForStateTransitionResultRequest,
|
|
39
37
|
WaitForStateTransitionResultResponse: PBJSWaitForStateTransitionResultResponse,
|
|
40
38
|
GetConsensusParamsRequest: PBJSGetConsensusParamsRequest,
|
|
@@ -52,7 +50,6 @@ const {
|
|
|
52
50
|
GetDataContractResponse: ProtocGetDataContractResponse,
|
|
53
51
|
GetDocumentsResponse: ProtocGetDocumentsResponse,
|
|
54
52
|
GetIdentitiesByPublicKeyHashesResponse: ProtocGetIdentitiesByPublicKeyHashesResponse,
|
|
55
|
-
GetIdentityIdsByPublicKeyHashesResponse: ProtocGetIdentityIdsByPublicKeyHashesResponse,
|
|
56
53
|
WaitForStateTransitionResultResponse: ProtocWaitForStateTransitionResultResponse,
|
|
57
54
|
GetConsensusParamsResponse: ProtocGetConsensusParamsResponse,
|
|
58
55
|
} = require('./platform_protoc');
|
|
@@ -93,10 +90,6 @@ class PlatformPromiseClient {
|
|
|
93
90
|
this.client.getIdentitiesByPublicKeyHashes.bind(this.client),
|
|
94
91
|
);
|
|
95
92
|
|
|
96
|
-
this.client.getIdentityIdsByPublicKeyHashes = promisify(
|
|
97
|
-
this.client.getIdentityIdsByPublicKeyHashes.bind(this.client),
|
|
98
|
-
);
|
|
99
|
-
|
|
100
93
|
this.client.waitForStateTransitionResult = promisify(
|
|
101
94
|
this.client.waitForStateTransitionResult.bind(this.client),
|
|
102
95
|
);
|
|
@@ -267,39 +260,6 @@ class PlatformPromiseClient {
|
|
|
267
260
|
);
|
|
268
261
|
}
|
|
269
262
|
|
|
270
|
-
/**
|
|
271
|
-
* @param {!GetIdentityIdsByPublicKeyHashesRequest} getIdentityIdsByPublicKeyHashesRequest
|
|
272
|
-
* @param {?Object<string, string>} metadata
|
|
273
|
-
* @param {CallOptions} [options={}]
|
|
274
|
-
* @returns {Promise<!GetIdentityIdsByPublicKeyHashesResponse>}
|
|
275
|
-
*/
|
|
276
|
-
getIdentityIdsByPublicKeyHashes(
|
|
277
|
-
getIdentityIdsByPublicKeyHashesRequest, metadata = {}, options = {},
|
|
278
|
-
) {
|
|
279
|
-
if (!isObject(metadata)) {
|
|
280
|
-
throw new Error('metadata must be an object');
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
return this.client.getIdentityIdsByPublicKeyHashes(
|
|
284
|
-
getIdentityIdsByPublicKeyHashesRequest,
|
|
285
|
-
convertObjectToMetadata(metadata),
|
|
286
|
-
{
|
|
287
|
-
interceptors: [
|
|
288
|
-
jsonToProtobufInterceptorFactory(
|
|
289
|
-
jsonToProtobufFactory(
|
|
290
|
-
ProtocGetIdentityIdsByPublicKeyHashesResponse,
|
|
291
|
-
PBJSGetIdentityIdsByPublicKeyHashesResponse,
|
|
292
|
-
),
|
|
293
|
-
protobufToJsonFactory(
|
|
294
|
-
PBJSGetIdentityIdsByPublicKeyHashesRequest,
|
|
295
|
-
),
|
|
296
|
-
),
|
|
297
|
-
],
|
|
298
|
-
...options,
|
|
299
|
-
},
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
263
|
/**
|
|
304
264
|
* @param {!WaitForStateTransitionResultRequest} waitForStateTransitionResultRequest
|
|
305
265
|
* @param {?Object<string, string>} metadata
|
|
@@ -251,39 +251,6 @@ $root.org = (function() {
|
|
|
251
251
|
* @variation 2
|
|
252
252
|
*/
|
|
253
253
|
|
|
254
|
-
/**
|
|
255
|
-
* Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentityIdsByPublicKeyHashes}.
|
|
256
|
-
* @memberof org.dash.platform.dapi.v0.Platform
|
|
257
|
-
* @typedef getIdentityIdsByPublicKeyHashesCallback
|
|
258
|
-
* @type {function}
|
|
259
|
-
* @param {Error|null} error Error, if any
|
|
260
|
-
* @param {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse} [response] GetIdentityIdsByPublicKeyHashesResponse
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Calls getIdentityIdsByPublicKeyHashes.
|
|
265
|
-
* @function getIdentityIdsByPublicKeyHashes
|
|
266
|
-
* @memberof org.dash.platform.dapi.v0.Platform
|
|
267
|
-
* @instance
|
|
268
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesRequest} request GetIdentityIdsByPublicKeyHashesRequest message or plain object
|
|
269
|
-
* @param {org.dash.platform.dapi.v0.Platform.getIdentityIdsByPublicKeyHashesCallback} callback Node-style callback called with the error, if any, and GetIdentityIdsByPublicKeyHashesResponse
|
|
270
|
-
* @returns {undefined}
|
|
271
|
-
* @variation 1
|
|
272
|
-
*/
|
|
273
|
-
Object.defineProperty(Platform.prototype.getIdentityIdsByPublicKeyHashes = function getIdentityIdsByPublicKeyHashes(request, callback) {
|
|
274
|
-
return this.rpcCall(getIdentityIdsByPublicKeyHashes, $root.org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest, $root.org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse, request, callback);
|
|
275
|
-
}, "name", { value: "getIdentityIdsByPublicKeyHashes" });
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Calls getIdentityIdsByPublicKeyHashes.
|
|
279
|
-
* @function getIdentityIdsByPublicKeyHashes
|
|
280
|
-
* @memberof org.dash.platform.dapi.v0.Platform
|
|
281
|
-
* @instance
|
|
282
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesRequest} request GetIdentityIdsByPublicKeyHashesRequest message or plain object
|
|
283
|
-
* @returns {Promise<org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse>} Promise
|
|
284
|
-
* @variation 2
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
254
|
/**
|
|
288
255
|
* Callback as used by {@link org.dash.platform.dapi.v0.Platform#waitForStateTransitionResult}.
|
|
289
256
|
* @memberof org.dash.platform.dapi.v0.Platform
|
|
@@ -3526,497 +3493,6 @@ $root.org = (function() {
|
|
|
3526
3493
|
return GetIdentitiesByPublicKeyHashesResponse;
|
|
3527
3494
|
})();
|
|
3528
3495
|
|
|
3529
|
-
v0.GetIdentityIdsByPublicKeyHashesRequest = (function() {
|
|
3530
|
-
|
|
3531
|
-
/**
|
|
3532
|
-
* Properties of a GetIdentityIdsByPublicKeyHashesRequest.
|
|
3533
|
-
* @memberof org.dash.platform.dapi.v0
|
|
3534
|
-
* @interface IGetIdentityIdsByPublicKeyHashesRequest
|
|
3535
|
-
* @property {Array.<Uint8Array>|null} [publicKeyHashes] GetIdentityIdsByPublicKeyHashesRequest publicKeyHashes
|
|
3536
|
-
* @property {boolean|null} [prove] GetIdentityIdsByPublicKeyHashesRequest prove
|
|
3537
|
-
*/
|
|
3538
|
-
|
|
3539
|
-
/**
|
|
3540
|
-
* Constructs a new GetIdentityIdsByPublicKeyHashesRequest.
|
|
3541
|
-
* @memberof org.dash.platform.dapi.v0
|
|
3542
|
-
* @classdesc Represents a GetIdentityIdsByPublicKeyHashesRequest.
|
|
3543
|
-
* @implements IGetIdentityIdsByPublicKeyHashesRequest
|
|
3544
|
-
* @constructor
|
|
3545
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesRequest=} [properties] Properties to set
|
|
3546
|
-
*/
|
|
3547
|
-
function GetIdentityIdsByPublicKeyHashesRequest(properties) {
|
|
3548
|
-
this.publicKeyHashes = [];
|
|
3549
|
-
if (properties)
|
|
3550
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3551
|
-
if (properties[keys[i]] != null)
|
|
3552
|
-
this[keys[i]] = properties[keys[i]];
|
|
3553
|
-
}
|
|
3554
|
-
|
|
3555
|
-
/**
|
|
3556
|
-
* GetIdentityIdsByPublicKeyHashesRequest publicKeyHashes.
|
|
3557
|
-
* @member {Array.<Uint8Array>} publicKeyHashes
|
|
3558
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3559
|
-
* @instance
|
|
3560
|
-
*/
|
|
3561
|
-
GetIdentityIdsByPublicKeyHashesRequest.prototype.publicKeyHashes = $util.emptyArray;
|
|
3562
|
-
|
|
3563
|
-
/**
|
|
3564
|
-
* GetIdentityIdsByPublicKeyHashesRequest prove.
|
|
3565
|
-
* @member {boolean} prove
|
|
3566
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3567
|
-
* @instance
|
|
3568
|
-
*/
|
|
3569
|
-
GetIdentityIdsByPublicKeyHashesRequest.prototype.prove = false;
|
|
3570
|
-
|
|
3571
|
-
/**
|
|
3572
|
-
* Creates a new GetIdentityIdsByPublicKeyHashesRequest instance using the specified properties.
|
|
3573
|
-
* @function create
|
|
3574
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3575
|
-
* @static
|
|
3576
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesRequest=} [properties] Properties to set
|
|
3577
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest} GetIdentityIdsByPublicKeyHashesRequest instance
|
|
3578
|
-
*/
|
|
3579
|
-
GetIdentityIdsByPublicKeyHashesRequest.create = function create(properties) {
|
|
3580
|
-
return new GetIdentityIdsByPublicKeyHashesRequest(properties);
|
|
3581
|
-
};
|
|
3582
|
-
|
|
3583
|
-
/**
|
|
3584
|
-
* Encodes the specified GetIdentityIdsByPublicKeyHashesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest.verify|verify} messages.
|
|
3585
|
-
* @function encode
|
|
3586
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3587
|
-
* @static
|
|
3588
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesRequest} message GetIdentityIdsByPublicKeyHashesRequest message or plain object to encode
|
|
3589
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3590
|
-
* @returns {$protobuf.Writer} Writer
|
|
3591
|
-
*/
|
|
3592
|
-
GetIdentityIdsByPublicKeyHashesRequest.encode = function encode(message, writer) {
|
|
3593
|
-
if (!writer)
|
|
3594
|
-
writer = $Writer.create();
|
|
3595
|
-
if (message.publicKeyHashes != null && message.publicKeyHashes.length)
|
|
3596
|
-
for (var i = 0; i < message.publicKeyHashes.length; ++i)
|
|
3597
|
-
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeyHashes[i]);
|
|
3598
|
-
if (message.prove != null && Object.hasOwnProperty.call(message, "prove"))
|
|
3599
|
-
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove);
|
|
3600
|
-
return writer;
|
|
3601
|
-
};
|
|
3602
|
-
|
|
3603
|
-
/**
|
|
3604
|
-
* Encodes the specified GetIdentityIdsByPublicKeyHashesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest.verify|verify} messages.
|
|
3605
|
-
* @function encodeDelimited
|
|
3606
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3607
|
-
* @static
|
|
3608
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesRequest} message GetIdentityIdsByPublicKeyHashesRequest message or plain object to encode
|
|
3609
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3610
|
-
* @returns {$protobuf.Writer} Writer
|
|
3611
|
-
*/
|
|
3612
|
-
GetIdentityIdsByPublicKeyHashesRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3613
|
-
return this.encode(message, writer).ldelim();
|
|
3614
|
-
};
|
|
3615
|
-
|
|
3616
|
-
/**
|
|
3617
|
-
* Decodes a GetIdentityIdsByPublicKeyHashesRequest message from the specified reader or buffer.
|
|
3618
|
-
* @function decode
|
|
3619
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3620
|
-
* @static
|
|
3621
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3622
|
-
* @param {number} [length] Message length if known beforehand
|
|
3623
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest} GetIdentityIdsByPublicKeyHashesRequest
|
|
3624
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3625
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3626
|
-
*/
|
|
3627
|
-
GetIdentityIdsByPublicKeyHashesRequest.decode = function decode(reader, length) {
|
|
3628
|
-
if (!(reader instanceof $Reader))
|
|
3629
|
-
reader = $Reader.create(reader);
|
|
3630
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest();
|
|
3631
|
-
while (reader.pos < end) {
|
|
3632
|
-
var tag = reader.uint32();
|
|
3633
|
-
switch (tag >>> 3) {
|
|
3634
|
-
case 1:
|
|
3635
|
-
if (!(message.publicKeyHashes && message.publicKeyHashes.length))
|
|
3636
|
-
message.publicKeyHashes = [];
|
|
3637
|
-
message.publicKeyHashes.push(reader.bytes());
|
|
3638
|
-
break;
|
|
3639
|
-
case 2:
|
|
3640
|
-
message.prove = reader.bool();
|
|
3641
|
-
break;
|
|
3642
|
-
default:
|
|
3643
|
-
reader.skipType(tag & 7);
|
|
3644
|
-
break;
|
|
3645
|
-
}
|
|
3646
|
-
}
|
|
3647
|
-
return message;
|
|
3648
|
-
};
|
|
3649
|
-
|
|
3650
|
-
/**
|
|
3651
|
-
* Decodes a GetIdentityIdsByPublicKeyHashesRequest message from the specified reader or buffer, length delimited.
|
|
3652
|
-
* @function decodeDelimited
|
|
3653
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3654
|
-
* @static
|
|
3655
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3656
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest} GetIdentityIdsByPublicKeyHashesRequest
|
|
3657
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3658
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3659
|
-
*/
|
|
3660
|
-
GetIdentityIdsByPublicKeyHashesRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
3661
|
-
if (!(reader instanceof $Reader))
|
|
3662
|
-
reader = new $Reader(reader);
|
|
3663
|
-
return this.decode(reader, reader.uint32());
|
|
3664
|
-
};
|
|
3665
|
-
|
|
3666
|
-
/**
|
|
3667
|
-
* Verifies a GetIdentityIdsByPublicKeyHashesRequest message.
|
|
3668
|
-
* @function verify
|
|
3669
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3670
|
-
* @static
|
|
3671
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
3672
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3673
|
-
*/
|
|
3674
|
-
GetIdentityIdsByPublicKeyHashesRequest.verify = function verify(message) {
|
|
3675
|
-
if (typeof message !== "object" || message === null)
|
|
3676
|
-
return "object expected";
|
|
3677
|
-
if (message.publicKeyHashes != null && message.hasOwnProperty("publicKeyHashes")) {
|
|
3678
|
-
if (!Array.isArray(message.publicKeyHashes))
|
|
3679
|
-
return "publicKeyHashes: array expected";
|
|
3680
|
-
for (var i = 0; i < message.publicKeyHashes.length; ++i)
|
|
3681
|
-
if (!(message.publicKeyHashes[i] && typeof message.publicKeyHashes[i].length === "number" || $util.isString(message.publicKeyHashes[i])))
|
|
3682
|
-
return "publicKeyHashes: buffer[] expected";
|
|
3683
|
-
}
|
|
3684
|
-
if (message.prove != null && message.hasOwnProperty("prove"))
|
|
3685
|
-
if (typeof message.prove !== "boolean")
|
|
3686
|
-
return "prove: boolean expected";
|
|
3687
|
-
return null;
|
|
3688
|
-
};
|
|
3689
|
-
|
|
3690
|
-
/**
|
|
3691
|
-
* Creates a GetIdentityIdsByPublicKeyHashesRequest message from a plain object. Also converts values to their respective internal types.
|
|
3692
|
-
* @function fromObject
|
|
3693
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3694
|
-
* @static
|
|
3695
|
-
* @param {Object.<string,*>} object Plain object
|
|
3696
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest} GetIdentityIdsByPublicKeyHashesRequest
|
|
3697
|
-
*/
|
|
3698
|
-
GetIdentityIdsByPublicKeyHashesRequest.fromObject = function fromObject(object) {
|
|
3699
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest)
|
|
3700
|
-
return object;
|
|
3701
|
-
var message = new $root.org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest();
|
|
3702
|
-
if (object.publicKeyHashes) {
|
|
3703
|
-
if (!Array.isArray(object.publicKeyHashes))
|
|
3704
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest.publicKeyHashes: array expected");
|
|
3705
|
-
message.publicKeyHashes = [];
|
|
3706
|
-
for (var i = 0; i < object.publicKeyHashes.length; ++i)
|
|
3707
|
-
if (typeof object.publicKeyHashes[i] === "string")
|
|
3708
|
-
$util.base64.decode(object.publicKeyHashes[i], message.publicKeyHashes[i] = $util.newBuffer($util.base64.length(object.publicKeyHashes[i])), 0);
|
|
3709
|
-
else if (object.publicKeyHashes[i].length >= 0)
|
|
3710
|
-
message.publicKeyHashes[i] = object.publicKeyHashes[i];
|
|
3711
|
-
}
|
|
3712
|
-
if (object.prove != null)
|
|
3713
|
-
message.prove = Boolean(object.prove);
|
|
3714
|
-
return message;
|
|
3715
|
-
};
|
|
3716
|
-
|
|
3717
|
-
/**
|
|
3718
|
-
* Creates a plain object from a GetIdentityIdsByPublicKeyHashesRequest message. Also converts values to other types if specified.
|
|
3719
|
-
* @function toObject
|
|
3720
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3721
|
-
* @static
|
|
3722
|
-
* @param {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest} message GetIdentityIdsByPublicKeyHashesRequest
|
|
3723
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3724
|
-
* @returns {Object.<string,*>} Plain object
|
|
3725
|
-
*/
|
|
3726
|
-
GetIdentityIdsByPublicKeyHashesRequest.toObject = function toObject(message, options) {
|
|
3727
|
-
if (!options)
|
|
3728
|
-
options = {};
|
|
3729
|
-
var object = {};
|
|
3730
|
-
if (options.arrays || options.defaults)
|
|
3731
|
-
object.publicKeyHashes = [];
|
|
3732
|
-
if (options.defaults)
|
|
3733
|
-
object.prove = false;
|
|
3734
|
-
if (message.publicKeyHashes && message.publicKeyHashes.length) {
|
|
3735
|
-
object.publicKeyHashes = [];
|
|
3736
|
-
for (var j = 0; j < message.publicKeyHashes.length; ++j)
|
|
3737
|
-
object.publicKeyHashes[j] = options.bytes === String ? $util.base64.encode(message.publicKeyHashes[j], 0, message.publicKeyHashes[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeyHashes[j]) : message.publicKeyHashes[j];
|
|
3738
|
-
}
|
|
3739
|
-
if (message.prove != null && message.hasOwnProperty("prove"))
|
|
3740
|
-
object.prove = message.prove;
|
|
3741
|
-
return object;
|
|
3742
|
-
};
|
|
3743
|
-
|
|
3744
|
-
/**
|
|
3745
|
-
* Converts this GetIdentityIdsByPublicKeyHashesRequest to JSON.
|
|
3746
|
-
* @function toJSON
|
|
3747
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesRequest
|
|
3748
|
-
* @instance
|
|
3749
|
-
* @returns {Object.<string,*>} JSON object
|
|
3750
|
-
*/
|
|
3751
|
-
GetIdentityIdsByPublicKeyHashesRequest.prototype.toJSON = function toJSON() {
|
|
3752
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3753
|
-
};
|
|
3754
|
-
|
|
3755
|
-
return GetIdentityIdsByPublicKeyHashesRequest;
|
|
3756
|
-
})();
|
|
3757
|
-
|
|
3758
|
-
v0.GetIdentityIdsByPublicKeyHashesResponse = (function() {
|
|
3759
|
-
|
|
3760
|
-
/**
|
|
3761
|
-
* Properties of a GetIdentityIdsByPublicKeyHashesResponse.
|
|
3762
|
-
* @memberof org.dash.platform.dapi.v0
|
|
3763
|
-
* @interface IGetIdentityIdsByPublicKeyHashesResponse
|
|
3764
|
-
* @property {Array.<Uint8Array>|null} [identityIds] GetIdentityIdsByPublicKeyHashesResponse identityIds
|
|
3765
|
-
* @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentityIdsByPublicKeyHashesResponse proof
|
|
3766
|
-
* @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentityIdsByPublicKeyHashesResponse metadata
|
|
3767
|
-
*/
|
|
3768
|
-
|
|
3769
|
-
/**
|
|
3770
|
-
* Constructs a new GetIdentityIdsByPublicKeyHashesResponse.
|
|
3771
|
-
* @memberof org.dash.platform.dapi.v0
|
|
3772
|
-
* @classdesc Represents a GetIdentityIdsByPublicKeyHashesResponse.
|
|
3773
|
-
* @implements IGetIdentityIdsByPublicKeyHashesResponse
|
|
3774
|
-
* @constructor
|
|
3775
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesResponse=} [properties] Properties to set
|
|
3776
|
-
*/
|
|
3777
|
-
function GetIdentityIdsByPublicKeyHashesResponse(properties) {
|
|
3778
|
-
this.identityIds = [];
|
|
3779
|
-
if (properties)
|
|
3780
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3781
|
-
if (properties[keys[i]] != null)
|
|
3782
|
-
this[keys[i]] = properties[keys[i]];
|
|
3783
|
-
}
|
|
3784
|
-
|
|
3785
|
-
/**
|
|
3786
|
-
* GetIdentityIdsByPublicKeyHashesResponse identityIds.
|
|
3787
|
-
* @member {Array.<Uint8Array>} identityIds
|
|
3788
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3789
|
-
* @instance
|
|
3790
|
-
*/
|
|
3791
|
-
GetIdentityIdsByPublicKeyHashesResponse.prototype.identityIds = $util.emptyArray;
|
|
3792
|
-
|
|
3793
|
-
/**
|
|
3794
|
-
* GetIdentityIdsByPublicKeyHashesResponse proof.
|
|
3795
|
-
* @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof
|
|
3796
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3797
|
-
* @instance
|
|
3798
|
-
*/
|
|
3799
|
-
GetIdentityIdsByPublicKeyHashesResponse.prototype.proof = null;
|
|
3800
|
-
|
|
3801
|
-
/**
|
|
3802
|
-
* GetIdentityIdsByPublicKeyHashesResponse metadata.
|
|
3803
|
-
* @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata
|
|
3804
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3805
|
-
* @instance
|
|
3806
|
-
*/
|
|
3807
|
-
GetIdentityIdsByPublicKeyHashesResponse.prototype.metadata = null;
|
|
3808
|
-
|
|
3809
|
-
/**
|
|
3810
|
-
* Creates a new GetIdentityIdsByPublicKeyHashesResponse instance using the specified properties.
|
|
3811
|
-
* @function create
|
|
3812
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3813
|
-
* @static
|
|
3814
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesResponse=} [properties] Properties to set
|
|
3815
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse} GetIdentityIdsByPublicKeyHashesResponse instance
|
|
3816
|
-
*/
|
|
3817
|
-
GetIdentityIdsByPublicKeyHashesResponse.create = function create(properties) {
|
|
3818
|
-
return new GetIdentityIdsByPublicKeyHashesResponse(properties);
|
|
3819
|
-
};
|
|
3820
|
-
|
|
3821
|
-
/**
|
|
3822
|
-
* Encodes the specified GetIdentityIdsByPublicKeyHashesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse.verify|verify} messages.
|
|
3823
|
-
* @function encode
|
|
3824
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3825
|
-
* @static
|
|
3826
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesResponse} message GetIdentityIdsByPublicKeyHashesResponse message or plain object to encode
|
|
3827
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3828
|
-
* @returns {$protobuf.Writer} Writer
|
|
3829
|
-
*/
|
|
3830
|
-
GetIdentityIdsByPublicKeyHashesResponse.encode = function encode(message, writer) {
|
|
3831
|
-
if (!writer)
|
|
3832
|
-
writer = $Writer.create();
|
|
3833
|
-
if (message.identityIds != null && message.identityIds.length)
|
|
3834
|
-
for (var i = 0; i < message.identityIds.length; ++i)
|
|
3835
|
-
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identityIds[i]);
|
|
3836
|
-
if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
|
|
3837
|
-
$root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
3838
|
-
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
3839
|
-
$root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
3840
|
-
return writer;
|
|
3841
|
-
};
|
|
3842
|
-
|
|
3843
|
-
/**
|
|
3844
|
-
* Encodes the specified GetIdentityIdsByPublicKeyHashesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse.verify|verify} messages.
|
|
3845
|
-
* @function encodeDelimited
|
|
3846
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3847
|
-
* @static
|
|
3848
|
-
* @param {org.dash.platform.dapi.v0.IGetIdentityIdsByPublicKeyHashesResponse} message GetIdentityIdsByPublicKeyHashesResponse message or plain object to encode
|
|
3849
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3850
|
-
* @returns {$protobuf.Writer} Writer
|
|
3851
|
-
*/
|
|
3852
|
-
GetIdentityIdsByPublicKeyHashesResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3853
|
-
return this.encode(message, writer).ldelim();
|
|
3854
|
-
};
|
|
3855
|
-
|
|
3856
|
-
/**
|
|
3857
|
-
* Decodes a GetIdentityIdsByPublicKeyHashesResponse message from the specified reader or buffer.
|
|
3858
|
-
* @function decode
|
|
3859
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3860
|
-
* @static
|
|
3861
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3862
|
-
* @param {number} [length] Message length if known beforehand
|
|
3863
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse} GetIdentityIdsByPublicKeyHashesResponse
|
|
3864
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3865
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3866
|
-
*/
|
|
3867
|
-
GetIdentityIdsByPublicKeyHashesResponse.decode = function decode(reader, length) {
|
|
3868
|
-
if (!(reader instanceof $Reader))
|
|
3869
|
-
reader = $Reader.create(reader);
|
|
3870
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse();
|
|
3871
|
-
while (reader.pos < end) {
|
|
3872
|
-
var tag = reader.uint32();
|
|
3873
|
-
switch (tag >>> 3) {
|
|
3874
|
-
case 1:
|
|
3875
|
-
if (!(message.identityIds && message.identityIds.length))
|
|
3876
|
-
message.identityIds = [];
|
|
3877
|
-
message.identityIds.push(reader.bytes());
|
|
3878
|
-
break;
|
|
3879
|
-
case 2:
|
|
3880
|
-
message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
|
|
3881
|
-
break;
|
|
3882
|
-
case 3:
|
|
3883
|
-
message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32());
|
|
3884
|
-
break;
|
|
3885
|
-
default:
|
|
3886
|
-
reader.skipType(tag & 7);
|
|
3887
|
-
break;
|
|
3888
|
-
}
|
|
3889
|
-
}
|
|
3890
|
-
return message;
|
|
3891
|
-
};
|
|
3892
|
-
|
|
3893
|
-
/**
|
|
3894
|
-
* Decodes a GetIdentityIdsByPublicKeyHashesResponse message from the specified reader or buffer, length delimited.
|
|
3895
|
-
* @function decodeDelimited
|
|
3896
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3897
|
-
* @static
|
|
3898
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3899
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse} GetIdentityIdsByPublicKeyHashesResponse
|
|
3900
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3901
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3902
|
-
*/
|
|
3903
|
-
GetIdentityIdsByPublicKeyHashesResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
3904
|
-
if (!(reader instanceof $Reader))
|
|
3905
|
-
reader = new $Reader(reader);
|
|
3906
|
-
return this.decode(reader, reader.uint32());
|
|
3907
|
-
};
|
|
3908
|
-
|
|
3909
|
-
/**
|
|
3910
|
-
* Verifies a GetIdentityIdsByPublicKeyHashesResponse message.
|
|
3911
|
-
* @function verify
|
|
3912
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3913
|
-
* @static
|
|
3914
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
3915
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3916
|
-
*/
|
|
3917
|
-
GetIdentityIdsByPublicKeyHashesResponse.verify = function verify(message) {
|
|
3918
|
-
if (typeof message !== "object" || message === null)
|
|
3919
|
-
return "object expected";
|
|
3920
|
-
if (message.identityIds != null && message.hasOwnProperty("identityIds")) {
|
|
3921
|
-
if (!Array.isArray(message.identityIds))
|
|
3922
|
-
return "identityIds: array expected";
|
|
3923
|
-
for (var i = 0; i < message.identityIds.length; ++i)
|
|
3924
|
-
if (!(message.identityIds[i] && typeof message.identityIds[i].length === "number" || $util.isString(message.identityIds[i])))
|
|
3925
|
-
return "identityIds: buffer[] expected";
|
|
3926
|
-
}
|
|
3927
|
-
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
3928
|
-
var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
|
|
3929
|
-
if (error)
|
|
3930
|
-
return "proof." + error;
|
|
3931
|
-
}
|
|
3932
|
-
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
3933
|
-
var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
|
|
3934
|
-
if (error)
|
|
3935
|
-
return "metadata." + error;
|
|
3936
|
-
}
|
|
3937
|
-
return null;
|
|
3938
|
-
};
|
|
3939
|
-
|
|
3940
|
-
/**
|
|
3941
|
-
* Creates a GetIdentityIdsByPublicKeyHashesResponse message from a plain object. Also converts values to their respective internal types.
|
|
3942
|
-
* @function fromObject
|
|
3943
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3944
|
-
* @static
|
|
3945
|
-
* @param {Object.<string,*>} object Plain object
|
|
3946
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse} GetIdentityIdsByPublicKeyHashesResponse
|
|
3947
|
-
*/
|
|
3948
|
-
GetIdentityIdsByPublicKeyHashesResponse.fromObject = function fromObject(object) {
|
|
3949
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse)
|
|
3950
|
-
return object;
|
|
3951
|
-
var message = new $root.org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse();
|
|
3952
|
-
if (object.identityIds) {
|
|
3953
|
-
if (!Array.isArray(object.identityIds))
|
|
3954
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse.identityIds: array expected");
|
|
3955
|
-
message.identityIds = [];
|
|
3956
|
-
for (var i = 0; i < object.identityIds.length; ++i)
|
|
3957
|
-
if (typeof object.identityIds[i] === "string")
|
|
3958
|
-
$util.base64.decode(object.identityIds[i], message.identityIds[i] = $util.newBuffer($util.base64.length(object.identityIds[i])), 0);
|
|
3959
|
-
else if (object.identityIds[i].length >= 0)
|
|
3960
|
-
message.identityIds[i] = object.identityIds[i];
|
|
3961
|
-
}
|
|
3962
|
-
if (object.proof != null) {
|
|
3963
|
-
if (typeof object.proof !== "object")
|
|
3964
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse.proof: object expected");
|
|
3965
|
-
message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof);
|
|
3966
|
-
}
|
|
3967
|
-
if (object.metadata != null) {
|
|
3968
|
-
if (typeof object.metadata !== "object")
|
|
3969
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse.metadata: object expected");
|
|
3970
|
-
message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata);
|
|
3971
|
-
}
|
|
3972
|
-
return message;
|
|
3973
|
-
};
|
|
3974
|
-
|
|
3975
|
-
/**
|
|
3976
|
-
* Creates a plain object from a GetIdentityIdsByPublicKeyHashesResponse message. Also converts values to other types if specified.
|
|
3977
|
-
* @function toObject
|
|
3978
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
3979
|
-
* @static
|
|
3980
|
-
* @param {org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse} message GetIdentityIdsByPublicKeyHashesResponse
|
|
3981
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3982
|
-
* @returns {Object.<string,*>} Plain object
|
|
3983
|
-
*/
|
|
3984
|
-
GetIdentityIdsByPublicKeyHashesResponse.toObject = function toObject(message, options) {
|
|
3985
|
-
if (!options)
|
|
3986
|
-
options = {};
|
|
3987
|
-
var object = {};
|
|
3988
|
-
if (options.arrays || options.defaults)
|
|
3989
|
-
object.identityIds = [];
|
|
3990
|
-
if (options.defaults) {
|
|
3991
|
-
object.proof = null;
|
|
3992
|
-
object.metadata = null;
|
|
3993
|
-
}
|
|
3994
|
-
if (message.identityIds && message.identityIds.length) {
|
|
3995
|
-
object.identityIds = [];
|
|
3996
|
-
for (var j = 0; j < message.identityIds.length; ++j)
|
|
3997
|
-
object.identityIds[j] = options.bytes === String ? $util.base64.encode(message.identityIds[j], 0, message.identityIds[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.identityIds[j]) : message.identityIds[j];
|
|
3998
|
-
}
|
|
3999
|
-
if (message.proof != null && message.hasOwnProperty("proof"))
|
|
4000
|
-
object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
|
|
4001
|
-
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
4002
|
-
object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
|
|
4003
|
-
return object;
|
|
4004
|
-
};
|
|
4005
|
-
|
|
4006
|
-
/**
|
|
4007
|
-
* Converts this GetIdentityIdsByPublicKeyHashesResponse to JSON.
|
|
4008
|
-
* @function toJSON
|
|
4009
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityIdsByPublicKeyHashesResponse
|
|
4010
|
-
* @instance
|
|
4011
|
-
* @returns {Object.<string,*>} JSON object
|
|
4012
|
-
*/
|
|
4013
|
-
GetIdentityIdsByPublicKeyHashesResponse.prototype.toJSON = function toJSON() {
|
|
4014
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
4015
|
-
};
|
|
4016
|
-
|
|
4017
|
-
return GetIdentityIdsByPublicKeyHashesResponse;
|
|
4018
|
-
})();
|
|
4019
|
-
|
|
4020
3496
|
v0.WaitForStateTransitionResultRequest = (function() {
|
|
4021
3497
|
|
|
4022
3498
|
/**
|