@dashevo/dapi-grpc 0.25.0-dev.15 → 0.25.0-dev.17

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.
@@ -350,6 +350,39 @@ $root.org = (function() {
350
350
  * @variation 2
351
351
  */
352
352
 
353
+ /**
354
+ * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDataContractHistory}.
355
+ * @memberof org.dash.platform.dapi.v0.Platform
356
+ * @typedef getDataContractHistoryCallback
357
+ * @type {function}
358
+ * @param {Error|null} error Error, if any
359
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} [response] GetDataContractHistoryResponse
360
+ */
361
+
362
+ /**
363
+ * Calls getDataContractHistory.
364
+ * @function getDataContractHistory
365
+ * @memberof org.dash.platform.dapi.v0.Platform
366
+ * @instance
367
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryRequest} request GetDataContractHistoryRequest message or plain object
368
+ * @param {org.dash.platform.dapi.v0.Platform.getDataContractHistoryCallback} callback Node-style callback called with the error, if any, and GetDataContractHistoryResponse
369
+ * @returns {undefined}
370
+ * @variation 1
371
+ */
372
+ Object.defineProperty(Platform.prototype.getDataContractHistory = function getDataContractHistory(request, callback) {
373
+ return this.rpcCall(getDataContractHistory, $root.org.dash.platform.dapi.v0.GetDataContractHistoryRequest, $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse, request, callback);
374
+ }, "name", { value: "getDataContractHistory" });
375
+
376
+ /**
377
+ * Calls getDataContractHistory.
378
+ * @function getDataContractHistory
379
+ * @memberof org.dash.platform.dapi.v0.Platform
380
+ * @instance
381
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryRequest} request GetDataContractHistoryRequest message or plain object
382
+ * @returns {Promise<org.dash.platform.dapi.v0.GetDataContractHistoryResponse>} Promise
383
+ * @variation 2
384
+ */
385
+
353
386
  /**
354
387
  * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getDataContracts}.
355
388
  * @memberof org.dash.platform.dapi.v0.Platform
@@ -561,6 +594,8 @@ $root.org = (function() {
561
594
  * @property {Uint8Array|null} [quorumHash] Proof quorumHash
562
595
  * @property {Uint8Array|null} [signature] Proof signature
563
596
  * @property {number|null} [round] Proof round
597
+ * @property {Uint8Array|null} [blockIdHash] Proof blockIdHash
598
+ * @property {number|null} [quorumType] Proof quorumType
564
599
  */
565
600
 
566
601
  /**
@@ -610,6 +645,22 @@ $root.org = (function() {
610
645
  */
611
646
  Proof.prototype.round = 0;
612
647
 
648
+ /**
649
+ * Proof blockIdHash.
650
+ * @member {Uint8Array} blockIdHash
651
+ * @memberof org.dash.platform.dapi.v0.Proof
652
+ * @instance
653
+ */
654
+ Proof.prototype.blockIdHash = $util.newBuffer([]);
655
+
656
+ /**
657
+ * Proof quorumType.
658
+ * @member {number} quorumType
659
+ * @memberof org.dash.platform.dapi.v0.Proof
660
+ * @instance
661
+ */
662
+ Proof.prototype.quorumType = 0;
663
+
613
664
  /**
614
665
  * Creates a new Proof instance using the specified properties.
615
666
  * @function create
@@ -642,6 +693,10 @@ $root.org = (function() {
642
693
  writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature);
643
694
  if (message.round != null && Object.hasOwnProperty.call(message, "round"))
644
695
  writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.round);
696
+ if (message.blockIdHash != null && Object.hasOwnProperty.call(message, "blockIdHash"))
697
+ writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.blockIdHash);
698
+ if (message.quorumType != null && Object.hasOwnProperty.call(message, "quorumType"))
699
+ writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.quorumType);
645
700
  return writer;
646
701
  };
647
702
 
@@ -688,6 +743,12 @@ $root.org = (function() {
688
743
  case 4:
689
744
  message.round = reader.uint32();
690
745
  break;
746
+ case 5:
747
+ message.blockIdHash = reader.bytes();
748
+ break;
749
+ case 6:
750
+ message.quorumType = reader.uint32();
751
+ break;
691
752
  default:
692
753
  reader.skipType(tag & 7);
693
754
  break;
@@ -735,6 +796,12 @@ $root.org = (function() {
735
796
  if (message.round != null && message.hasOwnProperty("round"))
736
797
  if (!$util.isInteger(message.round))
737
798
  return "round: integer expected";
799
+ if (message.blockIdHash != null && message.hasOwnProperty("blockIdHash"))
800
+ if (!(message.blockIdHash && typeof message.blockIdHash.length === "number" || $util.isString(message.blockIdHash)))
801
+ return "blockIdHash: buffer expected";
802
+ if (message.quorumType != null && message.hasOwnProperty("quorumType"))
803
+ if (!$util.isInteger(message.quorumType))
804
+ return "quorumType: integer expected";
738
805
  return null;
739
806
  };
740
807
 
@@ -767,6 +834,13 @@ $root.org = (function() {
767
834
  message.signature = object.signature;
768
835
  if (object.round != null)
769
836
  message.round = object.round >>> 0;
837
+ if (object.blockIdHash != null)
838
+ if (typeof object.blockIdHash === "string")
839
+ $util.base64.decode(object.blockIdHash, message.blockIdHash = $util.newBuffer($util.base64.length(object.blockIdHash)), 0);
840
+ else if (object.blockIdHash.length >= 0)
841
+ message.blockIdHash = object.blockIdHash;
842
+ if (object.quorumType != null)
843
+ message.quorumType = object.quorumType >>> 0;
770
844
  return message;
771
845
  };
772
846
 
@@ -806,6 +880,14 @@ $root.org = (function() {
806
880
  object.signature = $util.newBuffer(object.signature);
807
881
  }
808
882
  object.round = 0;
883
+ if (options.bytes === String)
884
+ object.blockIdHash = "";
885
+ else {
886
+ object.blockIdHash = [];
887
+ if (options.bytes !== Array)
888
+ object.blockIdHash = $util.newBuffer(object.blockIdHash);
889
+ }
890
+ object.quorumType = 0;
809
891
  }
810
892
  if (message.grovedbProof != null && message.hasOwnProperty("grovedbProof"))
811
893
  object.grovedbProof = options.bytes === String ? $util.base64.encode(message.grovedbProof, 0, message.grovedbProof.length) : options.bytes === Array ? Array.prototype.slice.call(message.grovedbProof) : message.grovedbProof;
@@ -815,6 +897,10 @@ $root.org = (function() {
815
897
  object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature;
816
898
  if (message.round != null && message.hasOwnProperty("round"))
817
899
  object.round = message.round;
900
+ if (message.blockIdHash != null && message.hasOwnProperty("blockIdHash"))
901
+ object.blockIdHash = options.bytes === String ? $util.base64.encode(message.blockIdHash, 0, message.blockIdHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.blockIdHash) : message.blockIdHash;
902
+ if (message.quorumType != null && message.hasOwnProperty("quorumType"))
903
+ object.quorumType = message.quorumType;
818
904
  return object;
819
905
  };
820
906
 
@@ -842,6 +928,7 @@ $root.org = (function() {
842
928
  * @property {number|null} [coreChainLockedHeight] ResponseMetadata coreChainLockedHeight
843
929
  * @property {number|Long|null} [timeMs] ResponseMetadata timeMs
844
930
  * @property {number|null} [protocolVersion] ResponseMetadata protocolVersion
931
+ * @property {string|null} [chainId] ResponseMetadata chainId
845
932
  */
846
933
 
847
934
  /**
@@ -891,6 +978,14 @@ $root.org = (function() {
891
978
  */
892
979
  ResponseMetadata.prototype.protocolVersion = 0;
893
980
 
981
+ /**
982
+ * ResponseMetadata chainId.
983
+ * @member {string} chainId
984
+ * @memberof org.dash.platform.dapi.v0.ResponseMetadata
985
+ * @instance
986
+ */
987
+ ResponseMetadata.prototype.chainId = "";
988
+
894
989
  /**
895
990
  * Creates a new ResponseMetadata instance using the specified properties.
896
991
  * @function create
@@ -923,6 +1018,8 @@ $root.org = (function() {
923
1018
  writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timeMs);
924
1019
  if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion"))
925
1020
  writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protocolVersion);
1021
+ if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId"))
1022
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.chainId);
926
1023
  return writer;
927
1024
  };
928
1025
 
@@ -969,6 +1066,9 @@ $root.org = (function() {
969
1066
  case 4:
970
1067
  message.protocolVersion = reader.uint32();
971
1068
  break;
1069
+ case 5:
1070
+ message.chainId = reader.string();
1071
+ break;
972
1072
  default:
973
1073
  reader.skipType(tag & 7);
974
1074
  break;
@@ -1016,6 +1116,9 @@ $root.org = (function() {
1016
1116
  if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion"))
1017
1117
  if (!$util.isInteger(message.protocolVersion))
1018
1118
  return "protocolVersion: integer expected";
1119
+ if (message.chainId != null && message.hasOwnProperty("chainId"))
1120
+ if (!$util.isString(message.chainId))
1121
+ return "chainId: string expected";
1019
1122
  return null;
1020
1123
  };
1021
1124
 
@@ -1053,6 +1156,8 @@ $root.org = (function() {
1053
1156
  message.timeMs = new $util.LongBits(object.timeMs.low >>> 0, object.timeMs.high >>> 0).toNumber(true);
1054
1157
  if (object.protocolVersion != null)
1055
1158
  message.protocolVersion = object.protocolVersion >>> 0;
1159
+ if (object.chainId != null)
1160
+ message.chainId = String(object.chainId);
1056
1161
  return message;
1057
1162
  };
1058
1163
 
@@ -1082,6 +1187,7 @@ $root.org = (function() {
1082
1187
  } else
1083
1188
  object.timeMs = options.longs === String ? "0" : 0;
1084
1189
  object.protocolVersion = 0;
1190
+ object.chainId = "";
1085
1191
  }
1086
1192
  if (message.height != null && message.hasOwnProperty("height"))
1087
1193
  if (typeof message.height === "number")
@@ -1097,6 +1203,8 @@ $root.org = (function() {
1097
1203
  object.timeMs = options.longs === String ? $util.Long.prototype.toString.call(message.timeMs) : options.longs === Number ? new $util.LongBits(message.timeMs.low >>> 0, message.timeMs.high >>> 0).toNumber(true) : message.timeMs;
1098
1204
  if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion"))
1099
1205
  object.protocolVersion = message.protocolVersion;
1206
+ if (message.chainId != null && message.hasOwnProperty("chainId"))
1207
+ object.chainId = message.chainId;
1100
1208
  return object;
1101
1209
  };
1102
1210
 
@@ -1980,6 +2088,20 @@ $root.org = (function() {
1980
2088
  */
1981
2089
  GetIdentityResponse.prototype.metadata = null;
1982
2090
 
2091
+ // OneOf field names bound to virtual getters and setters
2092
+ var $oneOfFields;
2093
+
2094
+ /**
2095
+ * GetIdentityResponse result.
2096
+ * @member {"identity"|"proof"|undefined} result
2097
+ * @memberof org.dash.platform.dapi.v0.GetIdentityResponse
2098
+ * @instance
2099
+ */
2100
+ Object.defineProperty(GetIdentityResponse.prototype, "result", {
2101
+ get: $util.oneOfGetter($oneOfFields = ["identity", "proof"]),
2102
+ set: $util.oneOfSetter($oneOfFields)
2103
+ });
2104
+
1983
2105
  /**
1984
2106
  * Creates a new GetIdentityResponse instance using the specified properties.
1985
2107
  * @function create
@@ -2088,13 +2210,21 @@ $root.org = (function() {
2088
2210
  GetIdentityResponse.verify = function verify(message) {
2089
2211
  if (typeof message !== "object" || message === null)
2090
2212
  return "object expected";
2091
- if (message.identity != null && message.hasOwnProperty("identity"))
2213
+ var properties = {};
2214
+ if (message.identity != null && message.hasOwnProperty("identity")) {
2215
+ properties.result = 1;
2092
2216
  if (!(message.identity && typeof message.identity.length === "number" || $util.isString(message.identity)))
2093
2217
  return "identity: buffer expected";
2218
+ }
2094
2219
  if (message.proof != null && message.hasOwnProperty("proof")) {
2095
- var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
2096
- if (error)
2097
- return "proof." + error;
2220
+ if (properties.result === 1)
2221
+ return "result: multiple values";
2222
+ properties.result = 1;
2223
+ {
2224
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
2225
+ if (error)
2226
+ return "proof." + error;
2227
+ }
2098
2228
  }
2099
2229
  if (message.metadata != null && message.hasOwnProperty("metadata")) {
2100
2230
  var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
@@ -2147,21 +2277,18 @@ $root.org = (function() {
2147
2277
  if (!options)
2148
2278
  options = {};
2149
2279
  var object = {};
2150
- if (options.defaults) {
2151
- if (options.bytes === String)
2152
- object.identity = "";
2153
- else {
2154
- object.identity = [];
2155
- if (options.bytes !== Array)
2156
- object.identity = $util.newBuffer(object.identity);
2157
- }
2158
- object.proof = null;
2280
+ if (options.defaults)
2159
2281
  object.metadata = null;
2160
- }
2161
- if (message.identity != null && message.hasOwnProperty("identity"))
2282
+ if (message.identity != null && message.hasOwnProperty("identity")) {
2162
2283
  object.identity = options.bytes === String ? $util.base64.encode(message.identity, 0, message.identity.length) : options.bytes === Array ? Array.prototype.slice.call(message.identity) : message.identity;
2163
- if (message.proof != null && message.hasOwnProperty("proof"))
2284
+ if (options.oneofs)
2285
+ object.result = "identity";
2286
+ }
2287
+ if (message.proof != null && message.hasOwnProperty("proof")) {
2164
2288
  object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
2289
+ if (options.oneofs)
2290
+ object.result = "proof";
2291
+ }
2165
2292
  if (message.metadata != null && message.hasOwnProperty("metadata"))
2166
2293
  object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
2167
2294
  return object;
@@ -3361,6 +3488,20 @@ $root.org = (function() {
3361
3488
  */
3362
3489
  GetIdentityBalanceResponse.prototype.metadata = null;
3363
3490
 
3491
+ // OneOf field names bound to virtual getters and setters
3492
+ var $oneOfFields;
3493
+
3494
+ /**
3495
+ * GetIdentityBalanceResponse result.
3496
+ * @member {"balance"|"proof"|undefined} result
3497
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceResponse
3498
+ * @instance
3499
+ */
3500
+ Object.defineProperty(GetIdentityBalanceResponse.prototype, "result", {
3501
+ get: $util.oneOfGetter($oneOfFields = ["balance", "proof"]),
3502
+ set: $util.oneOfSetter($oneOfFields)
3503
+ });
3504
+
3364
3505
  /**
3365
3506
  * Creates a new GetIdentityBalanceResponse instance using the specified properties.
3366
3507
  * @function create
@@ -3469,15 +3610,24 @@ $root.org = (function() {
3469
3610
  GetIdentityBalanceResponse.verify = function verify(message) {
3470
3611
  if (typeof message !== "object" || message === null)
3471
3612
  return "object expected";
3613
+ var properties = {};
3472
3614
  if (message.balance != null && message.hasOwnProperty("balance")) {
3473
- var error = $root.google.protobuf.UInt64Value.verify(message.balance);
3474
- if (error)
3475
- return "balance." + error;
3615
+ properties.result = 1;
3616
+ {
3617
+ var error = $root.google.protobuf.UInt64Value.verify(message.balance);
3618
+ if (error)
3619
+ return "balance." + error;
3620
+ }
3476
3621
  }
3477
3622
  if (message.proof != null && message.hasOwnProperty("proof")) {
3478
- var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
3479
- if (error)
3480
- return "proof." + error;
3623
+ if (properties.result === 1)
3624
+ return "result: multiple values";
3625
+ properties.result = 1;
3626
+ {
3627
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
3628
+ if (error)
3629
+ return "proof." + error;
3630
+ }
3481
3631
  }
3482
3632
  if (message.metadata != null && message.hasOwnProperty("metadata")) {
3483
3633
  var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
@@ -3530,15 +3680,18 @@ $root.org = (function() {
3530
3680
  if (!options)
3531
3681
  options = {};
3532
3682
  var object = {};
3533
- if (options.defaults) {
3534
- object.balance = null;
3535
- object.proof = null;
3683
+ if (options.defaults)
3536
3684
  object.metadata = null;
3537
- }
3538
- if (message.balance != null && message.hasOwnProperty("balance"))
3685
+ if (message.balance != null && message.hasOwnProperty("balance")) {
3539
3686
  object.balance = $root.google.protobuf.UInt64Value.toObject(message.balance, options);
3540
- if (message.proof != null && message.hasOwnProperty("proof"))
3687
+ if (options.oneofs)
3688
+ object.result = "balance";
3689
+ }
3690
+ if (message.proof != null && message.hasOwnProperty("proof")) {
3541
3691
  object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
3692
+ if (options.oneofs)
3693
+ object.result = "proof";
3694
+ }
3542
3695
  if (message.metadata != null && message.hasOwnProperty("metadata"))
3543
3696
  object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
3544
3697
  return object;
@@ -3564,8 +3717,7 @@ $root.org = (function() {
3564
3717
  * Properties of a GetIdentityBalanceAndRevisionResponse.
3565
3718
  * @memberof org.dash.platform.dapi.v0
3566
3719
  * @interface IGetIdentityBalanceAndRevisionResponse
3567
- * @property {google.protobuf.IUInt64Value|null} [balance] GetIdentityBalanceAndRevisionResponse balance
3568
- * @property {google.protobuf.IUInt64Value|null} [revision] GetIdentityBalanceAndRevisionResponse revision
3720
+ * @property {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.IBalanceAndRevision|null} [balanceAndRevision] GetIdentityBalanceAndRevisionResponse balanceAndRevision
3569
3721
  * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentityBalanceAndRevisionResponse proof
3570
3722
  * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentityBalanceAndRevisionResponse metadata
3571
3723
  */
@@ -3586,20 +3738,12 @@ $root.org = (function() {
3586
3738
  }
3587
3739
 
3588
3740
  /**
3589
- * GetIdentityBalanceAndRevisionResponse balance.
3590
- * @member {google.protobuf.IUInt64Value|null|undefined} balance
3591
- * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse
3592
- * @instance
3593
- */
3594
- GetIdentityBalanceAndRevisionResponse.prototype.balance = null;
3595
-
3596
- /**
3597
- * GetIdentityBalanceAndRevisionResponse revision.
3598
- * @member {google.protobuf.IUInt64Value|null|undefined} revision
3741
+ * GetIdentityBalanceAndRevisionResponse balanceAndRevision.
3742
+ * @member {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.IBalanceAndRevision|null|undefined} balanceAndRevision
3599
3743
  * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse
3600
3744
  * @instance
3601
3745
  */
3602
- GetIdentityBalanceAndRevisionResponse.prototype.revision = null;
3746
+ GetIdentityBalanceAndRevisionResponse.prototype.balanceAndRevision = null;
3603
3747
 
3604
3748
  /**
3605
3749
  * GetIdentityBalanceAndRevisionResponse proof.
@@ -3617,6 +3761,20 @@ $root.org = (function() {
3617
3761
  */
3618
3762
  GetIdentityBalanceAndRevisionResponse.prototype.metadata = null;
3619
3763
 
3764
+ // OneOf field names bound to virtual getters and setters
3765
+ var $oneOfFields;
3766
+
3767
+ /**
3768
+ * GetIdentityBalanceAndRevisionResponse result.
3769
+ * @member {"balanceAndRevision"|"proof"|undefined} result
3770
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse
3771
+ * @instance
3772
+ */
3773
+ Object.defineProperty(GetIdentityBalanceAndRevisionResponse.prototype, "result", {
3774
+ get: $util.oneOfGetter($oneOfFields = ["balanceAndRevision", "proof"]),
3775
+ set: $util.oneOfSetter($oneOfFields)
3776
+ });
3777
+
3620
3778
  /**
3621
3779
  * Creates a new GetIdentityBalanceAndRevisionResponse instance using the specified properties.
3622
3780
  * @function create
@@ -3641,14 +3799,12 @@ $root.org = (function() {
3641
3799
  GetIdentityBalanceAndRevisionResponse.encode = function encode(message, writer) {
3642
3800
  if (!writer)
3643
3801
  writer = $Writer.create();
3644
- if (message.balance != null && Object.hasOwnProperty.call(message, "balance"))
3645
- $root.google.protobuf.UInt64Value.encode(message.balance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3646
- if (message.revision != null && Object.hasOwnProperty.call(message, "revision"))
3647
- $root.google.protobuf.UInt64Value.encode(message.revision, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
3802
+ if (message.balanceAndRevision != null && Object.hasOwnProperty.call(message, "balanceAndRevision"))
3803
+ $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.encode(message.balanceAndRevision, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3648
3804
  if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
3649
- $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3805
+ $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
3650
3806
  if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
3651
- $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
3807
+ $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3652
3808
  return writer;
3653
3809
  };
3654
3810
 
@@ -3684,15 +3840,12 @@ $root.org = (function() {
3684
3840
  var tag = reader.uint32();
3685
3841
  switch (tag >>> 3) {
3686
3842
  case 1:
3687
- message.balance = $root.google.protobuf.UInt64Value.decode(reader, reader.uint32());
3843
+ message.balanceAndRevision = $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.decode(reader, reader.uint32());
3688
3844
  break;
3689
3845
  case 2:
3690
- message.revision = $root.google.protobuf.UInt64Value.decode(reader, reader.uint32());
3691
- break;
3692
- case 3:
3693
3846
  message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
3694
3847
  break;
3695
- case 4:
3848
+ case 3:
3696
3849
  message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32());
3697
3850
  break;
3698
3851
  default:
@@ -3730,20 +3883,24 @@ $root.org = (function() {
3730
3883
  GetIdentityBalanceAndRevisionResponse.verify = function verify(message) {
3731
3884
  if (typeof message !== "object" || message === null)
3732
3885
  return "object expected";
3733
- if (message.balance != null && message.hasOwnProperty("balance")) {
3734
- var error = $root.google.protobuf.UInt64Value.verify(message.balance);
3735
- if (error)
3736
- return "balance." + error;
3737
- }
3738
- if (message.revision != null && message.hasOwnProperty("revision")) {
3739
- var error = $root.google.protobuf.UInt64Value.verify(message.revision);
3740
- if (error)
3741
- return "revision." + error;
3886
+ var properties = {};
3887
+ if (message.balanceAndRevision != null && message.hasOwnProperty("balanceAndRevision")) {
3888
+ properties.result = 1;
3889
+ {
3890
+ var error = $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.verify(message.balanceAndRevision);
3891
+ if (error)
3892
+ return "balanceAndRevision." + error;
3893
+ }
3742
3894
  }
3743
3895
  if (message.proof != null && message.hasOwnProperty("proof")) {
3744
- var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
3745
- if (error)
3746
- return "proof." + error;
3896
+ if (properties.result === 1)
3897
+ return "result: multiple values";
3898
+ properties.result = 1;
3899
+ {
3900
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
3901
+ if (error)
3902
+ return "proof." + error;
3903
+ }
3747
3904
  }
3748
3905
  if (message.metadata != null && message.hasOwnProperty("metadata")) {
3749
3906
  var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
@@ -3765,15 +3922,10 @@ $root.org = (function() {
3765
3922
  if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse)
3766
3923
  return object;
3767
3924
  var message = new $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse();
3768
- if (object.balance != null) {
3769
- if (typeof object.balance !== "object")
3770
- throw TypeError(".org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.balance: object expected");
3771
- message.balance = $root.google.protobuf.UInt64Value.fromObject(object.balance);
3772
- }
3773
- if (object.revision != null) {
3774
- if (typeof object.revision !== "object")
3775
- throw TypeError(".org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.revision: object expected");
3776
- message.revision = $root.google.protobuf.UInt64Value.fromObject(object.revision);
3925
+ if (object.balanceAndRevision != null) {
3926
+ if (typeof object.balanceAndRevision !== "object")
3927
+ throw TypeError(".org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.balanceAndRevision: object expected");
3928
+ message.balanceAndRevision = $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.fromObject(object.balanceAndRevision);
3777
3929
  }
3778
3930
  if (object.proof != null) {
3779
3931
  if (typeof object.proof !== "object")
@@ -3801,18 +3953,18 @@ $root.org = (function() {
3801
3953
  if (!options)
3802
3954
  options = {};
3803
3955
  var object = {};
3804
- if (options.defaults) {
3805
- object.balance = null;
3806
- object.revision = null;
3807
- object.proof = null;
3956
+ if (options.defaults)
3808
3957
  object.metadata = null;
3958
+ if (message.balanceAndRevision != null && message.hasOwnProperty("balanceAndRevision")) {
3959
+ object.balanceAndRevision = $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.toObject(message.balanceAndRevision, options);
3960
+ if (options.oneofs)
3961
+ object.result = "balanceAndRevision";
3809
3962
  }
3810
- if (message.balance != null && message.hasOwnProperty("balance"))
3811
- object.balance = $root.google.protobuf.UInt64Value.toObject(message.balance, options);
3812
- if (message.revision != null && message.hasOwnProperty("revision"))
3813
- object.revision = $root.google.protobuf.UInt64Value.toObject(message.revision, options);
3814
- if (message.proof != null && message.hasOwnProperty("proof"))
3963
+ if (message.proof != null && message.hasOwnProperty("proof")) {
3815
3964
  object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
3965
+ if (options.oneofs)
3966
+ object.result = "proof";
3967
+ }
3816
3968
  if (message.metadata != null && message.hasOwnProperty("metadata"))
3817
3969
  object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
3818
3970
  return object;
@@ -3829,61 +3981,281 @@ $root.org = (function() {
3829
3981
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3830
3982
  };
3831
3983
 
3832
- return GetIdentityBalanceAndRevisionResponse;
3833
- })();
3834
-
3835
- v0.KeyRequestType = (function() {
3984
+ GetIdentityBalanceAndRevisionResponse.BalanceAndRevision = (function() {
3836
3985
 
3837
- /**
3838
- * Properties of a KeyRequestType.
3839
- * @memberof org.dash.platform.dapi.v0
3840
- * @interface IKeyRequestType
3841
- * @property {org.dash.platform.dapi.v0.IAllKeys|null} [allKeys] KeyRequestType allKeys
3842
- * @property {org.dash.platform.dapi.v0.ISpecificKeys|null} [specificKeys] KeyRequestType specificKeys
3843
- * @property {org.dash.platform.dapi.v0.ISearchKey|null} [searchKey] KeyRequestType searchKey
3844
- */
3986
+ /**
3987
+ * Properties of a BalanceAndRevision.
3988
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse
3989
+ * @interface IBalanceAndRevision
3990
+ * @property {google.protobuf.IUInt64Value|null} [balance] BalanceAndRevision balance
3991
+ * @property {google.protobuf.IUInt64Value|null} [revision] BalanceAndRevision revision
3992
+ */
3845
3993
 
3846
- /**
3847
- * Constructs a new KeyRequestType.
3848
- * @memberof org.dash.platform.dapi.v0
3849
- * @classdesc Represents a KeyRequestType.
3850
- * @implements IKeyRequestType
3851
- * @constructor
3852
- * @param {org.dash.platform.dapi.v0.IKeyRequestType=} [properties] Properties to set
3853
- */
3854
- function KeyRequestType(properties) {
3855
- if (properties)
3856
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3857
- if (properties[keys[i]] != null)
3858
- this[keys[i]] = properties[keys[i]];
3859
- }
3994
+ /**
3995
+ * Constructs a new BalanceAndRevision.
3996
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse
3997
+ * @classdesc Represents a BalanceAndRevision.
3998
+ * @implements IBalanceAndRevision
3999
+ * @constructor
4000
+ * @param {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.IBalanceAndRevision=} [properties] Properties to set
4001
+ */
4002
+ function BalanceAndRevision(properties) {
4003
+ if (properties)
4004
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4005
+ if (properties[keys[i]] != null)
4006
+ this[keys[i]] = properties[keys[i]];
4007
+ }
3860
4008
 
3861
- /**
3862
- * KeyRequestType allKeys.
3863
- * @member {org.dash.platform.dapi.v0.IAllKeys|null|undefined} allKeys
3864
- * @memberof org.dash.platform.dapi.v0.KeyRequestType
3865
- * @instance
3866
- */
3867
- KeyRequestType.prototype.allKeys = null;
4009
+ /**
4010
+ * BalanceAndRevision balance.
4011
+ * @member {google.protobuf.IUInt64Value|null|undefined} balance
4012
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4013
+ * @instance
4014
+ */
4015
+ BalanceAndRevision.prototype.balance = null;
3868
4016
 
3869
- /**
3870
- * KeyRequestType specificKeys.
3871
- * @member {org.dash.platform.dapi.v0.ISpecificKeys|null|undefined} specificKeys
3872
- * @memberof org.dash.platform.dapi.v0.KeyRequestType
3873
- * @instance
3874
- */
3875
- KeyRequestType.prototype.specificKeys = null;
4017
+ /**
4018
+ * BalanceAndRevision revision.
4019
+ * @member {google.protobuf.IUInt64Value|null|undefined} revision
4020
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4021
+ * @instance
4022
+ */
4023
+ BalanceAndRevision.prototype.revision = null;
3876
4024
 
3877
- /**
3878
- * KeyRequestType searchKey.
3879
- * @member {org.dash.platform.dapi.v0.ISearchKey|null|undefined} searchKey
3880
- * @memberof org.dash.platform.dapi.v0.KeyRequestType
3881
- * @instance
3882
- */
3883
- KeyRequestType.prototype.searchKey = null;
4025
+ /**
4026
+ * Creates a new BalanceAndRevision instance using the specified properties.
4027
+ * @function create
4028
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4029
+ * @static
4030
+ * @param {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.IBalanceAndRevision=} [properties] Properties to set
4031
+ * @returns {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision} BalanceAndRevision instance
4032
+ */
4033
+ BalanceAndRevision.create = function create(properties) {
4034
+ return new BalanceAndRevision(properties);
4035
+ };
3884
4036
 
3885
- // OneOf field names bound to virtual getters and setters
3886
- var $oneOfFields;
4037
+ /**
4038
+ * Encodes the specified BalanceAndRevision message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.verify|verify} messages.
4039
+ * @function encode
4040
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4041
+ * @static
4042
+ * @param {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.IBalanceAndRevision} message BalanceAndRevision message or plain object to encode
4043
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4044
+ * @returns {$protobuf.Writer} Writer
4045
+ */
4046
+ BalanceAndRevision.encode = function encode(message, writer) {
4047
+ if (!writer)
4048
+ writer = $Writer.create();
4049
+ if (message.balance != null && Object.hasOwnProperty.call(message, "balance"))
4050
+ $root.google.protobuf.UInt64Value.encode(message.balance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
4051
+ if (message.revision != null && Object.hasOwnProperty.call(message, "revision"))
4052
+ $root.google.protobuf.UInt64Value.encode(message.revision, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4053
+ return writer;
4054
+ };
4055
+
4056
+ /**
4057
+ * Encodes the specified BalanceAndRevision message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.verify|verify} messages.
4058
+ * @function encodeDelimited
4059
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4060
+ * @static
4061
+ * @param {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.IBalanceAndRevision} message BalanceAndRevision message or plain object to encode
4062
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4063
+ * @returns {$protobuf.Writer} Writer
4064
+ */
4065
+ BalanceAndRevision.encodeDelimited = function encodeDelimited(message, writer) {
4066
+ return this.encode(message, writer).ldelim();
4067
+ };
4068
+
4069
+ /**
4070
+ * Decodes a BalanceAndRevision message from the specified reader or buffer.
4071
+ * @function decode
4072
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4073
+ * @static
4074
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4075
+ * @param {number} [length] Message length if known beforehand
4076
+ * @returns {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision} BalanceAndRevision
4077
+ * @throws {Error} If the payload is not a reader or valid buffer
4078
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4079
+ */
4080
+ BalanceAndRevision.decode = function decode(reader, length) {
4081
+ if (!(reader instanceof $Reader))
4082
+ reader = $Reader.create(reader);
4083
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision();
4084
+ while (reader.pos < end) {
4085
+ var tag = reader.uint32();
4086
+ switch (tag >>> 3) {
4087
+ case 1:
4088
+ message.balance = $root.google.protobuf.UInt64Value.decode(reader, reader.uint32());
4089
+ break;
4090
+ case 2:
4091
+ message.revision = $root.google.protobuf.UInt64Value.decode(reader, reader.uint32());
4092
+ break;
4093
+ default:
4094
+ reader.skipType(tag & 7);
4095
+ break;
4096
+ }
4097
+ }
4098
+ return message;
4099
+ };
4100
+
4101
+ /**
4102
+ * Decodes a BalanceAndRevision message from the specified reader or buffer, length delimited.
4103
+ * @function decodeDelimited
4104
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4105
+ * @static
4106
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4107
+ * @returns {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision} BalanceAndRevision
4108
+ * @throws {Error} If the payload is not a reader or valid buffer
4109
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4110
+ */
4111
+ BalanceAndRevision.decodeDelimited = function decodeDelimited(reader) {
4112
+ if (!(reader instanceof $Reader))
4113
+ reader = new $Reader(reader);
4114
+ return this.decode(reader, reader.uint32());
4115
+ };
4116
+
4117
+ /**
4118
+ * Verifies a BalanceAndRevision message.
4119
+ * @function verify
4120
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4121
+ * @static
4122
+ * @param {Object.<string,*>} message Plain object to verify
4123
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4124
+ */
4125
+ BalanceAndRevision.verify = function verify(message) {
4126
+ if (typeof message !== "object" || message === null)
4127
+ return "object expected";
4128
+ if (message.balance != null && message.hasOwnProperty("balance")) {
4129
+ var error = $root.google.protobuf.UInt64Value.verify(message.balance);
4130
+ if (error)
4131
+ return "balance." + error;
4132
+ }
4133
+ if (message.revision != null && message.hasOwnProperty("revision")) {
4134
+ var error = $root.google.protobuf.UInt64Value.verify(message.revision);
4135
+ if (error)
4136
+ return "revision." + error;
4137
+ }
4138
+ return null;
4139
+ };
4140
+
4141
+ /**
4142
+ * Creates a BalanceAndRevision message from a plain object. Also converts values to their respective internal types.
4143
+ * @function fromObject
4144
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4145
+ * @static
4146
+ * @param {Object.<string,*>} object Plain object
4147
+ * @returns {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision} BalanceAndRevision
4148
+ */
4149
+ BalanceAndRevision.fromObject = function fromObject(object) {
4150
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision)
4151
+ return object;
4152
+ var message = new $root.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision();
4153
+ if (object.balance != null) {
4154
+ if (typeof object.balance !== "object")
4155
+ throw TypeError(".org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.balance: object expected");
4156
+ message.balance = $root.google.protobuf.UInt64Value.fromObject(object.balance);
4157
+ }
4158
+ if (object.revision != null) {
4159
+ if (typeof object.revision !== "object")
4160
+ throw TypeError(".org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision.revision: object expected");
4161
+ message.revision = $root.google.protobuf.UInt64Value.fromObject(object.revision);
4162
+ }
4163
+ return message;
4164
+ };
4165
+
4166
+ /**
4167
+ * Creates a plain object from a BalanceAndRevision message. Also converts values to other types if specified.
4168
+ * @function toObject
4169
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4170
+ * @static
4171
+ * @param {org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision} message BalanceAndRevision
4172
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4173
+ * @returns {Object.<string,*>} Plain object
4174
+ */
4175
+ BalanceAndRevision.toObject = function toObject(message, options) {
4176
+ if (!options)
4177
+ options = {};
4178
+ var object = {};
4179
+ if (options.defaults) {
4180
+ object.balance = null;
4181
+ object.revision = null;
4182
+ }
4183
+ if (message.balance != null && message.hasOwnProperty("balance"))
4184
+ object.balance = $root.google.protobuf.UInt64Value.toObject(message.balance, options);
4185
+ if (message.revision != null && message.hasOwnProperty("revision"))
4186
+ object.revision = $root.google.protobuf.UInt64Value.toObject(message.revision, options);
4187
+ return object;
4188
+ };
4189
+
4190
+ /**
4191
+ * Converts this BalanceAndRevision to JSON.
4192
+ * @function toJSON
4193
+ * @memberof org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.BalanceAndRevision
4194
+ * @instance
4195
+ * @returns {Object.<string,*>} JSON object
4196
+ */
4197
+ BalanceAndRevision.prototype.toJSON = function toJSON() {
4198
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4199
+ };
4200
+
4201
+ return BalanceAndRevision;
4202
+ })();
4203
+
4204
+ return GetIdentityBalanceAndRevisionResponse;
4205
+ })();
4206
+
4207
+ v0.KeyRequestType = (function() {
4208
+
4209
+ /**
4210
+ * Properties of a KeyRequestType.
4211
+ * @memberof org.dash.platform.dapi.v0
4212
+ * @interface IKeyRequestType
4213
+ * @property {org.dash.platform.dapi.v0.IAllKeys|null} [allKeys] KeyRequestType allKeys
4214
+ * @property {org.dash.platform.dapi.v0.ISpecificKeys|null} [specificKeys] KeyRequestType specificKeys
4215
+ * @property {org.dash.platform.dapi.v0.ISearchKey|null} [searchKey] KeyRequestType searchKey
4216
+ */
4217
+
4218
+ /**
4219
+ * Constructs a new KeyRequestType.
4220
+ * @memberof org.dash.platform.dapi.v0
4221
+ * @classdesc Represents a KeyRequestType.
4222
+ * @implements IKeyRequestType
4223
+ * @constructor
4224
+ * @param {org.dash.platform.dapi.v0.IKeyRequestType=} [properties] Properties to set
4225
+ */
4226
+ function KeyRequestType(properties) {
4227
+ if (properties)
4228
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4229
+ if (properties[keys[i]] != null)
4230
+ this[keys[i]] = properties[keys[i]];
4231
+ }
4232
+
4233
+ /**
4234
+ * KeyRequestType allKeys.
4235
+ * @member {org.dash.platform.dapi.v0.IAllKeys|null|undefined} allKeys
4236
+ * @memberof org.dash.platform.dapi.v0.KeyRequestType
4237
+ * @instance
4238
+ */
4239
+ KeyRequestType.prototype.allKeys = null;
4240
+
4241
+ /**
4242
+ * KeyRequestType specificKeys.
4243
+ * @member {org.dash.platform.dapi.v0.ISpecificKeys|null|undefined} specificKeys
4244
+ * @memberof org.dash.platform.dapi.v0.KeyRequestType
4245
+ * @instance
4246
+ */
4247
+ KeyRequestType.prototype.specificKeys = null;
4248
+
4249
+ /**
4250
+ * KeyRequestType searchKey.
4251
+ * @member {org.dash.platform.dapi.v0.ISearchKey|null|undefined} searchKey
4252
+ * @memberof org.dash.platform.dapi.v0.KeyRequestType
4253
+ * @instance
4254
+ */
4255
+ KeyRequestType.prototype.searchKey = null;
4256
+
4257
+ // OneOf field names bound to virtual getters and setters
4258
+ var $oneOfFields;
3887
4259
 
3888
4260
  /**
3889
4261
  * KeyRequestType request.
@@ -8710,6 +9082,20 @@ $root.org = (function() {
8710
9082
  */
8711
9083
  GetDataContractResponse.prototype.metadata = null;
8712
9084
 
9085
+ // OneOf field names bound to virtual getters and setters
9086
+ var $oneOfFields;
9087
+
9088
+ /**
9089
+ * GetDataContractResponse result.
9090
+ * @member {"dataContract"|"proof"|undefined} result
9091
+ * @memberof org.dash.platform.dapi.v0.GetDataContractResponse
9092
+ * @instance
9093
+ */
9094
+ Object.defineProperty(GetDataContractResponse.prototype, "result", {
9095
+ get: $util.oneOfGetter($oneOfFields = ["dataContract", "proof"]),
9096
+ set: $util.oneOfSetter($oneOfFields)
9097
+ });
9098
+
8713
9099
  /**
8714
9100
  * Creates a new GetDataContractResponse instance using the specified properties.
8715
9101
  * @function create
@@ -8818,13 +9204,21 @@ $root.org = (function() {
8818
9204
  GetDataContractResponse.verify = function verify(message) {
8819
9205
  if (typeof message !== "object" || message === null)
8820
9206
  return "object expected";
8821
- if (message.dataContract != null && message.hasOwnProperty("dataContract"))
9207
+ var properties = {};
9208
+ if (message.dataContract != null && message.hasOwnProperty("dataContract")) {
9209
+ properties.result = 1;
8822
9210
  if (!(message.dataContract && typeof message.dataContract.length === "number" || $util.isString(message.dataContract)))
8823
9211
  return "dataContract: buffer expected";
9212
+ }
8824
9213
  if (message.proof != null && message.hasOwnProperty("proof")) {
8825
- var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
8826
- if (error)
8827
- return "proof." + error;
9214
+ if (properties.result === 1)
9215
+ return "result: multiple values";
9216
+ properties.result = 1;
9217
+ {
9218
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
9219
+ if (error)
9220
+ return "proof." + error;
9221
+ }
8828
9222
  }
8829
9223
  if (message.metadata != null && message.hasOwnProperty("metadata")) {
8830
9224
  var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
@@ -8877,21 +9271,18 @@ $root.org = (function() {
8877
9271
  if (!options)
8878
9272
  options = {};
8879
9273
  var object = {};
8880
- if (options.defaults) {
8881
- if (options.bytes === String)
8882
- object.dataContract = "";
8883
- else {
8884
- object.dataContract = [];
8885
- if (options.bytes !== Array)
8886
- object.dataContract = $util.newBuffer(object.dataContract);
8887
- }
8888
- object.proof = null;
9274
+ if (options.defaults)
8889
9275
  object.metadata = null;
8890
- }
8891
- if (message.dataContract != null && message.hasOwnProperty("dataContract"))
9276
+ if (message.dataContract != null && message.hasOwnProperty("dataContract")) {
8892
9277
  object.dataContract = options.bytes === String ? $util.base64.encode(message.dataContract, 0, message.dataContract.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContract) : message.dataContract;
8893
- if (message.proof != null && message.hasOwnProperty("proof"))
9278
+ if (options.oneofs)
9279
+ object.result = "dataContract";
9280
+ }
9281
+ if (message.proof != null && message.hasOwnProperty("proof")) {
8894
9282
  object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
9283
+ if (options.oneofs)
9284
+ object.result = "proof";
9285
+ }
8895
9286
  if (message.metadata != null && message.hasOwnProperty("metadata"))
8896
9287
  object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
8897
9288
  return object;
@@ -10041,31 +10432,28 @@ $root.org = (function() {
10041
10432
  return GetDataContractsResponse;
10042
10433
  })();
10043
10434
 
10044
- v0.GetDocumentsRequest = (function() {
10435
+ v0.GetDataContractHistoryRequest = (function() {
10045
10436
 
10046
10437
  /**
10047
- * Properties of a GetDocumentsRequest.
10438
+ * Properties of a GetDataContractHistoryRequest.
10048
10439
  * @memberof org.dash.platform.dapi.v0
10049
- * @interface IGetDocumentsRequest
10050
- * @property {Uint8Array|null} [dataContractId] GetDocumentsRequest dataContractId
10051
- * @property {string|null} [documentType] GetDocumentsRequest documentType
10052
- * @property {Uint8Array|null} [where] GetDocumentsRequest where
10053
- * @property {Uint8Array|null} [orderBy] GetDocumentsRequest orderBy
10054
- * @property {number|null} [limit] GetDocumentsRequest limit
10055
- * @property {Uint8Array|null} [startAfter] GetDocumentsRequest startAfter
10056
- * @property {Uint8Array|null} [startAt] GetDocumentsRequest startAt
10057
- * @property {boolean|null} [prove] GetDocumentsRequest prove
10440
+ * @interface IGetDataContractHistoryRequest
10441
+ * @property {Uint8Array|null} [id] GetDataContractHistoryRequest id
10442
+ * @property {google.protobuf.IUInt32Value|null} [limit] GetDataContractHistoryRequest limit
10443
+ * @property {google.protobuf.IUInt32Value|null} [offset] GetDataContractHistoryRequest offset
10444
+ * @property {number|Long|null} [startAtMs] GetDataContractHistoryRequest startAtMs
10445
+ * @property {boolean|null} [prove] GetDataContractHistoryRequest prove
10058
10446
  */
10059
10447
 
10060
10448
  /**
10061
- * Constructs a new GetDocumentsRequest.
10449
+ * Constructs a new GetDataContractHistoryRequest.
10062
10450
  * @memberof org.dash.platform.dapi.v0
10063
- * @classdesc Represents a GetDocumentsRequest.
10064
- * @implements IGetDocumentsRequest
10451
+ * @classdesc Represents a GetDataContractHistoryRequest.
10452
+ * @implements IGetDataContractHistoryRequest
10065
10453
  * @constructor
10066
- * @param {org.dash.platform.dapi.v0.IGetDocumentsRequest=} [properties] Properties to set
10454
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryRequest=} [properties] Properties to set
10067
10455
  */
10068
- function GetDocumentsRequest(properties) {
10456
+ function GetDataContractHistoryRequest(properties) {
10069
10457
  if (properties)
10070
10458
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
10071
10459
  if (properties[keys[i]] != null)
@@ -10073,61 +10461,1087 @@ $root.org = (function() {
10073
10461
  }
10074
10462
 
10075
10463
  /**
10076
- * GetDocumentsRequest dataContractId.
10077
- * @member {Uint8Array} dataContractId
10078
- * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
10464
+ * GetDataContractHistoryRequest id.
10465
+ * @member {Uint8Array} id
10466
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10079
10467
  * @instance
10080
10468
  */
10081
- GetDocumentsRequest.prototype.dataContractId = $util.newBuffer([]);
10469
+ GetDataContractHistoryRequest.prototype.id = $util.newBuffer([]);
10082
10470
 
10083
10471
  /**
10084
- * GetDocumentsRequest documentType.
10085
- * @member {string} documentType
10086
- * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
10472
+ * GetDataContractHistoryRequest limit.
10473
+ * @member {google.protobuf.IUInt32Value|null|undefined} limit
10474
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10087
10475
  * @instance
10088
10476
  */
10089
- GetDocumentsRequest.prototype.documentType = "";
10477
+ GetDataContractHistoryRequest.prototype.limit = null;
10090
10478
 
10091
10479
  /**
10092
- * GetDocumentsRequest where.
10093
- * @member {Uint8Array} where
10094
- * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
10480
+ * GetDataContractHistoryRequest offset.
10481
+ * @member {google.protobuf.IUInt32Value|null|undefined} offset
10482
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10095
10483
  * @instance
10096
10484
  */
10097
- GetDocumentsRequest.prototype.where = $util.newBuffer([]);
10485
+ GetDataContractHistoryRequest.prototype.offset = null;
10098
10486
 
10099
10487
  /**
10100
- * GetDocumentsRequest orderBy.
10101
- * @member {Uint8Array} orderBy
10102
- * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
10488
+ * GetDataContractHistoryRequest startAtMs.
10489
+ * @member {number|Long} startAtMs
10490
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10103
10491
  * @instance
10104
10492
  */
10105
- GetDocumentsRequest.prototype.orderBy = $util.newBuffer([]);
10493
+ GetDataContractHistoryRequest.prototype.startAtMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
10106
10494
 
10107
10495
  /**
10108
- * GetDocumentsRequest limit.
10109
- * @member {number} limit
10110
- * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
10496
+ * GetDataContractHistoryRequest prove.
10497
+ * @member {boolean} prove
10498
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10111
10499
  * @instance
10112
10500
  */
10113
- GetDocumentsRequest.prototype.limit = 0;
10501
+ GetDataContractHistoryRequest.prototype.prove = false;
10114
10502
 
10115
10503
  /**
10116
- * GetDocumentsRequest startAfter.
10117
- * @member {Uint8Array} startAfter
10118
- * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
10119
- * @instance
10504
+ * Creates a new GetDataContractHistoryRequest instance using the specified properties.
10505
+ * @function create
10506
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10507
+ * @static
10508
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryRequest=} [properties] Properties to set
10509
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryRequest} GetDataContractHistoryRequest instance
10120
10510
  */
10121
- GetDocumentsRequest.prototype.startAfter = $util.newBuffer([]);
10511
+ GetDataContractHistoryRequest.create = function create(properties) {
10512
+ return new GetDataContractHistoryRequest(properties);
10513
+ };
10122
10514
 
10123
10515
  /**
10124
- * GetDocumentsRequest startAt.
10125
- * @member {Uint8Array} startAt
10126
- * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
10127
- * @instance
10128
- */
10129
- GetDocumentsRequest.prototype.startAt = $util.newBuffer([]);
10130
-
10516
+ * Encodes the specified GetDataContractHistoryRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryRequest.verify|verify} messages.
10517
+ * @function encode
10518
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10519
+ * @static
10520
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryRequest} message GetDataContractHistoryRequest message or plain object to encode
10521
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10522
+ * @returns {$protobuf.Writer} Writer
10523
+ */
10524
+ GetDataContractHistoryRequest.encode = function encode(message, writer) {
10525
+ if (!writer)
10526
+ writer = $Writer.create();
10527
+ if (message.id != null && Object.hasOwnProperty.call(message, "id"))
10528
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.id);
10529
+ if (message.limit != null && Object.hasOwnProperty.call(message, "limit"))
10530
+ $root.google.protobuf.UInt32Value.encode(message.limit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
10531
+ if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
10532
+ $root.google.protobuf.UInt32Value.encode(message.offset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
10533
+ if (message.startAtMs != null && Object.hasOwnProperty.call(message, "startAtMs"))
10534
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.startAtMs);
10535
+ if (message.prove != null && Object.hasOwnProperty.call(message, "prove"))
10536
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prove);
10537
+ return writer;
10538
+ };
10539
+
10540
+ /**
10541
+ * Encodes the specified GetDataContractHistoryRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryRequest.verify|verify} messages.
10542
+ * @function encodeDelimited
10543
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10544
+ * @static
10545
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryRequest} message GetDataContractHistoryRequest message or plain object to encode
10546
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10547
+ * @returns {$protobuf.Writer} Writer
10548
+ */
10549
+ GetDataContractHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) {
10550
+ return this.encode(message, writer).ldelim();
10551
+ };
10552
+
10553
+ /**
10554
+ * Decodes a GetDataContractHistoryRequest message from the specified reader or buffer.
10555
+ * @function decode
10556
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10557
+ * @static
10558
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10559
+ * @param {number} [length] Message length if known beforehand
10560
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryRequest} GetDataContractHistoryRequest
10561
+ * @throws {Error} If the payload is not a reader or valid buffer
10562
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10563
+ */
10564
+ GetDataContractHistoryRequest.decode = function decode(reader, length) {
10565
+ if (!(reader instanceof $Reader))
10566
+ reader = $Reader.create(reader);
10567
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryRequest();
10568
+ while (reader.pos < end) {
10569
+ var tag = reader.uint32();
10570
+ switch (tag >>> 3) {
10571
+ case 1:
10572
+ message.id = reader.bytes();
10573
+ break;
10574
+ case 2:
10575
+ message.limit = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32());
10576
+ break;
10577
+ case 3:
10578
+ message.offset = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32());
10579
+ break;
10580
+ case 4:
10581
+ message.startAtMs = reader.uint64();
10582
+ break;
10583
+ case 5:
10584
+ message.prove = reader.bool();
10585
+ break;
10586
+ default:
10587
+ reader.skipType(tag & 7);
10588
+ break;
10589
+ }
10590
+ }
10591
+ return message;
10592
+ };
10593
+
10594
+ /**
10595
+ * Decodes a GetDataContractHistoryRequest message from the specified reader or buffer, length delimited.
10596
+ * @function decodeDelimited
10597
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10598
+ * @static
10599
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10600
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryRequest} GetDataContractHistoryRequest
10601
+ * @throws {Error} If the payload is not a reader or valid buffer
10602
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10603
+ */
10604
+ GetDataContractHistoryRequest.decodeDelimited = function decodeDelimited(reader) {
10605
+ if (!(reader instanceof $Reader))
10606
+ reader = new $Reader(reader);
10607
+ return this.decode(reader, reader.uint32());
10608
+ };
10609
+
10610
+ /**
10611
+ * Verifies a GetDataContractHistoryRequest message.
10612
+ * @function verify
10613
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10614
+ * @static
10615
+ * @param {Object.<string,*>} message Plain object to verify
10616
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
10617
+ */
10618
+ GetDataContractHistoryRequest.verify = function verify(message) {
10619
+ if (typeof message !== "object" || message === null)
10620
+ return "object expected";
10621
+ if (message.id != null && message.hasOwnProperty("id"))
10622
+ if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id)))
10623
+ return "id: buffer expected";
10624
+ if (message.limit != null && message.hasOwnProperty("limit")) {
10625
+ var error = $root.google.protobuf.UInt32Value.verify(message.limit);
10626
+ if (error)
10627
+ return "limit." + error;
10628
+ }
10629
+ if (message.offset != null && message.hasOwnProperty("offset")) {
10630
+ var error = $root.google.protobuf.UInt32Value.verify(message.offset);
10631
+ if (error)
10632
+ return "offset." + error;
10633
+ }
10634
+ if (message.startAtMs != null && message.hasOwnProperty("startAtMs"))
10635
+ if (!$util.isInteger(message.startAtMs) && !(message.startAtMs && $util.isInteger(message.startAtMs.low) && $util.isInteger(message.startAtMs.high)))
10636
+ return "startAtMs: integer|Long expected";
10637
+ if (message.prove != null && message.hasOwnProperty("prove"))
10638
+ if (typeof message.prove !== "boolean")
10639
+ return "prove: boolean expected";
10640
+ return null;
10641
+ };
10642
+
10643
+ /**
10644
+ * Creates a GetDataContractHistoryRequest message from a plain object. Also converts values to their respective internal types.
10645
+ * @function fromObject
10646
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10647
+ * @static
10648
+ * @param {Object.<string,*>} object Plain object
10649
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryRequest} GetDataContractHistoryRequest
10650
+ */
10651
+ GetDataContractHistoryRequest.fromObject = function fromObject(object) {
10652
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractHistoryRequest)
10653
+ return object;
10654
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryRequest();
10655
+ if (object.id != null)
10656
+ if (typeof object.id === "string")
10657
+ $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0);
10658
+ else if (object.id.length >= 0)
10659
+ message.id = object.id;
10660
+ if (object.limit != null) {
10661
+ if (typeof object.limit !== "object")
10662
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryRequest.limit: object expected");
10663
+ message.limit = $root.google.protobuf.UInt32Value.fromObject(object.limit);
10664
+ }
10665
+ if (object.offset != null) {
10666
+ if (typeof object.offset !== "object")
10667
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryRequest.offset: object expected");
10668
+ message.offset = $root.google.protobuf.UInt32Value.fromObject(object.offset);
10669
+ }
10670
+ if (object.startAtMs != null)
10671
+ if ($util.Long)
10672
+ (message.startAtMs = $util.Long.fromValue(object.startAtMs)).unsigned = true;
10673
+ else if (typeof object.startAtMs === "string")
10674
+ message.startAtMs = parseInt(object.startAtMs, 10);
10675
+ else if (typeof object.startAtMs === "number")
10676
+ message.startAtMs = object.startAtMs;
10677
+ else if (typeof object.startAtMs === "object")
10678
+ message.startAtMs = new $util.LongBits(object.startAtMs.low >>> 0, object.startAtMs.high >>> 0).toNumber(true);
10679
+ if (object.prove != null)
10680
+ message.prove = Boolean(object.prove);
10681
+ return message;
10682
+ };
10683
+
10684
+ /**
10685
+ * Creates a plain object from a GetDataContractHistoryRequest message. Also converts values to other types if specified.
10686
+ * @function toObject
10687
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10688
+ * @static
10689
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryRequest} message GetDataContractHistoryRequest
10690
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
10691
+ * @returns {Object.<string,*>} Plain object
10692
+ */
10693
+ GetDataContractHistoryRequest.toObject = function toObject(message, options) {
10694
+ if (!options)
10695
+ options = {};
10696
+ var object = {};
10697
+ if (options.defaults) {
10698
+ if (options.bytes === String)
10699
+ object.id = "";
10700
+ else {
10701
+ object.id = [];
10702
+ if (options.bytes !== Array)
10703
+ object.id = $util.newBuffer(object.id);
10704
+ }
10705
+ object.limit = null;
10706
+ object.offset = null;
10707
+ if ($util.Long) {
10708
+ var long = new $util.Long(0, 0, true);
10709
+ object.startAtMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
10710
+ } else
10711
+ object.startAtMs = options.longs === String ? "0" : 0;
10712
+ object.prove = false;
10713
+ }
10714
+ if (message.id != null && message.hasOwnProperty("id"))
10715
+ object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id;
10716
+ if (message.limit != null && message.hasOwnProperty("limit"))
10717
+ object.limit = $root.google.protobuf.UInt32Value.toObject(message.limit, options);
10718
+ if (message.offset != null && message.hasOwnProperty("offset"))
10719
+ object.offset = $root.google.protobuf.UInt32Value.toObject(message.offset, options);
10720
+ if (message.startAtMs != null && message.hasOwnProperty("startAtMs"))
10721
+ if (typeof message.startAtMs === "number")
10722
+ object.startAtMs = options.longs === String ? String(message.startAtMs) : message.startAtMs;
10723
+ else
10724
+ object.startAtMs = options.longs === String ? $util.Long.prototype.toString.call(message.startAtMs) : options.longs === Number ? new $util.LongBits(message.startAtMs.low >>> 0, message.startAtMs.high >>> 0).toNumber(true) : message.startAtMs;
10725
+ if (message.prove != null && message.hasOwnProperty("prove"))
10726
+ object.prove = message.prove;
10727
+ return object;
10728
+ };
10729
+
10730
+ /**
10731
+ * Converts this GetDataContractHistoryRequest to JSON.
10732
+ * @function toJSON
10733
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
10734
+ * @instance
10735
+ * @returns {Object.<string,*>} JSON object
10736
+ */
10737
+ GetDataContractHistoryRequest.prototype.toJSON = function toJSON() {
10738
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
10739
+ };
10740
+
10741
+ return GetDataContractHistoryRequest;
10742
+ })();
10743
+
10744
+ v0.GetDataContractHistoryResponse = (function() {
10745
+
10746
+ /**
10747
+ * Properties of a GetDataContractHistoryResponse.
10748
+ * @memberof org.dash.platform.dapi.v0
10749
+ * @interface IGetDataContractHistoryResponse
10750
+ * @property {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory|null} [dataContractHistory] GetDataContractHistoryResponse dataContractHistory
10751
+ * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDataContractHistoryResponse proof
10752
+ * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDataContractHistoryResponse metadata
10753
+ */
10754
+
10755
+ /**
10756
+ * Constructs a new GetDataContractHistoryResponse.
10757
+ * @memberof org.dash.platform.dapi.v0
10758
+ * @classdesc Represents a GetDataContractHistoryResponse.
10759
+ * @implements IGetDataContractHistoryResponse
10760
+ * @constructor
10761
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryResponse=} [properties] Properties to set
10762
+ */
10763
+ function GetDataContractHistoryResponse(properties) {
10764
+ if (properties)
10765
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
10766
+ if (properties[keys[i]] != null)
10767
+ this[keys[i]] = properties[keys[i]];
10768
+ }
10769
+
10770
+ /**
10771
+ * GetDataContractHistoryResponse dataContractHistory.
10772
+ * @member {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory|null|undefined} dataContractHistory
10773
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10774
+ * @instance
10775
+ */
10776
+ GetDataContractHistoryResponse.prototype.dataContractHistory = null;
10777
+
10778
+ /**
10779
+ * GetDataContractHistoryResponse proof.
10780
+ * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof
10781
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10782
+ * @instance
10783
+ */
10784
+ GetDataContractHistoryResponse.prototype.proof = null;
10785
+
10786
+ /**
10787
+ * GetDataContractHistoryResponse metadata.
10788
+ * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata
10789
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10790
+ * @instance
10791
+ */
10792
+ GetDataContractHistoryResponse.prototype.metadata = null;
10793
+
10794
+ // OneOf field names bound to virtual getters and setters
10795
+ var $oneOfFields;
10796
+
10797
+ /**
10798
+ * GetDataContractHistoryResponse result.
10799
+ * @member {"dataContractHistory"|"proof"|undefined} result
10800
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10801
+ * @instance
10802
+ */
10803
+ Object.defineProperty(GetDataContractHistoryResponse.prototype, "result", {
10804
+ get: $util.oneOfGetter($oneOfFields = ["dataContractHistory", "proof"]),
10805
+ set: $util.oneOfSetter($oneOfFields)
10806
+ });
10807
+
10808
+ /**
10809
+ * Creates a new GetDataContractHistoryResponse instance using the specified properties.
10810
+ * @function create
10811
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10812
+ * @static
10813
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryResponse=} [properties] Properties to set
10814
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} GetDataContractHistoryResponse instance
10815
+ */
10816
+ GetDataContractHistoryResponse.create = function create(properties) {
10817
+ return new GetDataContractHistoryResponse(properties);
10818
+ };
10819
+
10820
+ /**
10821
+ * Encodes the specified GetDataContractHistoryResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.verify|verify} messages.
10822
+ * @function encode
10823
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10824
+ * @static
10825
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryResponse} message GetDataContractHistoryResponse message or plain object to encode
10826
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10827
+ * @returns {$protobuf.Writer} Writer
10828
+ */
10829
+ GetDataContractHistoryResponse.encode = function encode(message, writer) {
10830
+ if (!writer)
10831
+ writer = $Writer.create();
10832
+ if (message.dataContractHistory != null && Object.hasOwnProperty.call(message, "dataContractHistory"))
10833
+ $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.encode(message.dataContractHistory, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
10834
+ if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
10835
+ $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
10836
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
10837
+ $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
10838
+ return writer;
10839
+ };
10840
+
10841
+ /**
10842
+ * Encodes the specified GetDataContractHistoryResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.verify|verify} messages.
10843
+ * @function encodeDelimited
10844
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10845
+ * @static
10846
+ * @param {org.dash.platform.dapi.v0.IGetDataContractHistoryResponse} message GetDataContractHistoryResponse message or plain object to encode
10847
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10848
+ * @returns {$protobuf.Writer} Writer
10849
+ */
10850
+ GetDataContractHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) {
10851
+ return this.encode(message, writer).ldelim();
10852
+ };
10853
+
10854
+ /**
10855
+ * Decodes a GetDataContractHistoryResponse message from the specified reader or buffer.
10856
+ * @function decode
10857
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10858
+ * @static
10859
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10860
+ * @param {number} [length] Message length if known beforehand
10861
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} GetDataContractHistoryResponse
10862
+ * @throws {Error} If the payload is not a reader or valid buffer
10863
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10864
+ */
10865
+ GetDataContractHistoryResponse.decode = function decode(reader, length) {
10866
+ if (!(reader instanceof $Reader))
10867
+ reader = $Reader.create(reader);
10868
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse();
10869
+ while (reader.pos < end) {
10870
+ var tag = reader.uint32();
10871
+ switch (tag >>> 3) {
10872
+ case 1:
10873
+ message.dataContractHistory = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.decode(reader, reader.uint32());
10874
+ break;
10875
+ case 2:
10876
+ message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
10877
+ break;
10878
+ case 3:
10879
+ message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32());
10880
+ break;
10881
+ default:
10882
+ reader.skipType(tag & 7);
10883
+ break;
10884
+ }
10885
+ }
10886
+ return message;
10887
+ };
10888
+
10889
+ /**
10890
+ * Decodes a GetDataContractHistoryResponse message from the specified reader or buffer, length delimited.
10891
+ * @function decodeDelimited
10892
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10893
+ * @static
10894
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10895
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} GetDataContractHistoryResponse
10896
+ * @throws {Error} If the payload is not a reader or valid buffer
10897
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10898
+ */
10899
+ GetDataContractHistoryResponse.decodeDelimited = function decodeDelimited(reader) {
10900
+ if (!(reader instanceof $Reader))
10901
+ reader = new $Reader(reader);
10902
+ return this.decode(reader, reader.uint32());
10903
+ };
10904
+
10905
+ /**
10906
+ * Verifies a GetDataContractHistoryResponse message.
10907
+ * @function verify
10908
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10909
+ * @static
10910
+ * @param {Object.<string,*>} message Plain object to verify
10911
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
10912
+ */
10913
+ GetDataContractHistoryResponse.verify = function verify(message) {
10914
+ if (typeof message !== "object" || message === null)
10915
+ return "object expected";
10916
+ var properties = {};
10917
+ if (message.dataContractHistory != null && message.hasOwnProperty("dataContractHistory")) {
10918
+ properties.result = 1;
10919
+ {
10920
+ var error = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.verify(message.dataContractHistory);
10921
+ if (error)
10922
+ return "dataContractHistory." + error;
10923
+ }
10924
+ }
10925
+ if (message.proof != null && message.hasOwnProperty("proof")) {
10926
+ if (properties.result === 1)
10927
+ return "result: multiple values";
10928
+ properties.result = 1;
10929
+ {
10930
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
10931
+ if (error)
10932
+ return "proof." + error;
10933
+ }
10934
+ }
10935
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
10936
+ var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
10937
+ if (error)
10938
+ return "metadata." + error;
10939
+ }
10940
+ return null;
10941
+ };
10942
+
10943
+ /**
10944
+ * Creates a GetDataContractHistoryResponse message from a plain object. Also converts values to their respective internal types.
10945
+ * @function fromObject
10946
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10947
+ * @static
10948
+ * @param {Object.<string,*>} object Plain object
10949
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} GetDataContractHistoryResponse
10950
+ */
10951
+ GetDataContractHistoryResponse.fromObject = function fromObject(object) {
10952
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse)
10953
+ return object;
10954
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse();
10955
+ if (object.dataContractHistory != null) {
10956
+ if (typeof object.dataContractHistory !== "object")
10957
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.dataContractHistory: object expected");
10958
+ message.dataContractHistory = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.fromObject(object.dataContractHistory);
10959
+ }
10960
+ if (object.proof != null) {
10961
+ if (typeof object.proof !== "object")
10962
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.proof: object expected");
10963
+ message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof);
10964
+ }
10965
+ if (object.metadata != null) {
10966
+ if (typeof object.metadata !== "object")
10967
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.metadata: object expected");
10968
+ message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata);
10969
+ }
10970
+ return message;
10971
+ };
10972
+
10973
+ /**
10974
+ * Creates a plain object from a GetDataContractHistoryResponse message. Also converts values to other types if specified.
10975
+ * @function toObject
10976
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
10977
+ * @static
10978
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} message GetDataContractHistoryResponse
10979
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
10980
+ * @returns {Object.<string,*>} Plain object
10981
+ */
10982
+ GetDataContractHistoryResponse.toObject = function toObject(message, options) {
10983
+ if (!options)
10984
+ options = {};
10985
+ var object = {};
10986
+ if (options.defaults)
10987
+ object.metadata = null;
10988
+ if (message.dataContractHistory != null && message.hasOwnProperty("dataContractHistory")) {
10989
+ object.dataContractHistory = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.toObject(message.dataContractHistory, options);
10990
+ if (options.oneofs)
10991
+ object.result = "dataContractHistory";
10992
+ }
10993
+ if (message.proof != null && message.hasOwnProperty("proof")) {
10994
+ object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
10995
+ if (options.oneofs)
10996
+ object.result = "proof";
10997
+ }
10998
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
10999
+ object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
11000
+ return object;
11001
+ };
11002
+
11003
+ /**
11004
+ * Converts this GetDataContractHistoryResponse to JSON.
11005
+ * @function toJSON
11006
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
11007
+ * @instance
11008
+ * @returns {Object.<string,*>} JSON object
11009
+ */
11010
+ GetDataContractHistoryResponse.prototype.toJSON = function toJSON() {
11011
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
11012
+ };
11013
+
11014
+ GetDataContractHistoryResponse.DataContractHistoryEntry = (function() {
11015
+
11016
+ /**
11017
+ * Properties of a DataContractHistoryEntry.
11018
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
11019
+ * @interface IDataContractHistoryEntry
11020
+ * @property {number|Long|null} [date] DataContractHistoryEntry date
11021
+ * @property {Uint8Array|null} [value] DataContractHistoryEntry value
11022
+ */
11023
+
11024
+ /**
11025
+ * Constructs a new DataContractHistoryEntry.
11026
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
11027
+ * @classdesc Represents a DataContractHistoryEntry.
11028
+ * @implements IDataContractHistoryEntry
11029
+ * @constructor
11030
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry=} [properties] Properties to set
11031
+ */
11032
+ function DataContractHistoryEntry(properties) {
11033
+ if (properties)
11034
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
11035
+ if (properties[keys[i]] != null)
11036
+ this[keys[i]] = properties[keys[i]];
11037
+ }
11038
+
11039
+ /**
11040
+ * DataContractHistoryEntry date.
11041
+ * @member {number|Long} date
11042
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11043
+ * @instance
11044
+ */
11045
+ DataContractHistoryEntry.prototype.date = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
11046
+
11047
+ /**
11048
+ * DataContractHistoryEntry value.
11049
+ * @member {Uint8Array} value
11050
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11051
+ * @instance
11052
+ */
11053
+ DataContractHistoryEntry.prototype.value = $util.newBuffer([]);
11054
+
11055
+ /**
11056
+ * Creates a new DataContractHistoryEntry instance using the specified properties.
11057
+ * @function create
11058
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11059
+ * @static
11060
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry=} [properties] Properties to set
11061
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} DataContractHistoryEntry instance
11062
+ */
11063
+ DataContractHistoryEntry.create = function create(properties) {
11064
+ return new DataContractHistoryEntry(properties);
11065
+ };
11066
+
11067
+ /**
11068
+ * Encodes the specified DataContractHistoryEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.verify|verify} messages.
11069
+ * @function encode
11070
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11071
+ * @static
11072
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry} message DataContractHistoryEntry message or plain object to encode
11073
+ * @param {$protobuf.Writer} [writer] Writer to encode to
11074
+ * @returns {$protobuf.Writer} Writer
11075
+ */
11076
+ DataContractHistoryEntry.encode = function encode(message, writer) {
11077
+ if (!writer)
11078
+ writer = $Writer.create();
11079
+ if (message.date != null && Object.hasOwnProperty.call(message, "date"))
11080
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.date);
11081
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
11082
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
11083
+ return writer;
11084
+ };
11085
+
11086
+ /**
11087
+ * Encodes the specified DataContractHistoryEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.verify|verify} messages.
11088
+ * @function encodeDelimited
11089
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11090
+ * @static
11091
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry} message DataContractHistoryEntry message or plain object to encode
11092
+ * @param {$protobuf.Writer} [writer] Writer to encode to
11093
+ * @returns {$protobuf.Writer} Writer
11094
+ */
11095
+ DataContractHistoryEntry.encodeDelimited = function encodeDelimited(message, writer) {
11096
+ return this.encode(message, writer).ldelim();
11097
+ };
11098
+
11099
+ /**
11100
+ * Decodes a DataContractHistoryEntry message from the specified reader or buffer.
11101
+ * @function decode
11102
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11103
+ * @static
11104
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
11105
+ * @param {number} [length] Message length if known beforehand
11106
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} DataContractHistoryEntry
11107
+ * @throws {Error} If the payload is not a reader or valid buffer
11108
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
11109
+ */
11110
+ DataContractHistoryEntry.decode = function decode(reader, length) {
11111
+ if (!(reader instanceof $Reader))
11112
+ reader = $Reader.create(reader);
11113
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry();
11114
+ while (reader.pos < end) {
11115
+ var tag = reader.uint32();
11116
+ switch (tag >>> 3) {
11117
+ case 1:
11118
+ message.date = reader.uint64();
11119
+ break;
11120
+ case 2:
11121
+ message.value = reader.bytes();
11122
+ break;
11123
+ default:
11124
+ reader.skipType(tag & 7);
11125
+ break;
11126
+ }
11127
+ }
11128
+ return message;
11129
+ };
11130
+
11131
+ /**
11132
+ * Decodes a DataContractHistoryEntry message from the specified reader or buffer, length delimited.
11133
+ * @function decodeDelimited
11134
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11135
+ * @static
11136
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
11137
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} DataContractHistoryEntry
11138
+ * @throws {Error} If the payload is not a reader or valid buffer
11139
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
11140
+ */
11141
+ DataContractHistoryEntry.decodeDelimited = function decodeDelimited(reader) {
11142
+ if (!(reader instanceof $Reader))
11143
+ reader = new $Reader(reader);
11144
+ return this.decode(reader, reader.uint32());
11145
+ };
11146
+
11147
+ /**
11148
+ * Verifies a DataContractHistoryEntry message.
11149
+ * @function verify
11150
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11151
+ * @static
11152
+ * @param {Object.<string,*>} message Plain object to verify
11153
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
11154
+ */
11155
+ DataContractHistoryEntry.verify = function verify(message) {
11156
+ if (typeof message !== "object" || message === null)
11157
+ return "object expected";
11158
+ if (message.date != null && message.hasOwnProperty("date"))
11159
+ if (!$util.isInteger(message.date) && !(message.date && $util.isInteger(message.date.low) && $util.isInteger(message.date.high)))
11160
+ return "date: integer|Long expected";
11161
+ if (message.value != null && message.hasOwnProperty("value"))
11162
+ if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
11163
+ return "value: buffer expected";
11164
+ return null;
11165
+ };
11166
+
11167
+ /**
11168
+ * Creates a DataContractHistoryEntry message from a plain object. Also converts values to their respective internal types.
11169
+ * @function fromObject
11170
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11171
+ * @static
11172
+ * @param {Object.<string,*>} object Plain object
11173
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} DataContractHistoryEntry
11174
+ */
11175
+ DataContractHistoryEntry.fromObject = function fromObject(object) {
11176
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry)
11177
+ return object;
11178
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry();
11179
+ if (object.date != null)
11180
+ if ($util.Long)
11181
+ (message.date = $util.Long.fromValue(object.date)).unsigned = true;
11182
+ else if (typeof object.date === "string")
11183
+ message.date = parseInt(object.date, 10);
11184
+ else if (typeof object.date === "number")
11185
+ message.date = object.date;
11186
+ else if (typeof object.date === "object")
11187
+ message.date = new $util.LongBits(object.date.low >>> 0, object.date.high >>> 0).toNumber(true);
11188
+ if (object.value != null)
11189
+ if (typeof object.value === "string")
11190
+ $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
11191
+ else if (object.value.length >= 0)
11192
+ message.value = object.value;
11193
+ return message;
11194
+ };
11195
+
11196
+ /**
11197
+ * Creates a plain object from a DataContractHistoryEntry message. Also converts values to other types if specified.
11198
+ * @function toObject
11199
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11200
+ * @static
11201
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} message DataContractHistoryEntry
11202
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
11203
+ * @returns {Object.<string,*>} Plain object
11204
+ */
11205
+ DataContractHistoryEntry.toObject = function toObject(message, options) {
11206
+ if (!options)
11207
+ options = {};
11208
+ var object = {};
11209
+ if (options.defaults) {
11210
+ if ($util.Long) {
11211
+ var long = new $util.Long(0, 0, true);
11212
+ object.date = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
11213
+ } else
11214
+ object.date = options.longs === String ? "0" : 0;
11215
+ if (options.bytes === String)
11216
+ object.value = "";
11217
+ else {
11218
+ object.value = [];
11219
+ if (options.bytes !== Array)
11220
+ object.value = $util.newBuffer(object.value);
11221
+ }
11222
+ }
11223
+ if (message.date != null && message.hasOwnProperty("date"))
11224
+ if (typeof message.date === "number")
11225
+ object.date = options.longs === String ? String(message.date) : message.date;
11226
+ else
11227
+ object.date = options.longs === String ? $util.Long.prototype.toString.call(message.date) : options.longs === Number ? new $util.LongBits(message.date.low >>> 0, message.date.high >>> 0).toNumber(true) : message.date;
11228
+ if (message.value != null && message.hasOwnProperty("value"))
11229
+ object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
11230
+ return object;
11231
+ };
11232
+
11233
+ /**
11234
+ * Converts this DataContractHistoryEntry to JSON.
11235
+ * @function toJSON
11236
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
11237
+ * @instance
11238
+ * @returns {Object.<string,*>} JSON object
11239
+ */
11240
+ DataContractHistoryEntry.prototype.toJSON = function toJSON() {
11241
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
11242
+ };
11243
+
11244
+ return DataContractHistoryEntry;
11245
+ })();
11246
+
11247
+ GetDataContractHistoryResponse.DataContractHistory = (function() {
11248
+
11249
+ /**
11250
+ * Properties of a DataContractHistory.
11251
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
11252
+ * @interface IDataContractHistory
11253
+ * @property {Array.<org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry>|null} [dataContractEntries] DataContractHistory dataContractEntries
11254
+ */
11255
+
11256
+ /**
11257
+ * Constructs a new DataContractHistory.
11258
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
11259
+ * @classdesc Represents a DataContractHistory.
11260
+ * @implements IDataContractHistory
11261
+ * @constructor
11262
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory=} [properties] Properties to set
11263
+ */
11264
+ function DataContractHistory(properties) {
11265
+ this.dataContractEntries = [];
11266
+ if (properties)
11267
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
11268
+ if (properties[keys[i]] != null)
11269
+ this[keys[i]] = properties[keys[i]];
11270
+ }
11271
+
11272
+ /**
11273
+ * DataContractHistory dataContractEntries.
11274
+ * @member {Array.<org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry>} dataContractEntries
11275
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11276
+ * @instance
11277
+ */
11278
+ DataContractHistory.prototype.dataContractEntries = $util.emptyArray;
11279
+
11280
+ /**
11281
+ * Creates a new DataContractHistory instance using the specified properties.
11282
+ * @function create
11283
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11284
+ * @static
11285
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory=} [properties] Properties to set
11286
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} DataContractHistory instance
11287
+ */
11288
+ DataContractHistory.create = function create(properties) {
11289
+ return new DataContractHistory(properties);
11290
+ };
11291
+
11292
+ /**
11293
+ * Encodes the specified DataContractHistory message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.verify|verify} messages.
11294
+ * @function encode
11295
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11296
+ * @static
11297
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory} message DataContractHistory message or plain object to encode
11298
+ * @param {$protobuf.Writer} [writer] Writer to encode to
11299
+ * @returns {$protobuf.Writer} Writer
11300
+ */
11301
+ DataContractHistory.encode = function encode(message, writer) {
11302
+ if (!writer)
11303
+ writer = $Writer.create();
11304
+ if (message.dataContractEntries != null && message.dataContractEntries.length)
11305
+ for (var i = 0; i < message.dataContractEntries.length; ++i)
11306
+ $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.encode(message.dataContractEntries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
11307
+ return writer;
11308
+ };
11309
+
11310
+ /**
11311
+ * Encodes the specified DataContractHistory message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.verify|verify} messages.
11312
+ * @function encodeDelimited
11313
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11314
+ * @static
11315
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory} message DataContractHistory message or plain object to encode
11316
+ * @param {$protobuf.Writer} [writer] Writer to encode to
11317
+ * @returns {$protobuf.Writer} Writer
11318
+ */
11319
+ DataContractHistory.encodeDelimited = function encodeDelimited(message, writer) {
11320
+ return this.encode(message, writer).ldelim();
11321
+ };
11322
+
11323
+ /**
11324
+ * Decodes a DataContractHistory message from the specified reader or buffer.
11325
+ * @function decode
11326
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11327
+ * @static
11328
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
11329
+ * @param {number} [length] Message length if known beforehand
11330
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} DataContractHistory
11331
+ * @throws {Error} If the payload is not a reader or valid buffer
11332
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
11333
+ */
11334
+ DataContractHistory.decode = function decode(reader, length) {
11335
+ if (!(reader instanceof $Reader))
11336
+ reader = $Reader.create(reader);
11337
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory();
11338
+ while (reader.pos < end) {
11339
+ var tag = reader.uint32();
11340
+ switch (tag >>> 3) {
11341
+ case 1:
11342
+ if (!(message.dataContractEntries && message.dataContractEntries.length))
11343
+ message.dataContractEntries = [];
11344
+ message.dataContractEntries.push($root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.decode(reader, reader.uint32()));
11345
+ break;
11346
+ default:
11347
+ reader.skipType(tag & 7);
11348
+ break;
11349
+ }
11350
+ }
11351
+ return message;
11352
+ };
11353
+
11354
+ /**
11355
+ * Decodes a DataContractHistory message from the specified reader or buffer, length delimited.
11356
+ * @function decodeDelimited
11357
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11358
+ * @static
11359
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
11360
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} DataContractHistory
11361
+ * @throws {Error} If the payload is not a reader or valid buffer
11362
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
11363
+ */
11364
+ DataContractHistory.decodeDelimited = function decodeDelimited(reader) {
11365
+ if (!(reader instanceof $Reader))
11366
+ reader = new $Reader(reader);
11367
+ return this.decode(reader, reader.uint32());
11368
+ };
11369
+
11370
+ /**
11371
+ * Verifies a DataContractHistory message.
11372
+ * @function verify
11373
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11374
+ * @static
11375
+ * @param {Object.<string,*>} message Plain object to verify
11376
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
11377
+ */
11378
+ DataContractHistory.verify = function verify(message) {
11379
+ if (typeof message !== "object" || message === null)
11380
+ return "object expected";
11381
+ if (message.dataContractEntries != null && message.hasOwnProperty("dataContractEntries")) {
11382
+ if (!Array.isArray(message.dataContractEntries))
11383
+ return "dataContractEntries: array expected";
11384
+ for (var i = 0; i < message.dataContractEntries.length; ++i) {
11385
+ var error = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.verify(message.dataContractEntries[i]);
11386
+ if (error)
11387
+ return "dataContractEntries." + error;
11388
+ }
11389
+ }
11390
+ return null;
11391
+ };
11392
+
11393
+ /**
11394
+ * Creates a DataContractHistory message from a plain object. Also converts values to their respective internal types.
11395
+ * @function fromObject
11396
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11397
+ * @static
11398
+ * @param {Object.<string,*>} object Plain object
11399
+ * @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} DataContractHistory
11400
+ */
11401
+ DataContractHistory.fromObject = function fromObject(object) {
11402
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory)
11403
+ return object;
11404
+ var message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory();
11405
+ if (object.dataContractEntries) {
11406
+ if (!Array.isArray(object.dataContractEntries))
11407
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.dataContractEntries: array expected");
11408
+ message.dataContractEntries = [];
11409
+ for (var i = 0; i < object.dataContractEntries.length; ++i) {
11410
+ if (typeof object.dataContractEntries[i] !== "object")
11411
+ throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.dataContractEntries: object expected");
11412
+ message.dataContractEntries[i] = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.fromObject(object.dataContractEntries[i]);
11413
+ }
11414
+ }
11415
+ return message;
11416
+ };
11417
+
11418
+ /**
11419
+ * Creates a plain object from a DataContractHistory message. Also converts values to other types if specified.
11420
+ * @function toObject
11421
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11422
+ * @static
11423
+ * @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} message DataContractHistory
11424
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
11425
+ * @returns {Object.<string,*>} Plain object
11426
+ */
11427
+ DataContractHistory.toObject = function toObject(message, options) {
11428
+ if (!options)
11429
+ options = {};
11430
+ var object = {};
11431
+ if (options.arrays || options.defaults)
11432
+ object.dataContractEntries = [];
11433
+ if (message.dataContractEntries && message.dataContractEntries.length) {
11434
+ object.dataContractEntries = [];
11435
+ for (var j = 0; j < message.dataContractEntries.length; ++j)
11436
+ object.dataContractEntries[j] = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.toObject(message.dataContractEntries[j], options);
11437
+ }
11438
+ return object;
11439
+ };
11440
+
11441
+ /**
11442
+ * Converts this DataContractHistory to JSON.
11443
+ * @function toJSON
11444
+ * @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
11445
+ * @instance
11446
+ * @returns {Object.<string,*>} JSON object
11447
+ */
11448
+ DataContractHistory.prototype.toJSON = function toJSON() {
11449
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
11450
+ };
11451
+
11452
+ return DataContractHistory;
11453
+ })();
11454
+
11455
+ return GetDataContractHistoryResponse;
11456
+ })();
11457
+
11458
+ v0.GetDocumentsRequest = (function() {
11459
+
11460
+ /**
11461
+ * Properties of a GetDocumentsRequest.
11462
+ * @memberof org.dash.platform.dapi.v0
11463
+ * @interface IGetDocumentsRequest
11464
+ * @property {Uint8Array|null} [dataContractId] GetDocumentsRequest dataContractId
11465
+ * @property {string|null} [documentType] GetDocumentsRequest documentType
11466
+ * @property {Uint8Array|null} [where] GetDocumentsRequest where
11467
+ * @property {Uint8Array|null} [orderBy] GetDocumentsRequest orderBy
11468
+ * @property {number|null} [limit] GetDocumentsRequest limit
11469
+ * @property {Uint8Array|null} [startAfter] GetDocumentsRequest startAfter
11470
+ * @property {Uint8Array|null} [startAt] GetDocumentsRequest startAt
11471
+ * @property {boolean|null} [prove] GetDocumentsRequest prove
11472
+ */
11473
+
11474
+ /**
11475
+ * Constructs a new GetDocumentsRequest.
11476
+ * @memberof org.dash.platform.dapi.v0
11477
+ * @classdesc Represents a GetDocumentsRequest.
11478
+ * @implements IGetDocumentsRequest
11479
+ * @constructor
11480
+ * @param {org.dash.platform.dapi.v0.IGetDocumentsRequest=} [properties] Properties to set
11481
+ */
11482
+ function GetDocumentsRequest(properties) {
11483
+ if (properties)
11484
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
11485
+ if (properties[keys[i]] != null)
11486
+ this[keys[i]] = properties[keys[i]];
11487
+ }
11488
+
11489
+ /**
11490
+ * GetDocumentsRequest dataContractId.
11491
+ * @member {Uint8Array} dataContractId
11492
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
11493
+ * @instance
11494
+ */
11495
+ GetDocumentsRequest.prototype.dataContractId = $util.newBuffer([]);
11496
+
11497
+ /**
11498
+ * GetDocumentsRequest documentType.
11499
+ * @member {string} documentType
11500
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
11501
+ * @instance
11502
+ */
11503
+ GetDocumentsRequest.prototype.documentType = "";
11504
+
11505
+ /**
11506
+ * GetDocumentsRequest where.
11507
+ * @member {Uint8Array} where
11508
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
11509
+ * @instance
11510
+ */
11511
+ GetDocumentsRequest.prototype.where = $util.newBuffer([]);
11512
+
11513
+ /**
11514
+ * GetDocumentsRequest orderBy.
11515
+ * @member {Uint8Array} orderBy
11516
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
11517
+ * @instance
11518
+ */
11519
+ GetDocumentsRequest.prototype.orderBy = $util.newBuffer([]);
11520
+
11521
+ /**
11522
+ * GetDocumentsRequest limit.
11523
+ * @member {number} limit
11524
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
11525
+ * @instance
11526
+ */
11527
+ GetDocumentsRequest.prototype.limit = 0;
11528
+
11529
+ /**
11530
+ * GetDocumentsRequest startAfter.
11531
+ * @member {Uint8Array} startAfter
11532
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
11533
+ * @instance
11534
+ */
11535
+ GetDocumentsRequest.prototype.startAfter = $util.newBuffer([]);
11536
+
11537
+ /**
11538
+ * GetDocumentsRequest startAt.
11539
+ * @member {Uint8Array} startAt
11540
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
11541
+ * @instance
11542
+ */
11543
+ GetDocumentsRequest.prototype.startAt = $util.newBuffer([]);
11544
+
10131
11545
  /**
10132
11546
  * GetDocumentsRequest prove.
10133
11547
  * @member {boolean} prove
@@ -10447,7 +11861,7 @@ $root.org = (function() {
10447
11861
  * Properties of a GetDocumentsResponse.
10448
11862
  * @memberof org.dash.platform.dapi.v0
10449
11863
  * @interface IGetDocumentsResponse
10450
- * @property {Array.<Uint8Array>|null} [documents] GetDocumentsResponse documents
11864
+ * @property {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments|null} [documents] GetDocumentsResponse documents
10451
11865
  * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDocumentsResponse proof
10452
11866
  * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDocumentsResponse metadata
10453
11867
  */
@@ -10461,7 +11875,6 @@ $root.org = (function() {
10461
11875
  * @param {org.dash.platform.dapi.v0.IGetDocumentsResponse=} [properties] Properties to set
10462
11876
  */
10463
11877
  function GetDocumentsResponse(properties) {
10464
- this.documents = [];
10465
11878
  if (properties)
10466
11879
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
10467
11880
  if (properties[keys[i]] != null)
@@ -10470,11 +11883,11 @@ $root.org = (function() {
10470
11883
 
10471
11884
  /**
10472
11885
  * GetDocumentsResponse documents.
10473
- * @member {Array.<Uint8Array>} documents
11886
+ * @member {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments|null|undefined} documents
10474
11887
  * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
10475
11888
  * @instance
10476
11889
  */
10477
- GetDocumentsResponse.prototype.documents = $util.emptyArray;
11890
+ GetDocumentsResponse.prototype.documents = null;
10478
11891
 
10479
11892
  /**
10480
11893
  * GetDocumentsResponse proof.
@@ -10492,6 +11905,20 @@ $root.org = (function() {
10492
11905
  */
10493
11906
  GetDocumentsResponse.prototype.metadata = null;
10494
11907
 
11908
+ // OneOf field names bound to virtual getters and setters
11909
+ var $oneOfFields;
11910
+
11911
+ /**
11912
+ * GetDocumentsResponse result.
11913
+ * @member {"documents"|"proof"|undefined} result
11914
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
11915
+ * @instance
11916
+ */
11917
+ Object.defineProperty(GetDocumentsResponse.prototype, "result", {
11918
+ get: $util.oneOfGetter($oneOfFields = ["documents", "proof"]),
11919
+ set: $util.oneOfSetter($oneOfFields)
11920
+ });
11921
+
10495
11922
  /**
10496
11923
  * Creates a new GetDocumentsResponse instance using the specified properties.
10497
11924
  * @function create
@@ -10516,9 +11943,8 @@ $root.org = (function() {
10516
11943
  GetDocumentsResponse.encode = function encode(message, writer) {
10517
11944
  if (!writer)
10518
11945
  writer = $Writer.create();
10519
- if (message.documents != null && message.documents.length)
10520
- for (var i = 0; i < message.documents.length; ++i)
10521
- writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.documents[i]);
11946
+ if (message.documents != null && Object.hasOwnProperty.call(message, "documents"))
11947
+ $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.encode(message.documents, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
10522
11948
  if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
10523
11949
  $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
10524
11950
  if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
@@ -10558,9 +11984,7 @@ $root.org = (function() {
10558
11984
  var tag = reader.uint32();
10559
11985
  switch (tag >>> 3) {
10560
11986
  case 1:
10561
- if (!(message.documents && message.documents.length))
10562
- message.documents = [];
10563
- message.documents.push(reader.bytes());
11987
+ message.documents = $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.decode(reader, reader.uint32());
10564
11988
  break;
10565
11989
  case 2:
10566
11990
  message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
@@ -10603,17 +12027,24 @@ $root.org = (function() {
10603
12027
  GetDocumentsResponse.verify = function verify(message) {
10604
12028
  if (typeof message !== "object" || message === null)
10605
12029
  return "object expected";
12030
+ var properties = {};
10606
12031
  if (message.documents != null && message.hasOwnProperty("documents")) {
10607
- if (!Array.isArray(message.documents))
10608
- return "documents: array expected";
10609
- for (var i = 0; i < message.documents.length; ++i)
10610
- if (!(message.documents[i] && typeof message.documents[i].length === "number" || $util.isString(message.documents[i])))
10611
- return "documents: buffer[] expected";
12032
+ properties.result = 1;
12033
+ {
12034
+ var error = $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.verify(message.documents);
12035
+ if (error)
12036
+ return "documents." + error;
12037
+ }
10612
12038
  }
10613
12039
  if (message.proof != null && message.hasOwnProperty("proof")) {
10614
- var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
10615
- if (error)
10616
- return "proof." + error;
12040
+ if (properties.result === 1)
12041
+ return "result: multiple values";
12042
+ properties.result = 1;
12043
+ {
12044
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
12045
+ if (error)
12046
+ return "proof." + error;
12047
+ }
10617
12048
  }
10618
12049
  if (message.metadata != null && message.hasOwnProperty("metadata")) {
10619
12050
  var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
@@ -10635,15 +12066,10 @@ $root.org = (function() {
10635
12066
  if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsResponse)
10636
12067
  return object;
10637
12068
  var message = new $root.org.dash.platform.dapi.v0.GetDocumentsResponse();
10638
- if (object.documents) {
10639
- if (!Array.isArray(object.documents))
10640
- throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsResponse.documents: array expected");
10641
- message.documents = [];
10642
- for (var i = 0; i < object.documents.length; ++i)
10643
- if (typeof object.documents[i] === "string")
10644
- $util.base64.decode(object.documents[i], message.documents[i] = $util.newBuffer($util.base64.length(object.documents[i])), 0);
10645
- else if (object.documents[i].length >= 0)
10646
- message.documents[i] = object.documents[i];
12069
+ if (object.documents != null) {
12070
+ if (typeof object.documents !== "object")
12071
+ throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsResponse.documents: object expected");
12072
+ message.documents = $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.fromObject(object.documents);
10647
12073
  }
10648
12074
  if (object.proof != null) {
10649
12075
  if (typeof object.proof !== "object")
@@ -10671,34 +12097,239 @@ $root.org = (function() {
10671
12097
  if (!options)
10672
12098
  options = {};
10673
12099
  var object = {};
10674
- if (options.arrays || options.defaults)
10675
- object.documents = [];
10676
- if (options.defaults) {
10677
- object.proof = null;
12100
+ if (options.defaults)
10678
12101
  object.metadata = null;
12102
+ if (message.documents != null && message.hasOwnProperty("documents")) {
12103
+ object.documents = $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.toObject(message.documents, options);
12104
+ if (options.oneofs)
12105
+ object.result = "documents";
10679
12106
  }
10680
- if (message.documents && message.documents.length) {
10681
- object.documents = [];
10682
- for (var j = 0; j < message.documents.length; ++j)
10683
- object.documents[j] = options.bytes === String ? $util.base64.encode(message.documents[j], 0, message.documents[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.documents[j]) : message.documents[j];
10684
- }
10685
- if (message.proof != null && message.hasOwnProperty("proof"))
12107
+ if (message.proof != null && message.hasOwnProperty("proof")) {
10686
12108
  object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
12109
+ if (options.oneofs)
12110
+ object.result = "proof";
12111
+ }
10687
12112
  if (message.metadata != null && message.hasOwnProperty("metadata"))
10688
12113
  object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
10689
12114
  return object;
10690
12115
  };
10691
12116
 
10692
- /**
10693
- * Converts this GetDocumentsResponse to JSON.
10694
- * @function toJSON
10695
- * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
10696
- * @instance
10697
- * @returns {Object.<string,*>} JSON object
10698
- */
10699
- GetDocumentsResponse.prototype.toJSON = function toJSON() {
10700
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
10701
- };
12117
+ /**
12118
+ * Converts this GetDocumentsResponse to JSON.
12119
+ * @function toJSON
12120
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
12121
+ * @instance
12122
+ * @returns {Object.<string,*>} JSON object
12123
+ */
12124
+ GetDocumentsResponse.prototype.toJSON = function toJSON() {
12125
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12126
+ };
12127
+
12128
+ GetDocumentsResponse.Documents = (function() {
12129
+
12130
+ /**
12131
+ * Properties of a Documents.
12132
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
12133
+ * @interface IDocuments
12134
+ * @property {Array.<Uint8Array>|null} [documents] Documents documents
12135
+ */
12136
+
12137
+ /**
12138
+ * Constructs a new Documents.
12139
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
12140
+ * @classdesc Represents a Documents.
12141
+ * @implements IDocuments
12142
+ * @constructor
12143
+ * @param {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments=} [properties] Properties to set
12144
+ */
12145
+ function Documents(properties) {
12146
+ this.documents = [];
12147
+ if (properties)
12148
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12149
+ if (properties[keys[i]] != null)
12150
+ this[keys[i]] = properties[keys[i]];
12151
+ }
12152
+
12153
+ /**
12154
+ * Documents documents.
12155
+ * @member {Array.<Uint8Array>} documents
12156
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12157
+ * @instance
12158
+ */
12159
+ Documents.prototype.documents = $util.emptyArray;
12160
+
12161
+ /**
12162
+ * Creates a new Documents instance using the specified properties.
12163
+ * @function create
12164
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12165
+ * @static
12166
+ * @param {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments=} [properties] Properties to set
12167
+ * @returns {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} Documents instance
12168
+ */
12169
+ Documents.create = function create(properties) {
12170
+ return new Documents(properties);
12171
+ };
12172
+
12173
+ /**
12174
+ * Encodes the specified Documents message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.verify|verify} messages.
12175
+ * @function encode
12176
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12177
+ * @static
12178
+ * @param {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments} message Documents message or plain object to encode
12179
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12180
+ * @returns {$protobuf.Writer} Writer
12181
+ */
12182
+ Documents.encode = function encode(message, writer) {
12183
+ if (!writer)
12184
+ writer = $Writer.create();
12185
+ if (message.documents != null && message.documents.length)
12186
+ for (var i = 0; i < message.documents.length; ++i)
12187
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.documents[i]);
12188
+ return writer;
12189
+ };
12190
+
12191
+ /**
12192
+ * Encodes the specified Documents message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.verify|verify} messages.
12193
+ * @function encodeDelimited
12194
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12195
+ * @static
12196
+ * @param {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments} message Documents message or plain object to encode
12197
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12198
+ * @returns {$protobuf.Writer} Writer
12199
+ */
12200
+ Documents.encodeDelimited = function encodeDelimited(message, writer) {
12201
+ return this.encode(message, writer).ldelim();
12202
+ };
12203
+
12204
+ /**
12205
+ * Decodes a Documents message from the specified reader or buffer.
12206
+ * @function decode
12207
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12208
+ * @static
12209
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12210
+ * @param {number} [length] Message length if known beforehand
12211
+ * @returns {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} Documents
12212
+ * @throws {Error} If the payload is not a reader or valid buffer
12213
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12214
+ */
12215
+ Documents.decode = function decode(reader, length) {
12216
+ if (!(reader instanceof $Reader))
12217
+ reader = $Reader.create(reader);
12218
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents();
12219
+ while (reader.pos < end) {
12220
+ var tag = reader.uint32();
12221
+ switch (tag >>> 3) {
12222
+ case 1:
12223
+ if (!(message.documents && message.documents.length))
12224
+ message.documents = [];
12225
+ message.documents.push(reader.bytes());
12226
+ break;
12227
+ default:
12228
+ reader.skipType(tag & 7);
12229
+ break;
12230
+ }
12231
+ }
12232
+ return message;
12233
+ };
12234
+
12235
+ /**
12236
+ * Decodes a Documents message from the specified reader or buffer, length delimited.
12237
+ * @function decodeDelimited
12238
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12239
+ * @static
12240
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12241
+ * @returns {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} Documents
12242
+ * @throws {Error} If the payload is not a reader or valid buffer
12243
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12244
+ */
12245
+ Documents.decodeDelimited = function decodeDelimited(reader) {
12246
+ if (!(reader instanceof $Reader))
12247
+ reader = new $Reader(reader);
12248
+ return this.decode(reader, reader.uint32());
12249
+ };
12250
+
12251
+ /**
12252
+ * Verifies a Documents message.
12253
+ * @function verify
12254
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12255
+ * @static
12256
+ * @param {Object.<string,*>} message Plain object to verify
12257
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
12258
+ */
12259
+ Documents.verify = function verify(message) {
12260
+ if (typeof message !== "object" || message === null)
12261
+ return "object expected";
12262
+ if (message.documents != null && message.hasOwnProperty("documents")) {
12263
+ if (!Array.isArray(message.documents))
12264
+ return "documents: array expected";
12265
+ for (var i = 0; i < message.documents.length; ++i)
12266
+ if (!(message.documents[i] && typeof message.documents[i].length === "number" || $util.isString(message.documents[i])))
12267
+ return "documents: buffer[] expected";
12268
+ }
12269
+ return null;
12270
+ };
12271
+
12272
+ /**
12273
+ * Creates a Documents message from a plain object. Also converts values to their respective internal types.
12274
+ * @function fromObject
12275
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12276
+ * @static
12277
+ * @param {Object.<string,*>} object Plain object
12278
+ * @returns {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} Documents
12279
+ */
12280
+ Documents.fromObject = function fromObject(object) {
12281
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents)
12282
+ return object;
12283
+ var message = new $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents();
12284
+ if (object.documents) {
12285
+ if (!Array.isArray(object.documents))
12286
+ throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.documents: array expected");
12287
+ message.documents = [];
12288
+ for (var i = 0; i < object.documents.length; ++i)
12289
+ if (typeof object.documents[i] === "string")
12290
+ $util.base64.decode(object.documents[i], message.documents[i] = $util.newBuffer($util.base64.length(object.documents[i])), 0);
12291
+ else if (object.documents[i].length >= 0)
12292
+ message.documents[i] = object.documents[i];
12293
+ }
12294
+ return message;
12295
+ };
12296
+
12297
+ /**
12298
+ * Creates a plain object from a Documents message. Also converts values to other types if specified.
12299
+ * @function toObject
12300
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12301
+ * @static
12302
+ * @param {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} message Documents
12303
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
12304
+ * @returns {Object.<string,*>} Plain object
12305
+ */
12306
+ Documents.toObject = function toObject(message, options) {
12307
+ if (!options)
12308
+ options = {};
12309
+ var object = {};
12310
+ if (options.arrays || options.defaults)
12311
+ object.documents = [];
12312
+ if (message.documents && message.documents.length) {
12313
+ object.documents = [];
12314
+ for (var j = 0; j < message.documents.length; ++j)
12315
+ object.documents[j] = options.bytes === String ? $util.base64.encode(message.documents[j], 0, message.documents[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.documents[j]) : message.documents[j];
12316
+ }
12317
+ return object;
12318
+ };
12319
+
12320
+ /**
12321
+ * Converts this Documents to JSON.
12322
+ * @function toJSON
12323
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
12324
+ * @instance
12325
+ * @returns {Object.<string,*>} JSON object
12326
+ */
12327
+ Documents.prototype.toJSON = function toJSON() {
12328
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12329
+ };
12330
+
12331
+ return Documents;
12332
+ })();
10702
12333
 
10703
12334
  return GetDocumentsResponse;
10704
12335
  })();
@@ -10938,7 +12569,7 @@ $root.org = (function() {
10938
12569
  * Properties of a GetIdentitiesByPublicKeyHashesResponse.
10939
12570
  * @memberof org.dash.platform.dapi.v0
10940
12571
  * @interface IGetIdentitiesByPublicKeyHashesResponse
10941
- * @property {Array.<Uint8Array>|null} [identities] GetIdentitiesByPublicKeyHashesResponse identities
12572
+ * @property {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities|null} [identities] GetIdentitiesByPublicKeyHashesResponse identities
10942
12573
  * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentitiesByPublicKeyHashesResponse proof
10943
12574
  * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentitiesByPublicKeyHashesResponse metadata
10944
12575
  */
@@ -10952,7 +12583,6 @@ $root.org = (function() {
10952
12583
  * @param {org.dash.platform.dapi.v0.IGetIdentitiesByPublicKeyHashesResponse=} [properties] Properties to set
10953
12584
  */
10954
12585
  function GetIdentitiesByPublicKeyHashesResponse(properties) {
10955
- this.identities = [];
10956
12586
  if (properties)
10957
12587
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
10958
12588
  if (properties[keys[i]] != null)
@@ -10961,11 +12591,11 @@ $root.org = (function() {
10961
12591
 
10962
12592
  /**
10963
12593
  * GetIdentitiesByPublicKeyHashesResponse identities.
10964
- * @member {Array.<Uint8Array>} identities
12594
+ * @member {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities|null|undefined} identities
10965
12595
  * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse
10966
12596
  * @instance
10967
12597
  */
10968
- GetIdentitiesByPublicKeyHashesResponse.prototype.identities = $util.emptyArray;
12598
+ GetIdentitiesByPublicKeyHashesResponse.prototype.identities = null;
10969
12599
 
10970
12600
  /**
10971
12601
  * GetIdentitiesByPublicKeyHashesResponse proof.
@@ -10983,6 +12613,20 @@ $root.org = (function() {
10983
12613
  */
10984
12614
  GetIdentitiesByPublicKeyHashesResponse.prototype.metadata = null;
10985
12615
 
12616
+ // OneOf field names bound to virtual getters and setters
12617
+ var $oneOfFields;
12618
+
12619
+ /**
12620
+ * GetIdentitiesByPublicKeyHashesResponse result.
12621
+ * @member {"identities"|"proof"|undefined} result
12622
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse
12623
+ * @instance
12624
+ */
12625
+ Object.defineProperty(GetIdentitiesByPublicKeyHashesResponse.prototype, "result", {
12626
+ get: $util.oneOfGetter($oneOfFields = ["identities", "proof"]),
12627
+ set: $util.oneOfSetter($oneOfFields)
12628
+ });
12629
+
10986
12630
  /**
10987
12631
  * Creates a new GetIdentitiesByPublicKeyHashesResponse instance using the specified properties.
10988
12632
  * @function create
@@ -11007,9 +12651,8 @@ $root.org = (function() {
11007
12651
  GetIdentitiesByPublicKeyHashesResponse.encode = function encode(message, writer) {
11008
12652
  if (!writer)
11009
12653
  writer = $Writer.create();
11010
- if (message.identities != null && message.identities.length)
11011
- for (var i = 0; i < message.identities.length; ++i)
11012
- writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identities[i]);
12654
+ if (message.identities != null && Object.hasOwnProperty.call(message, "identities"))
12655
+ $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.encode(message.identities, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
11013
12656
  if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
11014
12657
  $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
11015
12658
  if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
@@ -11049,9 +12692,7 @@ $root.org = (function() {
11049
12692
  var tag = reader.uint32();
11050
12693
  switch (tag >>> 3) {
11051
12694
  case 1:
11052
- if (!(message.identities && message.identities.length))
11053
- message.identities = [];
11054
- message.identities.push(reader.bytes());
12695
+ message.identities = $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.decode(reader, reader.uint32());
11055
12696
  break;
11056
12697
  case 2:
11057
12698
  message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
@@ -11094,17 +12735,24 @@ $root.org = (function() {
11094
12735
  GetIdentitiesByPublicKeyHashesResponse.verify = function verify(message) {
11095
12736
  if (typeof message !== "object" || message === null)
11096
12737
  return "object expected";
12738
+ var properties = {};
11097
12739
  if (message.identities != null && message.hasOwnProperty("identities")) {
11098
- if (!Array.isArray(message.identities))
11099
- return "identities: array expected";
11100
- for (var i = 0; i < message.identities.length; ++i)
11101
- if (!(message.identities[i] && typeof message.identities[i].length === "number" || $util.isString(message.identities[i])))
11102
- return "identities: buffer[] expected";
12740
+ properties.result = 1;
12741
+ {
12742
+ var error = $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.verify(message.identities);
12743
+ if (error)
12744
+ return "identities." + error;
12745
+ }
11103
12746
  }
11104
12747
  if (message.proof != null && message.hasOwnProperty("proof")) {
11105
- var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
11106
- if (error)
11107
- return "proof." + error;
12748
+ if (properties.result === 1)
12749
+ return "result: multiple values";
12750
+ properties.result = 1;
12751
+ {
12752
+ var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
12753
+ if (error)
12754
+ return "proof." + error;
12755
+ }
11108
12756
  }
11109
12757
  if (message.metadata != null && message.hasOwnProperty("metadata")) {
11110
12758
  var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
@@ -11126,15 +12774,10 @@ $root.org = (function() {
11126
12774
  if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse)
11127
12775
  return object;
11128
12776
  var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse();
11129
- if (object.identities) {
11130
- if (!Array.isArray(object.identities))
11131
- throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.identities: array expected");
11132
- message.identities = [];
11133
- for (var i = 0; i < object.identities.length; ++i)
11134
- if (typeof object.identities[i] === "string")
11135
- $util.base64.decode(object.identities[i], message.identities[i] = $util.newBuffer($util.base64.length(object.identities[i])), 0);
11136
- else if (object.identities[i].length >= 0)
11137
- message.identities[i] = object.identities[i];
12777
+ if (object.identities != null) {
12778
+ if (typeof object.identities !== "object")
12779
+ throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.identities: object expected");
12780
+ message.identities = $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.fromObject(object.identities);
11138
12781
  }
11139
12782
  if (object.proof != null) {
11140
12783
  if (typeof object.proof !== "object")
@@ -11162,19 +12805,18 @@ $root.org = (function() {
11162
12805
  if (!options)
11163
12806
  options = {};
11164
12807
  var object = {};
11165
- if (options.arrays || options.defaults)
11166
- object.identities = [];
11167
- if (options.defaults) {
11168
- object.proof = null;
12808
+ if (options.defaults)
11169
12809
  object.metadata = null;
12810
+ if (message.identities != null && message.hasOwnProperty("identities")) {
12811
+ object.identities = $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.toObject(message.identities, options);
12812
+ if (options.oneofs)
12813
+ object.result = "identities";
11170
12814
  }
11171
- if (message.identities && message.identities.length) {
11172
- object.identities = [];
11173
- for (var j = 0; j < message.identities.length; ++j)
11174
- object.identities[j] = options.bytes === String ? $util.base64.encode(message.identities[j], 0, message.identities[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.identities[j]) : message.identities[j];
11175
- }
11176
- if (message.proof != null && message.hasOwnProperty("proof"))
12815
+ if (message.proof != null && message.hasOwnProperty("proof")) {
11177
12816
  object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
12817
+ if (options.oneofs)
12818
+ object.result = "proof";
12819
+ }
11178
12820
  if (message.metadata != null && message.hasOwnProperty("metadata"))
11179
12821
  object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
11180
12822
  return object;
@@ -11191,6 +12833,212 @@ $root.org = (function() {
11191
12833
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
11192
12834
  };
11193
12835
 
12836
+ GetIdentitiesByPublicKeyHashesResponse.Identities = (function() {
12837
+
12838
+ /**
12839
+ * Properties of an Identities.
12840
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse
12841
+ * @interface IIdentities
12842
+ * @property {Array.<Uint8Array>|null} [identities] Identities identities
12843
+ */
12844
+
12845
+ /**
12846
+ * Constructs a new Identities.
12847
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse
12848
+ * @classdesc Represents an Identities.
12849
+ * @implements IIdentities
12850
+ * @constructor
12851
+ * @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities=} [properties] Properties to set
12852
+ */
12853
+ function Identities(properties) {
12854
+ this.identities = [];
12855
+ if (properties)
12856
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12857
+ if (properties[keys[i]] != null)
12858
+ this[keys[i]] = properties[keys[i]];
12859
+ }
12860
+
12861
+ /**
12862
+ * Identities identities.
12863
+ * @member {Array.<Uint8Array>} identities
12864
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
12865
+ * @instance
12866
+ */
12867
+ Identities.prototype.identities = $util.emptyArray;
12868
+
12869
+ /**
12870
+ * Creates a new Identities instance using the specified properties.
12871
+ * @function create
12872
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
12873
+ * @static
12874
+ * @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities=} [properties] Properties to set
12875
+ * @returns {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} Identities instance
12876
+ */
12877
+ Identities.create = function create(properties) {
12878
+ return new Identities(properties);
12879
+ };
12880
+
12881
+ /**
12882
+ * Encodes the specified Identities message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.verify|verify} messages.
12883
+ * @function encode
12884
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
12885
+ * @static
12886
+ * @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities} message Identities message or plain object to encode
12887
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12888
+ * @returns {$protobuf.Writer} Writer
12889
+ */
12890
+ Identities.encode = function encode(message, writer) {
12891
+ if (!writer)
12892
+ writer = $Writer.create();
12893
+ if (message.identities != null && message.identities.length)
12894
+ for (var i = 0; i < message.identities.length; ++i)
12895
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identities[i]);
12896
+ return writer;
12897
+ };
12898
+
12899
+ /**
12900
+ * Encodes the specified Identities message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.verify|verify} messages.
12901
+ * @function encodeDelimited
12902
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
12903
+ * @static
12904
+ * @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities} message Identities message or plain object to encode
12905
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12906
+ * @returns {$protobuf.Writer} Writer
12907
+ */
12908
+ Identities.encodeDelimited = function encodeDelimited(message, writer) {
12909
+ return this.encode(message, writer).ldelim();
12910
+ };
12911
+
12912
+ /**
12913
+ * Decodes an Identities message from the specified reader or buffer.
12914
+ * @function decode
12915
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
12916
+ * @static
12917
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12918
+ * @param {number} [length] Message length if known beforehand
12919
+ * @returns {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} Identities
12920
+ * @throws {Error} If the payload is not a reader or valid buffer
12921
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12922
+ */
12923
+ Identities.decode = function decode(reader, length) {
12924
+ if (!(reader instanceof $Reader))
12925
+ reader = $Reader.create(reader);
12926
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities();
12927
+ while (reader.pos < end) {
12928
+ var tag = reader.uint32();
12929
+ switch (tag >>> 3) {
12930
+ case 1:
12931
+ if (!(message.identities && message.identities.length))
12932
+ message.identities = [];
12933
+ message.identities.push(reader.bytes());
12934
+ break;
12935
+ default:
12936
+ reader.skipType(tag & 7);
12937
+ break;
12938
+ }
12939
+ }
12940
+ return message;
12941
+ };
12942
+
12943
+ /**
12944
+ * Decodes an Identities message from the specified reader or buffer, length delimited.
12945
+ * @function decodeDelimited
12946
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
12947
+ * @static
12948
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12949
+ * @returns {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} Identities
12950
+ * @throws {Error} If the payload is not a reader or valid buffer
12951
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12952
+ */
12953
+ Identities.decodeDelimited = function decodeDelimited(reader) {
12954
+ if (!(reader instanceof $Reader))
12955
+ reader = new $Reader(reader);
12956
+ return this.decode(reader, reader.uint32());
12957
+ };
12958
+
12959
+ /**
12960
+ * Verifies an Identities message.
12961
+ * @function verify
12962
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
12963
+ * @static
12964
+ * @param {Object.<string,*>} message Plain object to verify
12965
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
12966
+ */
12967
+ Identities.verify = function verify(message) {
12968
+ if (typeof message !== "object" || message === null)
12969
+ return "object expected";
12970
+ if (message.identities != null && message.hasOwnProperty("identities")) {
12971
+ if (!Array.isArray(message.identities))
12972
+ return "identities: array expected";
12973
+ for (var i = 0; i < message.identities.length; ++i)
12974
+ if (!(message.identities[i] && typeof message.identities[i].length === "number" || $util.isString(message.identities[i])))
12975
+ return "identities: buffer[] expected";
12976
+ }
12977
+ return null;
12978
+ };
12979
+
12980
+ /**
12981
+ * Creates an Identities message from a plain object. Also converts values to their respective internal types.
12982
+ * @function fromObject
12983
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
12984
+ * @static
12985
+ * @param {Object.<string,*>} object Plain object
12986
+ * @returns {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} Identities
12987
+ */
12988
+ Identities.fromObject = function fromObject(object) {
12989
+ if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities)
12990
+ return object;
12991
+ var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities();
12992
+ if (object.identities) {
12993
+ if (!Array.isArray(object.identities))
12994
+ throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.identities: array expected");
12995
+ message.identities = [];
12996
+ for (var i = 0; i < object.identities.length; ++i)
12997
+ if (typeof object.identities[i] === "string")
12998
+ $util.base64.decode(object.identities[i], message.identities[i] = $util.newBuffer($util.base64.length(object.identities[i])), 0);
12999
+ else if (object.identities[i].length >= 0)
13000
+ message.identities[i] = object.identities[i];
13001
+ }
13002
+ return message;
13003
+ };
13004
+
13005
+ /**
13006
+ * Creates a plain object from an Identities message. Also converts values to other types if specified.
13007
+ * @function toObject
13008
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
13009
+ * @static
13010
+ * @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} message Identities
13011
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
13012
+ * @returns {Object.<string,*>} Plain object
13013
+ */
13014
+ Identities.toObject = function toObject(message, options) {
13015
+ if (!options)
13016
+ options = {};
13017
+ var object = {};
13018
+ if (options.arrays || options.defaults)
13019
+ object.identities = [];
13020
+ if (message.identities && message.identities.length) {
13021
+ object.identities = [];
13022
+ for (var j = 0; j < message.identities.length; ++j)
13023
+ object.identities[j] = options.bytes === String ? $util.base64.encode(message.identities[j], 0, message.identities[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.identities[j]) : message.identities[j];
13024
+ }
13025
+ return object;
13026
+ };
13027
+
13028
+ /**
13029
+ * Converts this Identities to JSON.
13030
+ * @function toJSON
13031
+ * @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
13032
+ * @instance
13033
+ * @returns {Object.<string,*>} JSON object
13034
+ */
13035
+ Identities.prototype.toJSON = function toJSON() {
13036
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
13037
+ };
13038
+
13039
+ return Identities;
13040
+ })();
13041
+
11194
13042
  return GetIdentitiesByPublicKeyHashesResponse;
11195
13043
  })();
11196
13044
 
@@ -11956,12 +13804,12 @@ $root.org = (function() {
11956
13804
  var $oneOfFields;
11957
13805
 
11958
13806
  /**
11959
- * WaitForStateTransitionResultResponse responses.
11960
- * @member {"error"|"proof"|undefined} responses
13807
+ * WaitForStateTransitionResultResponse result.
13808
+ * @member {"error"|"proof"|undefined} result
11961
13809
  * @memberof org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse
11962
13810
  * @instance
11963
13811
  */
11964
- Object.defineProperty(WaitForStateTransitionResultResponse.prototype, "responses", {
13812
+ Object.defineProperty(WaitForStateTransitionResultResponse.prototype, "result", {
11965
13813
  get: $util.oneOfGetter($oneOfFields = ["error", "proof"]),
11966
13814
  set: $util.oneOfSetter($oneOfFields)
11967
13815
  });
@@ -12076,7 +13924,7 @@ $root.org = (function() {
12076
13924
  return "object expected";
12077
13925
  var properties = {};
12078
13926
  if (message.error != null && message.hasOwnProperty("error")) {
12079
- properties.responses = 1;
13927
+ properties.result = 1;
12080
13928
  {
12081
13929
  var error = $root.org.dash.platform.dapi.v0.StateTransitionBroadcastError.verify(message.error);
12082
13930
  if (error)
@@ -12084,9 +13932,9 @@ $root.org = (function() {
12084
13932
  }
12085
13933
  }
12086
13934
  if (message.proof != null && message.hasOwnProperty("proof")) {
12087
- if (properties.responses === 1)
12088
- return "responses: multiple values";
12089
- properties.responses = 1;
13935
+ if (properties.result === 1)
13936
+ return "result: multiple values";
13937
+ properties.result = 1;
12090
13938
  {
12091
13939
  var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
12092
13940
  if (error)
@@ -12149,12 +13997,12 @@ $root.org = (function() {
12149
13997
  if (message.error != null && message.hasOwnProperty("error")) {
12150
13998
  object.error = $root.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject(message.error, options);
12151
13999
  if (options.oneofs)
12152
- object.responses = "error";
14000
+ object.result = "error";
12153
14001
  }
12154
14002
  if (message.proof != null && message.hasOwnProperty("proof")) {
12155
14003
  object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
12156
14004
  if (options.oneofs)
12157
- object.responses = "proof";
14005
+ object.result = "proof";
12158
14006
  }
12159
14007
  if (message.metadata != null && message.hasOwnProperty("metadata"))
12160
14008
  object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);