@dashevo/dapi-grpc 5.0.0-beta.3 → 5.0.0-beta.5
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 +7 -0
- package/build.rs +48 -6
- package/clients/drive/v0/nodejs/drive_pbjs.js +25 -235
- package/clients/platform/v0/nodejs/platform_pbjs.js +25 -235
- package/clients/platform/v0/nodejs/platform_protoc.js +18 -261
- package/clients/platform/v0/web/platform_pb.d.ts +6 -34
- package/clients/platform/v0/web/platform_pb.js +18 -261
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +21 -8
- package/src/lib.rs +3 -0
- package/src/request_codec.rs +49 -0
- package/test/unit/nonunique-proof.spec.js +42 -0
- package/tests/protobuf_request_errors.rs +372 -0
|
@@ -41128,6 +41128,8 @@ $root.org = (function() {
|
|
|
41128
41128
|
* @property {number} STARTS_WITH=10 STARTS_WITH value
|
|
41129
41129
|
* @property {number} IN_TIME_RANGE=11 IN_TIME_RANGE value
|
|
41130
41130
|
* @property {number} IN_INTEGER_RANGE=12 IN_INTEGER_RANGE value
|
|
41131
|
+
* @property {number} CONTAINS=13 CONTAINS value
|
|
41132
|
+
* @property {number} CONTAINS_ANY=14 CONTAINS_ANY value
|
|
41131
41133
|
*/
|
|
41132
41134
|
GetDocumentsRequest.WhereOperator = (function() {
|
|
41133
41135
|
var valuesById = {}, values = Object.create(valuesById);
|
|
@@ -41144,6 +41146,8 @@ $root.org = (function() {
|
|
|
41144
41146
|
values[valuesById[10] = "STARTS_WITH"] = 10;
|
|
41145
41147
|
values[valuesById[11] = "IN_TIME_RANGE"] = 11;
|
|
41146
41148
|
values[valuesById[12] = "IN_INTEGER_RANGE"] = 12;
|
|
41149
|
+
values[valuesById[13] = "CONTAINS"] = 13;
|
|
41150
|
+
values[valuesById[14] = "CONTAINS_ANY"] = 14;
|
|
41147
41151
|
return values;
|
|
41148
41152
|
})();
|
|
41149
41153
|
|
|
@@ -43044,6 +43048,8 @@ $root.org = (function() {
|
|
|
43044
43048
|
case 10:
|
|
43045
43049
|
case 11:
|
|
43046
43050
|
case 12:
|
|
43051
|
+
case 13:
|
|
43052
|
+
case 14:
|
|
43047
43053
|
break;
|
|
43048
43054
|
}
|
|
43049
43055
|
if (message.value != null && message.hasOwnProperty("value")) {
|
|
@@ -43131,6 +43137,14 @@ $root.org = (function() {
|
|
|
43131
43137
|
case 12:
|
|
43132
43138
|
message.operator = 12;
|
|
43133
43139
|
break;
|
|
43140
|
+
case "CONTAINS":
|
|
43141
|
+
case 13:
|
|
43142
|
+
message.operator = 13;
|
|
43143
|
+
break;
|
|
43144
|
+
case "CONTAINS_ANY":
|
|
43145
|
+
case 14:
|
|
43146
|
+
message.operator = 14;
|
|
43147
|
+
break;
|
|
43134
43148
|
}
|
|
43135
43149
|
if (object.value != null) {
|
|
43136
43150
|
if (typeof object.value !== "object")
|
|
@@ -54851,7 +54865,7 @@ $root.org = (function() {
|
|
|
54851
54865
|
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse
|
|
54852
54866
|
* @interface IGetIdentityByNonUniquePublicKeyHashResponseV0
|
|
54853
54867
|
* @property {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IIdentityResponse|null} [identity] GetIdentityByNonUniquePublicKeyHashResponseV0 identity
|
|
54854
|
-
* @property {org.dash.platform.dapi.v0.
|
|
54868
|
+
* @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentityByNonUniquePublicKeyHashResponseV0 proof
|
|
54855
54869
|
* @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentityByNonUniquePublicKeyHashResponseV0 metadata
|
|
54856
54870
|
*/
|
|
54857
54871
|
|
|
@@ -54880,7 +54894,7 @@ $root.org = (function() {
|
|
|
54880
54894
|
|
|
54881
54895
|
/**
|
|
54882
54896
|
* GetIdentityByNonUniquePublicKeyHashResponseV0 proof.
|
|
54883
|
-
* @member {org.dash.platform.dapi.v0.
|
|
54897
|
+
* @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof
|
|
54884
54898
|
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0
|
|
54885
54899
|
* @instance
|
|
54886
54900
|
*/
|
|
@@ -54934,10 +54948,10 @@ $root.org = (function() {
|
|
|
54934
54948
|
writer = $Writer.create();
|
|
54935
54949
|
if (message.identity != null && Object.hasOwnProperty.call(message, "identity"))
|
|
54936
54950
|
$root.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityResponse.encode(message.identity, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
54937
|
-
if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
|
|
54938
|
-
$root.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
54939
54951
|
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
54940
54952
|
$root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
54953
|
+
if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
|
|
54954
|
+
$root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
54941
54955
|
return writer;
|
|
54942
54956
|
};
|
|
54943
54957
|
|
|
@@ -54975,8 +54989,8 @@ $root.org = (function() {
|
|
|
54975
54989
|
case 1:
|
|
54976
54990
|
message.identity = $root.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityResponse.decode(reader, reader.uint32());
|
|
54977
54991
|
break;
|
|
54978
|
-
case
|
|
54979
|
-
message.proof = $root.org.dash.platform.dapi.v0.
|
|
54992
|
+
case 4:
|
|
54993
|
+
message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
|
|
54980
54994
|
break;
|
|
54981
54995
|
case 3:
|
|
54982
54996
|
message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32());
|
|
@@ -55030,7 +55044,7 @@ $root.org = (function() {
|
|
|
55030
55044
|
return "result: multiple values";
|
|
55031
55045
|
properties.result = 1;
|
|
55032
55046
|
{
|
|
55033
|
-
var error = $root.org.dash.platform.dapi.v0.
|
|
55047
|
+
var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
|
|
55034
55048
|
if (error)
|
|
55035
55049
|
return "proof." + error;
|
|
55036
55050
|
}
|
|
@@ -55063,7 +55077,7 @@ $root.org = (function() {
|
|
|
55063
55077
|
if (object.proof != null) {
|
|
55064
55078
|
if (typeof object.proof !== "object")
|
|
55065
55079
|
throw TypeError(".org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.proof: object expected");
|
|
55066
|
-
message.proof = $root.org.dash.platform.dapi.v0.
|
|
55080
|
+
message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof);
|
|
55067
55081
|
}
|
|
55068
55082
|
if (object.metadata != null) {
|
|
55069
55083
|
if (typeof object.metadata !== "object")
|
|
@@ -55093,13 +55107,13 @@ $root.org = (function() {
|
|
|
55093
55107
|
if (options.oneofs)
|
|
55094
55108
|
object.result = "identity";
|
|
55095
55109
|
}
|
|
55110
|
+
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
55111
|
+
object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
|
|
55096
55112
|
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
55097
|
-
object.proof = $root.org.dash.platform.dapi.v0.
|
|
55113
|
+
object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
|
|
55098
55114
|
if (options.oneofs)
|
|
55099
55115
|
object.result = "proof";
|
|
55100
55116
|
}
|
|
55101
|
-
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
55102
|
-
object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
|
|
55103
55117
|
return object;
|
|
55104
55118
|
};
|
|
55105
55119
|
|
|
@@ -55310,230 +55324,6 @@ $root.org = (function() {
|
|
|
55310
55324
|
return IdentityResponse;
|
|
55311
55325
|
})();
|
|
55312
55326
|
|
|
55313
|
-
GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse = (function() {
|
|
55314
|
-
|
|
55315
|
-
/**
|
|
55316
|
-
* Properties of an IdentityProvedResponse.
|
|
55317
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0
|
|
55318
|
-
* @interface IIdentityProvedResponse
|
|
55319
|
-
* @property {org.dash.platform.dapi.v0.IProof|null} [grovedbIdentityPublicKeyHashProof] IdentityProvedResponse grovedbIdentityPublicKeyHashProof
|
|
55320
|
-
* @property {Uint8Array|null} [identityProofBytes] IdentityProvedResponse identityProofBytes
|
|
55321
|
-
*/
|
|
55322
|
-
|
|
55323
|
-
/**
|
|
55324
|
-
* Constructs a new IdentityProvedResponse.
|
|
55325
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0
|
|
55326
|
-
* @classdesc Represents an IdentityProvedResponse.
|
|
55327
|
-
* @implements IIdentityProvedResponse
|
|
55328
|
-
* @constructor
|
|
55329
|
-
* @param {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IIdentityProvedResponse=} [properties] Properties to set
|
|
55330
|
-
*/
|
|
55331
|
-
function IdentityProvedResponse(properties) {
|
|
55332
|
-
if (properties)
|
|
55333
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
55334
|
-
if (properties[keys[i]] != null)
|
|
55335
|
-
this[keys[i]] = properties[keys[i]];
|
|
55336
|
-
}
|
|
55337
|
-
|
|
55338
|
-
/**
|
|
55339
|
-
* IdentityProvedResponse grovedbIdentityPublicKeyHashProof.
|
|
55340
|
-
* @member {org.dash.platform.dapi.v0.IProof|null|undefined} grovedbIdentityPublicKeyHashProof
|
|
55341
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55342
|
-
* @instance
|
|
55343
|
-
*/
|
|
55344
|
-
IdentityProvedResponse.prototype.grovedbIdentityPublicKeyHashProof = null;
|
|
55345
|
-
|
|
55346
|
-
/**
|
|
55347
|
-
* IdentityProvedResponse identityProofBytes.
|
|
55348
|
-
* @member {Uint8Array} identityProofBytes
|
|
55349
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55350
|
-
* @instance
|
|
55351
|
-
*/
|
|
55352
|
-
IdentityProvedResponse.prototype.identityProofBytes = $util.newBuffer([]);
|
|
55353
|
-
|
|
55354
|
-
/**
|
|
55355
|
-
* Creates a new IdentityProvedResponse instance using the specified properties.
|
|
55356
|
-
* @function create
|
|
55357
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55358
|
-
* @static
|
|
55359
|
-
* @param {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IIdentityProvedResponse=} [properties] Properties to set
|
|
55360
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse} IdentityProvedResponse instance
|
|
55361
|
-
*/
|
|
55362
|
-
IdentityProvedResponse.create = function create(properties) {
|
|
55363
|
-
return new IdentityProvedResponse(properties);
|
|
55364
|
-
};
|
|
55365
|
-
|
|
55366
|
-
/**
|
|
55367
|
-
* Encodes the specified IdentityProvedResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse.verify|verify} messages.
|
|
55368
|
-
* @function encode
|
|
55369
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55370
|
-
* @static
|
|
55371
|
-
* @param {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IIdentityProvedResponse} message IdentityProvedResponse message or plain object to encode
|
|
55372
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
55373
|
-
* @returns {$protobuf.Writer} Writer
|
|
55374
|
-
*/
|
|
55375
|
-
IdentityProvedResponse.encode = function encode(message, writer) {
|
|
55376
|
-
if (!writer)
|
|
55377
|
-
writer = $Writer.create();
|
|
55378
|
-
if (message.grovedbIdentityPublicKeyHashProof != null && Object.hasOwnProperty.call(message, "grovedbIdentityPublicKeyHashProof"))
|
|
55379
|
-
$root.org.dash.platform.dapi.v0.Proof.encode(message.grovedbIdentityPublicKeyHashProof, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
55380
|
-
if (message.identityProofBytes != null && Object.hasOwnProperty.call(message, "identityProofBytes"))
|
|
55381
|
-
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.identityProofBytes);
|
|
55382
|
-
return writer;
|
|
55383
|
-
};
|
|
55384
|
-
|
|
55385
|
-
/**
|
|
55386
|
-
* Encodes the specified IdentityProvedResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse.verify|verify} messages.
|
|
55387
|
-
* @function encodeDelimited
|
|
55388
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55389
|
-
* @static
|
|
55390
|
-
* @param {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IIdentityProvedResponse} message IdentityProvedResponse message or plain object to encode
|
|
55391
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
55392
|
-
* @returns {$protobuf.Writer} Writer
|
|
55393
|
-
*/
|
|
55394
|
-
IdentityProvedResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
55395
|
-
return this.encode(message, writer).ldelim();
|
|
55396
|
-
};
|
|
55397
|
-
|
|
55398
|
-
/**
|
|
55399
|
-
* Decodes an IdentityProvedResponse message from the specified reader or buffer.
|
|
55400
|
-
* @function decode
|
|
55401
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55402
|
-
* @static
|
|
55403
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
55404
|
-
* @param {number} [length] Message length if known beforehand
|
|
55405
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse} IdentityProvedResponse
|
|
55406
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
55407
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
55408
|
-
*/
|
|
55409
|
-
IdentityProvedResponse.decode = function decode(reader, length) {
|
|
55410
|
-
if (!(reader instanceof $Reader))
|
|
55411
|
-
reader = $Reader.create(reader);
|
|
55412
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse();
|
|
55413
|
-
while (reader.pos < end) {
|
|
55414
|
-
var tag = reader.uint32();
|
|
55415
|
-
switch (tag >>> 3) {
|
|
55416
|
-
case 1:
|
|
55417
|
-
message.grovedbIdentityPublicKeyHashProof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
|
|
55418
|
-
break;
|
|
55419
|
-
case 2:
|
|
55420
|
-
message.identityProofBytes = reader.bytes();
|
|
55421
|
-
break;
|
|
55422
|
-
default:
|
|
55423
|
-
reader.skipType(tag & 7);
|
|
55424
|
-
break;
|
|
55425
|
-
}
|
|
55426
|
-
}
|
|
55427
|
-
return message;
|
|
55428
|
-
};
|
|
55429
|
-
|
|
55430
|
-
/**
|
|
55431
|
-
* Decodes an IdentityProvedResponse message from the specified reader or buffer, length delimited.
|
|
55432
|
-
* @function decodeDelimited
|
|
55433
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55434
|
-
* @static
|
|
55435
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
55436
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse} IdentityProvedResponse
|
|
55437
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
55438
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
55439
|
-
*/
|
|
55440
|
-
IdentityProvedResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
55441
|
-
if (!(reader instanceof $Reader))
|
|
55442
|
-
reader = new $Reader(reader);
|
|
55443
|
-
return this.decode(reader, reader.uint32());
|
|
55444
|
-
};
|
|
55445
|
-
|
|
55446
|
-
/**
|
|
55447
|
-
* Verifies an IdentityProvedResponse message.
|
|
55448
|
-
* @function verify
|
|
55449
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55450
|
-
* @static
|
|
55451
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
55452
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
55453
|
-
*/
|
|
55454
|
-
IdentityProvedResponse.verify = function verify(message) {
|
|
55455
|
-
if (typeof message !== "object" || message === null)
|
|
55456
|
-
return "object expected";
|
|
55457
|
-
if (message.grovedbIdentityPublicKeyHashProof != null && message.hasOwnProperty("grovedbIdentityPublicKeyHashProof")) {
|
|
55458
|
-
var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.grovedbIdentityPublicKeyHashProof);
|
|
55459
|
-
if (error)
|
|
55460
|
-
return "grovedbIdentityPublicKeyHashProof." + error;
|
|
55461
|
-
}
|
|
55462
|
-
if (message.identityProofBytes != null && message.hasOwnProperty("identityProofBytes"))
|
|
55463
|
-
if (!(message.identityProofBytes && typeof message.identityProofBytes.length === "number" || $util.isString(message.identityProofBytes)))
|
|
55464
|
-
return "identityProofBytes: buffer expected";
|
|
55465
|
-
return null;
|
|
55466
|
-
};
|
|
55467
|
-
|
|
55468
|
-
/**
|
|
55469
|
-
* Creates an IdentityProvedResponse message from a plain object. Also converts values to their respective internal types.
|
|
55470
|
-
* @function fromObject
|
|
55471
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55472
|
-
* @static
|
|
55473
|
-
* @param {Object.<string,*>} object Plain object
|
|
55474
|
-
* @returns {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse} IdentityProvedResponse
|
|
55475
|
-
*/
|
|
55476
|
-
IdentityProvedResponse.fromObject = function fromObject(object) {
|
|
55477
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse)
|
|
55478
|
-
return object;
|
|
55479
|
-
var message = new $root.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse();
|
|
55480
|
-
if (object.grovedbIdentityPublicKeyHashProof != null) {
|
|
55481
|
-
if (typeof object.grovedbIdentityPublicKeyHashProof !== "object")
|
|
55482
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse.grovedbIdentityPublicKeyHashProof: object expected");
|
|
55483
|
-
message.grovedbIdentityPublicKeyHashProof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.grovedbIdentityPublicKeyHashProof);
|
|
55484
|
-
}
|
|
55485
|
-
if (object.identityProofBytes != null)
|
|
55486
|
-
if (typeof object.identityProofBytes === "string")
|
|
55487
|
-
$util.base64.decode(object.identityProofBytes, message.identityProofBytes = $util.newBuffer($util.base64.length(object.identityProofBytes)), 0);
|
|
55488
|
-
else if (object.identityProofBytes.length >= 0)
|
|
55489
|
-
message.identityProofBytes = object.identityProofBytes;
|
|
55490
|
-
return message;
|
|
55491
|
-
};
|
|
55492
|
-
|
|
55493
|
-
/**
|
|
55494
|
-
* Creates a plain object from an IdentityProvedResponse message. Also converts values to other types if specified.
|
|
55495
|
-
* @function toObject
|
|
55496
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55497
|
-
* @static
|
|
55498
|
-
* @param {org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse} message IdentityProvedResponse
|
|
55499
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
55500
|
-
* @returns {Object.<string,*>} Plain object
|
|
55501
|
-
*/
|
|
55502
|
-
IdentityProvedResponse.toObject = function toObject(message, options) {
|
|
55503
|
-
if (!options)
|
|
55504
|
-
options = {};
|
|
55505
|
-
var object = {};
|
|
55506
|
-
if (options.defaults) {
|
|
55507
|
-
object.grovedbIdentityPublicKeyHashProof = null;
|
|
55508
|
-
if (options.bytes === String)
|
|
55509
|
-
object.identityProofBytes = "";
|
|
55510
|
-
else {
|
|
55511
|
-
object.identityProofBytes = [];
|
|
55512
|
-
if (options.bytes !== Array)
|
|
55513
|
-
object.identityProofBytes = $util.newBuffer(object.identityProofBytes);
|
|
55514
|
-
}
|
|
55515
|
-
}
|
|
55516
|
-
if (message.grovedbIdentityPublicKeyHashProof != null && message.hasOwnProperty("grovedbIdentityPublicKeyHashProof"))
|
|
55517
|
-
object.grovedbIdentityPublicKeyHashProof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.grovedbIdentityPublicKeyHashProof, options);
|
|
55518
|
-
if (message.identityProofBytes != null && message.hasOwnProperty("identityProofBytes"))
|
|
55519
|
-
object.identityProofBytes = options.bytes === String ? $util.base64.encode(message.identityProofBytes, 0, message.identityProofBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.identityProofBytes) : message.identityProofBytes;
|
|
55520
|
-
return object;
|
|
55521
|
-
};
|
|
55522
|
-
|
|
55523
|
-
/**
|
|
55524
|
-
* Converts this IdentityProvedResponse to JSON.
|
|
55525
|
-
* @function toJSON
|
|
55526
|
-
* @memberof org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponse
|
|
55527
|
-
* @instance
|
|
55528
|
-
* @returns {Object.<string,*>} JSON object
|
|
55529
|
-
*/
|
|
55530
|
-
IdentityProvedResponse.prototype.toJSON = function toJSON() {
|
|
55531
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
55532
|
-
};
|
|
55533
|
-
|
|
55534
|
-
return IdentityProvedResponse;
|
|
55535
|
-
})();
|
|
55536
|
-
|
|
55537
55327
|
return GetIdentityByNonUniquePublicKeyHashResponseV0;
|
|
55538
55328
|
})();
|
|
55539
55329
|
|