@dashevo/dapi-grpc 0.25.0-dev.14 → 0.25.0-dev.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +7 -2
- package/build.rs +10 -6
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +39 -0
- package/clients/platform/v0/nodejs/platform_pbjs.js +2123 -285
- package/clients/platform/v0/nodejs/platform_protoc.js +2152 -335
- package/clients/platform/v0/web/PlatformPromiseClient.js +15 -0
- package/clients/platform/v0/web/platform_pb.d.ts +281 -28
- package/clients/platform/v0/web/platform_pb.js +2152 -335
- package/clients/platform/v0/web/platform_pb_service.d.ts +19 -0
- package/clients/platform/v0/web/platform_pb_service.js +40 -0
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +70 -15
- package/src/core/proto/org.dash.platform.dapi.v0.rs +666 -0
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +1324 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
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
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
|
3590
|
-
* @member {
|
|
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.
|
|
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.
|
|
3645
|
-
$root.
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
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
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
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.
|
|
3769
|
-
if (typeof object.
|
|
3770
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.
|
|
3771
|
-
message.
|
|
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.
|
|
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
|
-
|
|
3833
|
-
})();
|
|
3834
|
-
|
|
3835
|
-
v0.KeyRequestType = (function() {
|
|
3984
|
+
GetIdentityBalanceAndRevisionResponse.BalanceAndRevision = (function() {
|
|
3836
3985
|
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
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
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
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
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
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
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
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
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
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
|
-
|
|
3886
|
-
|
|
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
|
-
|
|
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
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
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
|
-
|
|
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.
|
|
10435
|
+
v0.GetDataContractHistoryRequest = (function() {
|
|
10045
10436
|
|
|
10046
10437
|
/**
|
|
10047
|
-
* Properties of a
|
|
10438
|
+
* Properties of a GetDataContractHistoryRequest.
|
|
10048
10439
|
* @memberof org.dash.platform.dapi.v0
|
|
10049
|
-
* @interface
|
|
10050
|
-
* @property {Uint8Array|null} [
|
|
10051
|
-
* @property {
|
|
10052
|
-
* @property {
|
|
10053
|
-
* @property {
|
|
10054
|
-
* @property {
|
|
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 {number|null} [limit] GetDataContractHistoryRequest limit
|
|
10443
|
+
* @property {number|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
|
|
10449
|
+
* Constructs a new GetDataContractHistoryRequest.
|
|
10062
10450
|
* @memberof org.dash.platform.dapi.v0
|
|
10063
|
-
* @classdesc Represents a
|
|
10064
|
-
* @implements
|
|
10451
|
+
* @classdesc Represents a GetDataContractHistoryRequest.
|
|
10452
|
+
* @implements IGetDataContractHistoryRequest
|
|
10065
10453
|
* @constructor
|
|
10066
|
-
* @param {org.dash.platform.dapi.v0.
|
|
10454
|
+
* @param {org.dash.platform.dapi.v0.IGetDataContractHistoryRequest=} [properties] Properties to set
|
|
10067
10455
|
*/
|
|
10068
|
-
function
|
|
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,58 +10461,1074 @@ $root.org = (function() {
|
|
|
10073
10461
|
}
|
|
10074
10462
|
|
|
10075
10463
|
/**
|
|
10076
|
-
*
|
|
10077
|
-
* @member {Uint8Array}
|
|
10078
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
10464
|
+
* GetDataContractHistoryRequest id.
|
|
10465
|
+
* @member {Uint8Array} id
|
|
10466
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
|
|
10079
10467
|
* @instance
|
|
10080
10468
|
*/
|
|
10081
|
-
|
|
10469
|
+
GetDataContractHistoryRequest.prototype.id = $util.newBuffer([]);
|
|
10082
10470
|
|
|
10083
10471
|
/**
|
|
10084
|
-
*
|
|
10085
|
-
* @member {
|
|
10086
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
10472
|
+
* GetDataContractHistoryRequest limit.
|
|
10473
|
+
* @member {number} limit
|
|
10474
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
|
|
10087
10475
|
* @instance
|
|
10088
10476
|
*/
|
|
10089
|
-
|
|
10477
|
+
GetDataContractHistoryRequest.prototype.limit = 0;
|
|
10090
10478
|
|
|
10091
10479
|
/**
|
|
10092
|
-
*
|
|
10093
|
-
* @member {
|
|
10094
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
10480
|
+
* GetDataContractHistoryRequest offset.
|
|
10481
|
+
* @member {number} offset
|
|
10482
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
|
|
10095
10483
|
* @instance
|
|
10096
10484
|
*/
|
|
10097
|
-
|
|
10485
|
+
GetDataContractHistoryRequest.prototype.offset = 0;
|
|
10098
10486
|
|
|
10099
10487
|
/**
|
|
10100
|
-
*
|
|
10101
|
-
* @member {
|
|
10102
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
10488
|
+
* GetDataContractHistoryRequest startAtMs.
|
|
10489
|
+
* @member {number|Long} startAtMs
|
|
10490
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
|
|
10103
10491
|
* @instance
|
|
10104
10492
|
*/
|
|
10105
|
-
|
|
10493
|
+
GetDataContractHistoryRequest.prototype.startAtMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
10106
10494
|
|
|
10107
10495
|
/**
|
|
10108
|
-
*
|
|
10109
|
-
* @member {
|
|
10110
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
10496
|
+
* GetDataContractHistoryRequest prove.
|
|
10497
|
+
* @member {boolean} prove
|
|
10498
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
|
|
10111
10499
|
* @instance
|
|
10112
10500
|
*/
|
|
10113
|
-
|
|
10501
|
+
GetDataContractHistoryRequest.prototype.prove = false;
|
|
10114
10502
|
|
|
10115
10503
|
/**
|
|
10116
|
-
*
|
|
10117
|
-
* @
|
|
10118
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
10119
|
-
* @
|
|
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
|
-
|
|
10511
|
+
GetDataContractHistoryRequest.create = function create(properties) {
|
|
10512
|
+
return new GetDataContractHistoryRequest(properties);
|
|
10513
|
+
};
|
|
10122
10514
|
|
|
10123
10515
|
/**
|
|
10124
|
-
*
|
|
10125
|
-
* @
|
|
10126
|
-
* @memberof org.dash.platform.dapi.v0.
|
|
10127
|
-
* @
|
|
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
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.limit);
|
|
10531
|
+
if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
|
|
10532
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.offset);
|
|
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 = reader.uint32();
|
|
10576
|
+
break;
|
|
10577
|
+
case 3:
|
|
10578
|
+
message.offset = 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
|
+
if (!$util.isInteger(message.limit))
|
|
10626
|
+
return "limit: integer expected";
|
|
10627
|
+
if (message.offset != null && message.hasOwnProperty("offset"))
|
|
10628
|
+
if (!$util.isInteger(message.offset))
|
|
10629
|
+
return "offset: integer expected";
|
|
10630
|
+
if (message.startAtMs != null && message.hasOwnProperty("startAtMs"))
|
|
10631
|
+
if (!$util.isInteger(message.startAtMs) && !(message.startAtMs && $util.isInteger(message.startAtMs.low) && $util.isInteger(message.startAtMs.high)))
|
|
10632
|
+
return "startAtMs: integer|Long expected";
|
|
10633
|
+
if (message.prove != null && message.hasOwnProperty("prove"))
|
|
10634
|
+
if (typeof message.prove !== "boolean")
|
|
10635
|
+
return "prove: boolean expected";
|
|
10636
|
+
return null;
|
|
10637
|
+
};
|
|
10638
|
+
|
|
10639
|
+
/**
|
|
10640
|
+
* Creates a GetDataContractHistoryRequest message from a plain object. Also converts values to their respective internal types.
|
|
10641
|
+
* @function fromObject
|
|
10642
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
|
|
10643
|
+
* @static
|
|
10644
|
+
* @param {Object.<string,*>} object Plain object
|
|
10645
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryRequest} GetDataContractHistoryRequest
|
|
10646
|
+
*/
|
|
10647
|
+
GetDataContractHistoryRequest.fromObject = function fromObject(object) {
|
|
10648
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractHistoryRequest)
|
|
10649
|
+
return object;
|
|
10650
|
+
var message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryRequest();
|
|
10651
|
+
if (object.id != null)
|
|
10652
|
+
if (typeof object.id === "string")
|
|
10653
|
+
$util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0);
|
|
10654
|
+
else if (object.id.length >= 0)
|
|
10655
|
+
message.id = object.id;
|
|
10656
|
+
if (object.limit != null)
|
|
10657
|
+
message.limit = object.limit >>> 0;
|
|
10658
|
+
if (object.offset != null)
|
|
10659
|
+
message.offset = object.offset >>> 0;
|
|
10660
|
+
if (object.startAtMs != null)
|
|
10661
|
+
if ($util.Long)
|
|
10662
|
+
(message.startAtMs = $util.Long.fromValue(object.startAtMs)).unsigned = true;
|
|
10663
|
+
else if (typeof object.startAtMs === "string")
|
|
10664
|
+
message.startAtMs = parseInt(object.startAtMs, 10);
|
|
10665
|
+
else if (typeof object.startAtMs === "number")
|
|
10666
|
+
message.startAtMs = object.startAtMs;
|
|
10667
|
+
else if (typeof object.startAtMs === "object")
|
|
10668
|
+
message.startAtMs = new $util.LongBits(object.startAtMs.low >>> 0, object.startAtMs.high >>> 0).toNumber(true);
|
|
10669
|
+
if (object.prove != null)
|
|
10670
|
+
message.prove = Boolean(object.prove);
|
|
10671
|
+
return message;
|
|
10672
|
+
};
|
|
10673
|
+
|
|
10674
|
+
/**
|
|
10675
|
+
* Creates a plain object from a GetDataContractHistoryRequest message. Also converts values to other types if specified.
|
|
10676
|
+
* @function toObject
|
|
10677
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
|
|
10678
|
+
* @static
|
|
10679
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryRequest} message GetDataContractHistoryRequest
|
|
10680
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
10681
|
+
* @returns {Object.<string,*>} Plain object
|
|
10682
|
+
*/
|
|
10683
|
+
GetDataContractHistoryRequest.toObject = function toObject(message, options) {
|
|
10684
|
+
if (!options)
|
|
10685
|
+
options = {};
|
|
10686
|
+
var object = {};
|
|
10687
|
+
if (options.defaults) {
|
|
10688
|
+
if (options.bytes === String)
|
|
10689
|
+
object.id = "";
|
|
10690
|
+
else {
|
|
10691
|
+
object.id = [];
|
|
10692
|
+
if (options.bytes !== Array)
|
|
10693
|
+
object.id = $util.newBuffer(object.id);
|
|
10694
|
+
}
|
|
10695
|
+
object.limit = 0;
|
|
10696
|
+
object.offset = 0;
|
|
10697
|
+
if ($util.Long) {
|
|
10698
|
+
var long = new $util.Long(0, 0, true);
|
|
10699
|
+
object.startAtMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
10700
|
+
} else
|
|
10701
|
+
object.startAtMs = options.longs === String ? "0" : 0;
|
|
10702
|
+
object.prove = false;
|
|
10703
|
+
}
|
|
10704
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
10705
|
+
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;
|
|
10706
|
+
if (message.limit != null && message.hasOwnProperty("limit"))
|
|
10707
|
+
object.limit = message.limit;
|
|
10708
|
+
if (message.offset != null && message.hasOwnProperty("offset"))
|
|
10709
|
+
object.offset = message.offset;
|
|
10710
|
+
if (message.startAtMs != null && message.hasOwnProperty("startAtMs"))
|
|
10711
|
+
if (typeof message.startAtMs === "number")
|
|
10712
|
+
object.startAtMs = options.longs === String ? String(message.startAtMs) : message.startAtMs;
|
|
10713
|
+
else
|
|
10714
|
+
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;
|
|
10715
|
+
if (message.prove != null && message.hasOwnProperty("prove"))
|
|
10716
|
+
object.prove = message.prove;
|
|
10717
|
+
return object;
|
|
10718
|
+
};
|
|
10719
|
+
|
|
10720
|
+
/**
|
|
10721
|
+
* Converts this GetDataContractHistoryRequest to JSON.
|
|
10722
|
+
* @function toJSON
|
|
10723
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryRequest
|
|
10724
|
+
* @instance
|
|
10725
|
+
* @returns {Object.<string,*>} JSON object
|
|
10726
|
+
*/
|
|
10727
|
+
GetDataContractHistoryRequest.prototype.toJSON = function toJSON() {
|
|
10728
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
10729
|
+
};
|
|
10730
|
+
|
|
10731
|
+
return GetDataContractHistoryRequest;
|
|
10732
|
+
})();
|
|
10733
|
+
|
|
10734
|
+
v0.GetDataContractHistoryResponse = (function() {
|
|
10735
|
+
|
|
10736
|
+
/**
|
|
10737
|
+
* Properties of a GetDataContractHistoryResponse.
|
|
10738
|
+
* @memberof org.dash.platform.dapi.v0
|
|
10739
|
+
* @interface IGetDataContractHistoryResponse
|
|
10740
|
+
* @property {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory|null} [dataContractHistory] GetDataContractHistoryResponse dataContractHistory
|
|
10741
|
+
* @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDataContractHistoryResponse proof
|
|
10742
|
+
* @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDataContractHistoryResponse metadata
|
|
10743
|
+
*/
|
|
10744
|
+
|
|
10745
|
+
/**
|
|
10746
|
+
* Constructs a new GetDataContractHistoryResponse.
|
|
10747
|
+
* @memberof org.dash.platform.dapi.v0
|
|
10748
|
+
* @classdesc Represents a GetDataContractHistoryResponse.
|
|
10749
|
+
* @implements IGetDataContractHistoryResponse
|
|
10750
|
+
* @constructor
|
|
10751
|
+
* @param {org.dash.platform.dapi.v0.IGetDataContractHistoryResponse=} [properties] Properties to set
|
|
10752
|
+
*/
|
|
10753
|
+
function GetDataContractHistoryResponse(properties) {
|
|
10754
|
+
if (properties)
|
|
10755
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
10756
|
+
if (properties[keys[i]] != null)
|
|
10757
|
+
this[keys[i]] = properties[keys[i]];
|
|
10758
|
+
}
|
|
10759
|
+
|
|
10760
|
+
/**
|
|
10761
|
+
* GetDataContractHistoryResponse dataContractHistory.
|
|
10762
|
+
* @member {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory|null|undefined} dataContractHistory
|
|
10763
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10764
|
+
* @instance
|
|
10765
|
+
*/
|
|
10766
|
+
GetDataContractHistoryResponse.prototype.dataContractHistory = null;
|
|
10767
|
+
|
|
10768
|
+
/**
|
|
10769
|
+
* GetDataContractHistoryResponse proof.
|
|
10770
|
+
* @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof
|
|
10771
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10772
|
+
* @instance
|
|
10773
|
+
*/
|
|
10774
|
+
GetDataContractHistoryResponse.prototype.proof = null;
|
|
10775
|
+
|
|
10776
|
+
/**
|
|
10777
|
+
* GetDataContractHistoryResponse metadata.
|
|
10778
|
+
* @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata
|
|
10779
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10780
|
+
* @instance
|
|
10781
|
+
*/
|
|
10782
|
+
GetDataContractHistoryResponse.prototype.metadata = null;
|
|
10783
|
+
|
|
10784
|
+
// OneOf field names bound to virtual getters and setters
|
|
10785
|
+
var $oneOfFields;
|
|
10786
|
+
|
|
10787
|
+
/**
|
|
10788
|
+
* GetDataContractHistoryResponse result.
|
|
10789
|
+
* @member {"dataContractHistory"|"proof"|undefined} result
|
|
10790
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10791
|
+
* @instance
|
|
10792
|
+
*/
|
|
10793
|
+
Object.defineProperty(GetDataContractHistoryResponse.prototype, "result", {
|
|
10794
|
+
get: $util.oneOfGetter($oneOfFields = ["dataContractHistory", "proof"]),
|
|
10795
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
10796
|
+
});
|
|
10797
|
+
|
|
10798
|
+
/**
|
|
10799
|
+
* Creates a new GetDataContractHistoryResponse instance using the specified properties.
|
|
10800
|
+
* @function create
|
|
10801
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10802
|
+
* @static
|
|
10803
|
+
* @param {org.dash.platform.dapi.v0.IGetDataContractHistoryResponse=} [properties] Properties to set
|
|
10804
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} GetDataContractHistoryResponse instance
|
|
10805
|
+
*/
|
|
10806
|
+
GetDataContractHistoryResponse.create = function create(properties) {
|
|
10807
|
+
return new GetDataContractHistoryResponse(properties);
|
|
10808
|
+
};
|
|
10809
|
+
|
|
10810
|
+
/**
|
|
10811
|
+
* Encodes the specified GetDataContractHistoryResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.verify|verify} messages.
|
|
10812
|
+
* @function encode
|
|
10813
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10814
|
+
* @static
|
|
10815
|
+
* @param {org.dash.platform.dapi.v0.IGetDataContractHistoryResponse} message GetDataContractHistoryResponse message or plain object to encode
|
|
10816
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
10817
|
+
* @returns {$protobuf.Writer} Writer
|
|
10818
|
+
*/
|
|
10819
|
+
GetDataContractHistoryResponse.encode = function encode(message, writer) {
|
|
10820
|
+
if (!writer)
|
|
10821
|
+
writer = $Writer.create();
|
|
10822
|
+
if (message.dataContractHistory != null && Object.hasOwnProperty.call(message, "dataContractHistory"))
|
|
10823
|
+
$root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.encode(message.dataContractHistory, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
10824
|
+
if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
|
|
10825
|
+
$root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
10826
|
+
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
10827
|
+
$root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
10828
|
+
return writer;
|
|
10829
|
+
};
|
|
10830
|
+
|
|
10831
|
+
/**
|
|
10832
|
+
* Encodes the specified GetDataContractHistoryResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.verify|verify} messages.
|
|
10833
|
+
* @function encodeDelimited
|
|
10834
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10835
|
+
* @static
|
|
10836
|
+
* @param {org.dash.platform.dapi.v0.IGetDataContractHistoryResponse} message GetDataContractHistoryResponse message or plain object to encode
|
|
10837
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
10838
|
+
* @returns {$protobuf.Writer} Writer
|
|
10839
|
+
*/
|
|
10840
|
+
GetDataContractHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
10841
|
+
return this.encode(message, writer).ldelim();
|
|
10842
|
+
};
|
|
10843
|
+
|
|
10844
|
+
/**
|
|
10845
|
+
* Decodes a GetDataContractHistoryResponse message from the specified reader or buffer.
|
|
10846
|
+
* @function decode
|
|
10847
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10848
|
+
* @static
|
|
10849
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
10850
|
+
* @param {number} [length] Message length if known beforehand
|
|
10851
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} GetDataContractHistoryResponse
|
|
10852
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
10853
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
10854
|
+
*/
|
|
10855
|
+
GetDataContractHistoryResponse.decode = function decode(reader, length) {
|
|
10856
|
+
if (!(reader instanceof $Reader))
|
|
10857
|
+
reader = $Reader.create(reader);
|
|
10858
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse();
|
|
10859
|
+
while (reader.pos < end) {
|
|
10860
|
+
var tag = reader.uint32();
|
|
10861
|
+
switch (tag >>> 3) {
|
|
10862
|
+
case 1:
|
|
10863
|
+
message.dataContractHistory = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.decode(reader, reader.uint32());
|
|
10864
|
+
break;
|
|
10865
|
+
case 2:
|
|
10866
|
+
message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
|
|
10867
|
+
break;
|
|
10868
|
+
case 3:
|
|
10869
|
+
message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32());
|
|
10870
|
+
break;
|
|
10871
|
+
default:
|
|
10872
|
+
reader.skipType(tag & 7);
|
|
10873
|
+
break;
|
|
10874
|
+
}
|
|
10875
|
+
}
|
|
10876
|
+
return message;
|
|
10877
|
+
};
|
|
10878
|
+
|
|
10879
|
+
/**
|
|
10880
|
+
* Decodes a GetDataContractHistoryResponse message from the specified reader or buffer, length delimited.
|
|
10881
|
+
* @function decodeDelimited
|
|
10882
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10883
|
+
* @static
|
|
10884
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
10885
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} GetDataContractHistoryResponse
|
|
10886
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
10887
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
10888
|
+
*/
|
|
10889
|
+
GetDataContractHistoryResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
10890
|
+
if (!(reader instanceof $Reader))
|
|
10891
|
+
reader = new $Reader(reader);
|
|
10892
|
+
return this.decode(reader, reader.uint32());
|
|
10893
|
+
};
|
|
10894
|
+
|
|
10895
|
+
/**
|
|
10896
|
+
* Verifies a GetDataContractHistoryResponse message.
|
|
10897
|
+
* @function verify
|
|
10898
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10899
|
+
* @static
|
|
10900
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
10901
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
10902
|
+
*/
|
|
10903
|
+
GetDataContractHistoryResponse.verify = function verify(message) {
|
|
10904
|
+
if (typeof message !== "object" || message === null)
|
|
10905
|
+
return "object expected";
|
|
10906
|
+
var properties = {};
|
|
10907
|
+
if (message.dataContractHistory != null && message.hasOwnProperty("dataContractHistory")) {
|
|
10908
|
+
properties.result = 1;
|
|
10909
|
+
{
|
|
10910
|
+
var error = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.verify(message.dataContractHistory);
|
|
10911
|
+
if (error)
|
|
10912
|
+
return "dataContractHistory." + error;
|
|
10913
|
+
}
|
|
10914
|
+
}
|
|
10915
|
+
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
10916
|
+
if (properties.result === 1)
|
|
10917
|
+
return "result: multiple values";
|
|
10918
|
+
properties.result = 1;
|
|
10919
|
+
{
|
|
10920
|
+
var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
|
|
10921
|
+
if (error)
|
|
10922
|
+
return "proof." + error;
|
|
10923
|
+
}
|
|
10924
|
+
}
|
|
10925
|
+
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
10926
|
+
var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
|
|
10927
|
+
if (error)
|
|
10928
|
+
return "metadata." + error;
|
|
10929
|
+
}
|
|
10930
|
+
return null;
|
|
10931
|
+
};
|
|
10932
|
+
|
|
10933
|
+
/**
|
|
10934
|
+
* Creates a GetDataContractHistoryResponse message from a plain object. Also converts values to their respective internal types.
|
|
10935
|
+
* @function fromObject
|
|
10936
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10937
|
+
* @static
|
|
10938
|
+
* @param {Object.<string,*>} object Plain object
|
|
10939
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} GetDataContractHistoryResponse
|
|
10940
|
+
*/
|
|
10941
|
+
GetDataContractHistoryResponse.fromObject = function fromObject(object) {
|
|
10942
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse)
|
|
10943
|
+
return object;
|
|
10944
|
+
var message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse();
|
|
10945
|
+
if (object.dataContractHistory != null) {
|
|
10946
|
+
if (typeof object.dataContractHistory !== "object")
|
|
10947
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.dataContractHistory: object expected");
|
|
10948
|
+
message.dataContractHistory = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.fromObject(object.dataContractHistory);
|
|
10949
|
+
}
|
|
10950
|
+
if (object.proof != null) {
|
|
10951
|
+
if (typeof object.proof !== "object")
|
|
10952
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.proof: object expected");
|
|
10953
|
+
message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof);
|
|
10954
|
+
}
|
|
10955
|
+
if (object.metadata != null) {
|
|
10956
|
+
if (typeof object.metadata !== "object")
|
|
10957
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.metadata: object expected");
|
|
10958
|
+
message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata);
|
|
10959
|
+
}
|
|
10960
|
+
return message;
|
|
10961
|
+
};
|
|
10962
|
+
|
|
10963
|
+
/**
|
|
10964
|
+
* Creates a plain object from a GetDataContractHistoryResponse message. Also converts values to other types if specified.
|
|
10965
|
+
* @function toObject
|
|
10966
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10967
|
+
* @static
|
|
10968
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse} message GetDataContractHistoryResponse
|
|
10969
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
10970
|
+
* @returns {Object.<string,*>} Plain object
|
|
10971
|
+
*/
|
|
10972
|
+
GetDataContractHistoryResponse.toObject = function toObject(message, options) {
|
|
10973
|
+
if (!options)
|
|
10974
|
+
options = {};
|
|
10975
|
+
var object = {};
|
|
10976
|
+
if (options.defaults)
|
|
10977
|
+
object.metadata = null;
|
|
10978
|
+
if (message.dataContractHistory != null && message.hasOwnProperty("dataContractHistory")) {
|
|
10979
|
+
object.dataContractHistory = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.toObject(message.dataContractHistory, options);
|
|
10980
|
+
if (options.oneofs)
|
|
10981
|
+
object.result = "dataContractHistory";
|
|
10982
|
+
}
|
|
10983
|
+
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
10984
|
+
object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
|
|
10985
|
+
if (options.oneofs)
|
|
10986
|
+
object.result = "proof";
|
|
10987
|
+
}
|
|
10988
|
+
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
10989
|
+
object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
|
|
10990
|
+
return object;
|
|
10991
|
+
};
|
|
10992
|
+
|
|
10993
|
+
/**
|
|
10994
|
+
* Converts this GetDataContractHistoryResponse to JSON.
|
|
10995
|
+
* @function toJSON
|
|
10996
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
10997
|
+
* @instance
|
|
10998
|
+
* @returns {Object.<string,*>} JSON object
|
|
10999
|
+
*/
|
|
11000
|
+
GetDataContractHistoryResponse.prototype.toJSON = function toJSON() {
|
|
11001
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
11002
|
+
};
|
|
11003
|
+
|
|
11004
|
+
GetDataContractHistoryResponse.DataContractHistoryEntry = (function() {
|
|
11005
|
+
|
|
11006
|
+
/**
|
|
11007
|
+
* Properties of a DataContractHistoryEntry.
|
|
11008
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
11009
|
+
* @interface IDataContractHistoryEntry
|
|
11010
|
+
* @property {number|Long|null} [date] DataContractHistoryEntry date
|
|
11011
|
+
* @property {Uint8Array|null} [value] DataContractHistoryEntry value
|
|
11012
|
+
*/
|
|
11013
|
+
|
|
11014
|
+
/**
|
|
11015
|
+
* Constructs a new DataContractHistoryEntry.
|
|
11016
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
11017
|
+
* @classdesc Represents a DataContractHistoryEntry.
|
|
11018
|
+
* @implements IDataContractHistoryEntry
|
|
11019
|
+
* @constructor
|
|
11020
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry=} [properties] Properties to set
|
|
11021
|
+
*/
|
|
11022
|
+
function DataContractHistoryEntry(properties) {
|
|
11023
|
+
if (properties)
|
|
11024
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
11025
|
+
if (properties[keys[i]] != null)
|
|
11026
|
+
this[keys[i]] = properties[keys[i]];
|
|
11027
|
+
}
|
|
11028
|
+
|
|
11029
|
+
/**
|
|
11030
|
+
* DataContractHistoryEntry date.
|
|
11031
|
+
* @member {number|Long} date
|
|
11032
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11033
|
+
* @instance
|
|
11034
|
+
*/
|
|
11035
|
+
DataContractHistoryEntry.prototype.date = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
11036
|
+
|
|
11037
|
+
/**
|
|
11038
|
+
* DataContractHistoryEntry value.
|
|
11039
|
+
* @member {Uint8Array} value
|
|
11040
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11041
|
+
* @instance
|
|
11042
|
+
*/
|
|
11043
|
+
DataContractHistoryEntry.prototype.value = $util.newBuffer([]);
|
|
11044
|
+
|
|
11045
|
+
/**
|
|
11046
|
+
* Creates a new DataContractHistoryEntry instance using the specified properties.
|
|
11047
|
+
* @function create
|
|
11048
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11049
|
+
* @static
|
|
11050
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry=} [properties] Properties to set
|
|
11051
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} DataContractHistoryEntry instance
|
|
11052
|
+
*/
|
|
11053
|
+
DataContractHistoryEntry.create = function create(properties) {
|
|
11054
|
+
return new DataContractHistoryEntry(properties);
|
|
11055
|
+
};
|
|
11056
|
+
|
|
11057
|
+
/**
|
|
11058
|
+
* Encodes the specified DataContractHistoryEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.verify|verify} messages.
|
|
11059
|
+
* @function encode
|
|
11060
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11061
|
+
* @static
|
|
11062
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry} message DataContractHistoryEntry message or plain object to encode
|
|
11063
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
11064
|
+
* @returns {$protobuf.Writer} Writer
|
|
11065
|
+
*/
|
|
11066
|
+
DataContractHistoryEntry.encode = function encode(message, writer) {
|
|
11067
|
+
if (!writer)
|
|
11068
|
+
writer = $Writer.create();
|
|
11069
|
+
if (message.date != null && Object.hasOwnProperty.call(message, "date"))
|
|
11070
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.date);
|
|
11071
|
+
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
11072
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
|
|
11073
|
+
return writer;
|
|
11074
|
+
};
|
|
11075
|
+
|
|
11076
|
+
/**
|
|
11077
|
+
* Encodes the specified DataContractHistoryEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.verify|verify} messages.
|
|
11078
|
+
* @function encodeDelimited
|
|
11079
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11080
|
+
* @static
|
|
11081
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry} message DataContractHistoryEntry message or plain object to encode
|
|
11082
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
11083
|
+
* @returns {$protobuf.Writer} Writer
|
|
11084
|
+
*/
|
|
11085
|
+
DataContractHistoryEntry.encodeDelimited = function encodeDelimited(message, writer) {
|
|
11086
|
+
return this.encode(message, writer).ldelim();
|
|
11087
|
+
};
|
|
11088
|
+
|
|
11089
|
+
/**
|
|
11090
|
+
* Decodes a DataContractHistoryEntry message from the specified reader or buffer.
|
|
11091
|
+
* @function decode
|
|
11092
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11093
|
+
* @static
|
|
11094
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
11095
|
+
* @param {number} [length] Message length if known beforehand
|
|
11096
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} DataContractHistoryEntry
|
|
11097
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
11098
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
11099
|
+
*/
|
|
11100
|
+
DataContractHistoryEntry.decode = function decode(reader, length) {
|
|
11101
|
+
if (!(reader instanceof $Reader))
|
|
11102
|
+
reader = $Reader.create(reader);
|
|
11103
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry();
|
|
11104
|
+
while (reader.pos < end) {
|
|
11105
|
+
var tag = reader.uint32();
|
|
11106
|
+
switch (tag >>> 3) {
|
|
11107
|
+
case 1:
|
|
11108
|
+
message.date = reader.uint64();
|
|
11109
|
+
break;
|
|
11110
|
+
case 2:
|
|
11111
|
+
message.value = reader.bytes();
|
|
11112
|
+
break;
|
|
11113
|
+
default:
|
|
11114
|
+
reader.skipType(tag & 7);
|
|
11115
|
+
break;
|
|
11116
|
+
}
|
|
11117
|
+
}
|
|
11118
|
+
return message;
|
|
11119
|
+
};
|
|
11120
|
+
|
|
11121
|
+
/**
|
|
11122
|
+
* Decodes a DataContractHistoryEntry message from the specified reader or buffer, length delimited.
|
|
11123
|
+
* @function decodeDelimited
|
|
11124
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11125
|
+
* @static
|
|
11126
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
11127
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} DataContractHistoryEntry
|
|
11128
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
11129
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
11130
|
+
*/
|
|
11131
|
+
DataContractHistoryEntry.decodeDelimited = function decodeDelimited(reader) {
|
|
11132
|
+
if (!(reader instanceof $Reader))
|
|
11133
|
+
reader = new $Reader(reader);
|
|
11134
|
+
return this.decode(reader, reader.uint32());
|
|
11135
|
+
};
|
|
11136
|
+
|
|
11137
|
+
/**
|
|
11138
|
+
* Verifies a DataContractHistoryEntry message.
|
|
11139
|
+
* @function verify
|
|
11140
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11141
|
+
* @static
|
|
11142
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
11143
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
11144
|
+
*/
|
|
11145
|
+
DataContractHistoryEntry.verify = function verify(message) {
|
|
11146
|
+
if (typeof message !== "object" || message === null)
|
|
11147
|
+
return "object expected";
|
|
11148
|
+
if (message.date != null && message.hasOwnProperty("date"))
|
|
11149
|
+
if (!$util.isInteger(message.date) && !(message.date && $util.isInteger(message.date.low) && $util.isInteger(message.date.high)))
|
|
11150
|
+
return "date: integer|Long expected";
|
|
11151
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
|
11152
|
+
if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
|
|
11153
|
+
return "value: buffer expected";
|
|
11154
|
+
return null;
|
|
11155
|
+
};
|
|
11156
|
+
|
|
11157
|
+
/**
|
|
11158
|
+
* Creates a DataContractHistoryEntry message from a plain object. Also converts values to their respective internal types.
|
|
11159
|
+
* @function fromObject
|
|
11160
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11161
|
+
* @static
|
|
11162
|
+
* @param {Object.<string,*>} object Plain object
|
|
11163
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} DataContractHistoryEntry
|
|
11164
|
+
*/
|
|
11165
|
+
DataContractHistoryEntry.fromObject = function fromObject(object) {
|
|
11166
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry)
|
|
11167
|
+
return object;
|
|
11168
|
+
var message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry();
|
|
11169
|
+
if (object.date != null)
|
|
11170
|
+
if ($util.Long)
|
|
11171
|
+
(message.date = $util.Long.fromValue(object.date)).unsigned = true;
|
|
11172
|
+
else if (typeof object.date === "string")
|
|
11173
|
+
message.date = parseInt(object.date, 10);
|
|
11174
|
+
else if (typeof object.date === "number")
|
|
11175
|
+
message.date = object.date;
|
|
11176
|
+
else if (typeof object.date === "object")
|
|
11177
|
+
message.date = new $util.LongBits(object.date.low >>> 0, object.date.high >>> 0).toNumber(true);
|
|
11178
|
+
if (object.value != null)
|
|
11179
|
+
if (typeof object.value === "string")
|
|
11180
|
+
$util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
|
|
11181
|
+
else if (object.value.length >= 0)
|
|
11182
|
+
message.value = object.value;
|
|
11183
|
+
return message;
|
|
11184
|
+
};
|
|
11185
|
+
|
|
11186
|
+
/**
|
|
11187
|
+
* Creates a plain object from a DataContractHistoryEntry message. Also converts values to other types if specified.
|
|
11188
|
+
* @function toObject
|
|
11189
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11190
|
+
* @static
|
|
11191
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry} message DataContractHistoryEntry
|
|
11192
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
11193
|
+
* @returns {Object.<string,*>} Plain object
|
|
11194
|
+
*/
|
|
11195
|
+
DataContractHistoryEntry.toObject = function toObject(message, options) {
|
|
11196
|
+
if (!options)
|
|
11197
|
+
options = {};
|
|
11198
|
+
var object = {};
|
|
11199
|
+
if (options.defaults) {
|
|
11200
|
+
if ($util.Long) {
|
|
11201
|
+
var long = new $util.Long(0, 0, true);
|
|
11202
|
+
object.date = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
11203
|
+
} else
|
|
11204
|
+
object.date = options.longs === String ? "0" : 0;
|
|
11205
|
+
if (options.bytes === String)
|
|
11206
|
+
object.value = "";
|
|
11207
|
+
else {
|
|
11208
|
+
object.value = [];
|
|
11209
|
+
if (options.bytes !== Array)
|
|
11210
|
+
object.value = $util.newBuffer(object.value);
|
|
11211
|
+
}
|
|
11212
|
+
}
|
|
11213
|
+
if (message.date != null && message.hasOwnProperty("date"))
|
|
11214
|
+
if (typeof message.date === "number")
|
|
11215
|
+
object.date = options.longs === String ? String(message.date) : message.date;
|
|
11216
|
+
else
|
|
11217
|
+
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;
|
|
11218
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
|
11219
|
+
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;
|
|
11220
|
+
return object;
|
|
11221
|
+
};
|
|
11222
|
+
|
|
11223
|
+
/**
|
|
11224
|
+
* Converts this DataContractHistoryEntry to JSON.
|
|
11225
|
+
* @function toJSON
|
|
11226
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry
|
|
11227
|
+
* @instance
|
|
11228
|
+
* @returns {Object.<string,*>} JSON object
|
|
11229
|
+
*/
|
|
11230
|
+
DataContractHistoryEntry.prototype.toJSON = function toJSON() {
|
|
11231
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
11232
|
+
};
|
|
11233
|
+
|
|
11234
|
+
return DataContractHistoryEntry;
|
|
11235
|
+
})();
|
|
11236
|
+
|
|
11237
|
+
GetDataContractHistoryResponse.DataContractHistory = (function() {
|
|
11238
|
+
|
|
11239
|
+
/**
|
|
11240
|
+
* Properties of a DataContractHistory.
|
|
11241
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
11242
|
+
* @interface IDataContractHistory
|
|
11243
|
+
* @property {Array.<org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry>|null} [dataContractEntries] DataContractHistory dataContractEntries
|
|
11244
|
+
*/
|
|
11245
|
+
|
|
11246
|
+
/**
|
|
11247
|
+
* Constructs a new DataContractHistory.
|
|
11248
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse
|
|
11249
|
+
* @classdesc Represents a DataContractHistory.
|
|
11250
|
+
* @implements IDataContractHistory
|
|
11251
|
+
* @constructor
|
|
11252
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory=} [properties] Properties to set
|
|
11253
|
+
*/
|
|
11254
|
+
function DataContractHistory(properties) {
|
|
11255
|
+
this.dataContractEntries = [];
|
|
11256
|
+
if (properties)
|
|
11257
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
11258
|
+
if (properties[keys[i]] != null)
|
|
11259
|
+
this[keys[i]] = properties[keys[i]];
|
|
11260
|
+
}
|
|
11261
|
+
|
|
11262
|
+
/**
|
|
11263
|
+
* DataContractHistory dataContractEntries.
|
|
11264
|
+
* @member {Array.<org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistoryEntry>} dataContractEntries
|
|
11265
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11266
|
+
* @instance
|
|
11267
|
+
*/
|
|
11268
|
+
DataContractHistory.prototype.dataContractEntries = $util.emptyArray;
|
|
11269
|
+
|
|
11270
|
+
/**
|
|
11271
|
+
* Creates a new DataContractHistory instance using the specified properties.
|
|
11272
|
+
* @function create
|
|
11273
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11274
|
+
* @static
|
|
11275
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory=} [properties] Properties to set
|
|
11276
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} DataContractHistory instance
|
|
11277
|
+
*/
|
|
11278
|
+
DataContractHistory.create = function create(properties) {
|
|
11279
|
+
return new DataContractHistory(properties);
|
|
11280
|
+
};
|
|
11281
|
+
|
|
11282
|
+
/**
|
|
11283
|
+
* Encodes the specified DataContractHistory message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.verify|verify} messages.
|
|
11284
|
+
* @function encode
|
|
11285
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11286
|
+
* @static
|
|
11287
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory} message DataContractHistory message or plain object to encode
|
|
11288
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
11289
|
+
* @returns {$protobuf.Writer} Writer
|
|
11290
|
+
*/
|
|
11291
|
+
DataContractHistory.encode = function encode(message, writer) {
|
|
11292
|
+
if (!writer)
|
|
11293
|
+
writer = $Writer.create();
|
|
11294
|
+
if (message.dataContractEntries != null && message.dataContractEntries.length)
|
|
11295
|
+
for (var i = 0; i < message.dataContractEntries.length; ++i)
|
|
11296
|
+
$root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.encode(message.dataContractEntries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
11297
|
+
return writer;
|
|
11298
|
+
};
|
|
11299
|
+
|
|
11300
|
+
/**
|
|
11301
|
+
* Encodes the specified DataContractHistory message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.verify|verify} messages.
|
|
11302
|
+
* @function encodeDelimited
|
|
11303
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11304
|
+
* @static
|
|
11305
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.IDataContractHistory} message DataContractHistory message or plain object to encode
|
|
11306
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
11307
|
+
* @returns {$protobuf.Writer} Writer
|
|
11308
|
+
*/
|
|
11309
|
+
DataContractHistory.encodeDelimited = function encodeDelimited(message, writer) {
|
|
11310
|
+
return this.encode(message, writer).ldelim();
|
|
11311
|
+
};
|
|
11312
|
+
|
|
11313
|
+
/**
|
|
11314
|
+
* Decodes a DataContractHistory message from the specified reader or buffer.
|
|
11315
|
+
* @function decode
|
|
11316
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11317
|
+
* @static
|
|
11318
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
11319
|
+
* @param {number} [length] Message length if known beforehand
|
|
11320
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} DataContractHistory
|
|
11321
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
11322
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
11323
|
+
*/
|
|
11324
|
+
DataContractHistory.decode = function decode(reader, length) {
|
|
11325
|
+
if (!(reader instanceof $Reader))
|
|
11326
|
+
reader = $Reader.create(reader);
|
|
11327
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory();
|
|
11328
|
+
while (reader.pos < end) {
|
|
11329
|
+
var tag = reader.uint32();
|
|
11330
|
+
switch (tag >>> 3) {
|
|
11331
|
+
case 1:
|
|
11332
|
+
if (!(message.dataContractEntries && message.dataContractEntries.length))
|
|
11333
|
+
message.dataContractEntries = [];
|
|
11334
|
+
message.dataContractEntries.push($root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.decode(reader, reader.uint32()));
|
|
11335
|
+
break;
|
|
11336
|
+
default:
|
|
11337
|
+
reader.skipType(tag & 7);
|
|
11338
|
+
break;
|
|
11339
|
+
}
|
|
11340
|
+
}
|
|
11341
|
+
return message;
|
|
11342
|
+
};
|
|
11343
|
+
|
|
11344
|
+
/**
|
|
11345
|
+
* Decodes a DataContractHistory message from the specified reader or buffer, length delimited.
|
|
11346
|
+
* @function decodeDelimited
|
|
11347
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11348
|
+
* @static
|
|
11349
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
11350
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} DataContractHistory
|
|
11351
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
11352
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
11353
|
+
*/
|
|
11354
|
+
DataContractHistory.decodeDelimited = function decodeDelimited(reader) {
|
|
11355
|
+
if (!(reader instanceof $Reader))
|
|
11356
|
+
reader = new $Reader(reader);
|
|
11357
|
+
return this.decode(reader, reader.uint32());
|
|
11358
|
+
};
|
|
11359
|
+
|
|
11360
|
+
/**
|
|
11361
|
+
* Verifies a DataContractHistory message.
|
|
11362
|
+
* @function verify
|
|
11363
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11364
|
+
* @static
|
|
11365
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
11366
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
11367
|
+
*/
|
|
11368
|
+
DataContractHistory.verify = function verify(message) {
|
|
11369
|
+
if (typeof message !== "object" || message === null)
|
|
11370
|
+
return "object expected";
|
|
11371
|
+
if (message.dataContractEntries != null && message.hasOwnProperty("dataContractEntries")) {
|
|
11372
|
+
if (!Array.isArray(message.dataContractEntries))
|
|
11373
|
+
return "dataContractEntries: array expected";
|
|
11374
|
+
for (var i = 0; i < message.dataContractEntries.length; ++i) {
|
|
11375
|
+
var error = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.verify(message.dataContractEntries[i]);
|
|
11376
|
+
if (error)
|
|
11377
|
+
return "dataContractEntries." + error;
|
|
11378
|
+
}
|
|
11379
|
+
}
|
|
11380
|
+
return null;
|
|
11381
|
+
};
|
|
11382
|
+
|
|
11383
|
+
/**
|
|
11384
|
+
* Creates a DataContractHistory message from a plain object. Also converts values to their respective internal types.
|
|
11385
|
+
* @function fromObject
|
|
11386
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11387
|
+
* @static
|
|
11388
|
+
* @param {Object.<string,*>} object Plain object
|
|
11389
|
+
* @returns {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} DataContractHistory
|
|
11390
|
+
*/
|
|
11391
|
+
DataContractHistory.fromObject = function fromObject(object) {
|
|
11392
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory)
|
|
11393
|
+
return object;
|
|
11394
|
+
var message = new $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory();
|
|
11395
|
+
if (object.dataContractEntries) {
|
|
11396
|
+
if (!Array.isArray(object.dataContractEntries))
|
|
11397
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.dataContractEntries: array expected");
|
|
11398
|
+
message.dataContractEntries = [];
|
|
11399
|
+
for (var i = 0; i < object.dataContractEntries.length; ++i) {
|
|
11400
|
+
if (typeof object.dataContractEntries[i] !== "object")
|
|
11401
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory.dataContractEntries: object expected");
|
|
11402
|
+
message.dataContractEntries[i] = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.fromObject(object.dataContractEntries[i]);
|
|
11403
|
+
}
|
|
11404
|
+
}
|
|
11405
|
+
return message;
|
|
11406
|
+
};
|
|
11407
|
+
|
|
11408
|
+
/**
|
|
11409
|
+
* Creates a plain object from a DataContractHistory message. Also converts values to other types if specified.
|
|
11410
|
+
* @function toObject
|
|
11411
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11412
|
+
* @static
|
|
11413
|
+
* @param {org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory} message DataContractHistory
|
|
11414
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
11415
|
+
* @returns {Object.<string,*>} Plain object
|
|
11416
|
+
*/
|
|
11417
|
+
DataContractHistory.toObject = function toObject(message, options) {
|
|
11418
|
+
if (!options)
|
|
11419
|
+
options = {};
|
|
11420
|
+
var object = {};
|
|
11421
|
+
if (options.arrays || options.defaults)
|
|
11422
|
+
object.dataContractEntries = [];
|
|
11423
|
+
if (message.dataContractEntries && message.dataContractEntries.length) {
|
|
11424
|
+
object.dataContractEntries = [];
|
|
11425
|
+
for (var j = 0; j < message.dataContractEntries.length; ++j)
|
|
11426
|
+
object.dataContractEntries[j] = $root.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistoryEntry.toObject(message.dataContractEntries[j], options);
|
|
11427
|
+
}
|
|
11428
|
+
return object;
|
|
11429
|
+
};
|
|
11430
|
+
|
|
11431
|
+
/**
|
|
11432
|
+
* Converts this DataContractHistory to JSON.
|
|
11433
|
+
* @function toJSON
|
|
11434
|
+
* @memberof org.dash.platform.dapi.v0.GetDataContractHistoryResponse.DataContractHistory
|
|
11435
|
+
* @instance
|
|
11436
|
+
* @returns {Object.<string,*>} JSON object
|
|
11437
|
+
*/
|
|
11438
|
+
DataContractHistory.prototype.toJSON = function toJSON() {
|
|
11439
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
11440
|
+
};
|
|
11441
|
+
|
|
11442
|
+
return DataContractHistory;
|
|
11443
|
+
})();
|
|
11444
|
+
|
|
11445
|
+
return GetDataContractHistoryResponse;
|
|
11446
|
+
})();
|
|
11447
|
+
|
|
11448
|
+
v0.GetDocumentsRequest = (function() {
|
|
11449
|
+
|
|
11450
|
+
/**
|
|
11451
|
+
* Properties of a GetDocumentsRequest.
|
|
11452
|
+
* @memberof org.dash.platform.dapi.v0
|
|
11453
|
+
* @interface IGetDocumentsRequest
|
|
11454
|
+
* @property {Uint8Array|null} [dataContractId] GetDocumentsRequest dataContractId
|
|
11455
|
+
* @property {string|null} [documentType] GetDocumentsRequest documentType
|
|
11456
|
+
* @property {Uint8Array|null} [where] GetDocumentsRequest where
|
|
11457
|
+
* @property {Uint8Array|null} [orderBy] GetDocumentsRequest orderBy
|
|
11458
|
+
* @property {number|null} [limit] GetDocumentsRequest limit
|
|
11459
|
+
* @property {Uint8Array|null} [startAfter] GetDocumentsRequest startAfter
|
|
11460
|
+
* @property {Uint8Array|null} [startAt] GetDocumentsRequest startAt
|
|
11461
|
+
* @property {boolean|null} [prove] GetDocumentsRequest prove
|
|
11462
|
+
*/
|
|
11463
|
+
|
|
11464
|
+
/**
|
|
11465
|
+
* Constructs a new GetDocumentsRequest.
|
|
11466
|
+
* @memberof org.dash.platform.dapi.v0
|
|
11467
|
+
* @classdesc Represents a GetDocumentsRequest.
|
|
11468
|
+
* @implements IGetDocumentsRequest
|
|
11469
|
+
* @constructor
|
|
11470
|
+
* @param {org.dash.platform.dapi.v0.IGetDocumentsRequest=} [properties] Properties to set
|
|
11471
|
+
*/
|
|
11472
|
+
function GetDocumentsRequest(properties) {
|
|
11473
|
+
if (properties)
|
|
11474
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
11475
|
+
if (properties[keys[i]] != null)
|
|
11476
|
+
this[keys[i]] = properties[keys[i]];
|
|
11477
|
+
}
|
|
11478
|
+
|
|
11479
|
+
/**
|
|
11480
|
+
* GetDocumentsRequest dataContractId.
|
|
11481
|
+
* @member {Uint8Array} dataContractId
|
|
11482
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
11483
|
+
* @instance
|
|
11484
|
+
*/
|
|
11485
|
+
GetDocumentsRequest.prototype.dataContractId = $util.newBuffer([]);
|
|
11486
|
+
|
|
11487
|
+
/**
|
|
11488
|
+
* GetDocumentsRequest documentType.
|
|
11489
|
+
* @member {string} documentType
|
|
11490
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
11491
|
+
* @instance
|
|
11492
|
+
*/
|
|
11493
|
+
GetDocumentsRequest.prototype.documentType = "";
|
|
11494
|
+
|
|
11495
|
+
/**
|
|
11496
|
+
* GetDocumentsRequest where.
|
|
11497
|
+
* @member {Uint8Array} where
|
|
11498
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
11499
|
+
* @instance
|
|
11500
|
+
*/
|
|
11501
|
+
GetDocumentsRequest.prototype.where = $util.newBuffer([]);
|
|
11502
|
+
|
|
11503
|
+
/**
|
|
11504
|
+
* GetDocumentsRequest orderBy.
|
|
11505
|
+
* @member {Uint8Array} orderBy
|
|
11506
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
11507
|
+
* @instance
|
|
11508
|
+
*/
|
|
11509
|
+
GetDocumentsRequest.prototype.orderBy = $util.newBuffer([]);
|
|
11510
|
+
|
|
11511
|
+
/**
|
|
11512
|
+
* GetDocumentsRequest limit.
|
|
11513
|
+
* @member {number} limit
|
|
11514
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
11515
|
+
* @instance
|
|
11516
|
+
*/
|
|
11517
|
+
GetDocumentsRequest.prototype.limit = 0;
|
|
11518
|
+
|
|
11519
|
+
/**
|
|
11520
|
+
* GetDocumentsRequest startAfter.
|
|
11521
|
+
* @member {Uint8Array} startAfter
|
|
11522
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
11523
|
+
* @instance
|
|
11524
|
+
*/
|
|
11525
|
+
GetDocumentsRequest.prototype.startAfter = $util.newBuffer([]);
|
|
11526
|
+
|
|
11527
|
+
/**
|
|
11528
|
+
* GetDocumentsRequest startAt.
|
|
11529
|
+
* @member {Uint8Array} startAt
|
|
11530
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
11531
|
+
* @instance
|
|
10128
11532
|
*/
|
|
10129
11533
|
GetDocumentsRequest.prototype.startAt = $util.newBuffer([]);
|
|
10130
11534
|
|
|
@@ -10447,7 +11851,7 @@ $root.org = (function() {
|
|
|
10447
11851
|
* Properties of a GetDocumentsResponse.
|
|
10448
11852
|
* @memberof org.dash.platform.dapi.v0
|
|
10449
11853
|
* @interface IGetDocumentsResponse
|
|
10450
|
-
* @property {
|
|
11854
|
+
* @property {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments|null} [documents] GetDocumentsResponse documents
|
|
10451
11855
|
* @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetDocumentsResponse proof
|
|
10452
11856
|
* @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetDocumentsResponse metadata
|
|
10453
11857
|
*/
|
|
@@ -10461,7 +11865,6 @@ $root.org = (function() {
|
|
|
10461
11865
|
* @param {org.dash.platform.dapi.v0.IGetDocumentsResponse=} [properties] Properties to set
|
|
10462
11866
|
*/
|
|
10463
11867
|
function GetDocumentsResponse(properties) {
|
|
10464
|
-
this.documents = [];
|
|
10465
11868
|
if (properties)
|
|
10466
11869
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
10467
11870
|
if (properties[keys[i]] != null)
|
|
@@ -10470,11 +11873,11 @@ $root.org = (function() {
|
|
|
10470
11873
|
|
|
10471
11874
|
/**
|
|
10472
11875
|
* GetDocumentsResponse documents.
|
|
10473
|
-
* @member {
|
|
11876
|
+
* @member {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments|null|undefined} documents
|
|
10474
11877
|
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
|
|
10475
11878
|
* @instance
|
|
10476
11879
|
*/
|
|
10477
|
-
GetDocumentsResponse.prototype.documents =
|
|
11880
|
+
GetDocumentsResponse.prototype.documents = null;
|
|
10478
11881
|
|
|
10479
11882
|
/**
|
|
10480
11883
|
* GetDocumentsResponse proof.
|
|
@@ -10492,6 +11895,20 @@ $root.org = (function() {
|
|
|
10492
11895
|
*/
|
|
10493
11896
|
GetDocumentsResponse.prototype.metadata = null;
|
|
10494
11897
|
|
|
11898
|
+
// OneOf field names bound to virtual getters and setters
|
|
11899
|
+
var $oneOfFields;
|
|
11900
|
+
|
|
11901
|
+
/**
|
|
11902
|
+
* GetDocumentsResponse result.
|
|
11903
|
+
* @member {"documents"|"proof"|undefined} result
|
|
11904
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
|
|
11905
|
+
* @instance
|
|
11906
|
+
*/
|
|
11907
|
+
Object.defineProperty(GetDocumentsResponse.prototype, "result", {
|
|
11908
|
+
get: $util.oneOfGetter($oneOfFields = ["documents", "proof"]),
|
|
11909
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
11910
|
+
});
|
|
11911
|
+
|
|
10495
11912
|
/**
|
|
10496
11913
|
* Creates a new GetDocumentsResponse instance using the specified properties.
|
|
10497
11914
|
* @function create
|
|
@@ -10516,9 +11933,8 @@ $root.org = (function() {
|
|
|
10516
11933
|
GetDocumentsResponse.encode = function encode(message, writer) {
|
|
10517
11934
|
if (!writer)
|
|
10518
11935
|
writer = $Writer.create();
|
|
10519
|
-
if (message.documents != null && message
|
|
10520
|
-
|
|
10521
|
-
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.documents[i]);
|
|
11936
|
+
if (message.documents != null && Object.hasOwnProperty.call(message, "documents"))
|
|
11937
|
+
$root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.encode(message.documents, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
10522
11938
|
if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
|
|
10523
11939
|
$root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
10524
11940
|
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
@@ -10558,9 +11974,7 @@ $root.org = (function() {
|
|
|
10558
11974
|
var tag = reader.uint32();
|
|
10559
11975
|
switch (tag >>> 3) {
|
|
10560
11976
|
case 1:
|
|
10561
|
-
|
|
10562
|
-
message.documents = [];
|
|
10563
|
-
message.documents.push(reader.bytes());
|
|
11977
|
+
message.documents = $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.decode(reader, reader.uint32());
|
|
10564
11978
|
break;
|
|
10565
11979
|
case 2:
|
|
10566
11980
|
message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
|
|
@@ -10603,17 +12017,24 @@ $root.org = (function() {
|
|
|
10603
12017
|
GetDocumentsResponse.verify = function verify(message) {
|
|
10604
12018
|
if (typeof message !== "object" || message === null)
|
|
10605
12019
|
return "object expected";
|
|
12020
|
+
var properties = {};
|
|
10606
12021
|
if (message.documents != null && message.hasOwnProperty("documents")) {
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
if (
|
|
10611
|
-
return "documents
|
|
12022
|
+
properties.result = 1;
|
|
12023
|
+
{
|
|
12024
|
+
var error = $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.verify(message.documents);
|
|
12025
|
+
if (error)
|
|
12026
|
+
return "documents." + error;
|
|
12027
|
+
}
|
|
10612
12028
|
}
|
|
10613
12029
|
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
12030
|
+
if (properties.result === 1)
|
|
12031
|
+
return "result: multiple values";
|
|
12032
|
+
properties.result = 1;
|
|
12033
|
+
{
|
|
12034
|
+
var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
|
|
12035
|
+
if (error)
|
|
12036
|
+
return "proof." + error;
|
|
12037
|
+
}
|
|
10617
12038
|
}
|
|
10618
12039
|
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
10619
12040
|
var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
|
|
@@ -10635,15 +12056,10 @@ $root.org = (function() {
|
|
|
10635
12056
|
if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsResponse)
|
|
10636
12057
|
return object;
|
|
10637
12058
|
var message = new $root.org.dash.platform.dapi.v0.GetDocumentsResponse();
|
|
10638
|
-
if (object.documents) {
|
|
10639
|
-
if (
|
|
10640
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsResponse.documents:
|
|
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];
|
|
12059
|
+
if (object.documents != null) {
|
|
12060
|
+
if (typeof object.documents !== "object")
|
|
12061
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsResponse.documents: object expected");
|
|
12062
|
+
message.documents = $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.fromObject(object.documents);
|
|
10647
12063
|
}
|
|
10648
12064
|
if (object.proof != null) {
|
|
10649
12065
|
if (typeof object.proof !== "object")
|
|
@@ -10671,34 +12087,239 @@ $root.org = (function() {
|
|
|
10671
12087
|
if (!options)
|
|
10672
12088
|
options = {};
|
|
10673
12089
|
var object = {};
|
|
10674
|
-
if (options.
|
|
10675
|
-
object.documents = [];
|
|
10676
|
-
if (options.defaults) {
|
|
10677
|
-
object.proof = null;
|
|
12090
|
+
if (options.defaults)
|
|
10678
12091
|
object.metadata = null;
|
|
12092
|
+
if (message.documents != null && message.hasOwnProperty("documents")) {
|
|
12093
|
+
object.documents = $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.toObject(message.documents, options);
|
|
12094
|
+
if (options.oneofs)
|
|
12095
|
+
object.result = "documents";
|
|
10679
12096
|
}
|
|
10680
|
-
if (message.
|
|
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"))
|
|
12097
|
+
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
10686
12098
|
object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
|
|
12099
|
+
if (options.oneofs)
|
|
12100
|
+
object.result = "proof";
|
|
12101
|
+
}
|
|
10687
12102
|
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
10688
12103
|
object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
|
|
10689
12104
|
return object;
|
|
10690
12105
|
};
|
|
10691
12106
|
|
|
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
|
-
};
|
|
12107
|
+
/**
|
|
12108
|
+
* Converts this GetDocumentsResponse to JSON.
|
|
12109
|
+
* @function toJSON
|
|
12110
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
|
|
12111
|
+
* @instance
|
|
12112
|
+
* @returns {Object.<string,*>} JSON object
|
|
12113
|
+
*/
|
|
12114
|
+
GetDocumentsResponse.prototype.toJSON = function toJSON() {
|
|
12115
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
12116
|
+
};
|
|
12117
|
+
|
|
12118
|
+
GetDocumentsResponse.Documents = (function() {
|
|
12119
|
+
|
|
12120
|
+
/**
|
|
12121
|
+
* Properties of a Documents.
|
|
12122
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
|
|
12123
|
+
* @interface IDocuments
|
|
12124
|
+
* @property {Array.<Uint8Array>|null} [documents] Documents documents
|
|
12125
|
+
*/
|
|
12126
|
+
|
|
12127
|
+
/**
|
|
12128
|
+
* Constructs a new Documents.
|
|
12129
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse
|
|
12130
|
+
* @classdesc Represents a Documents.
|
|
12131
|
+
* @implements IDocuments
|
|
12132
|
+
* @constructor
|
|
12133
|
+
* @param {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments=} [properties] Properties to set
|
|
12134
|
+
*/
|
|
12135
|
+
function Documents(properties) {
|
|
12136
|
+
this.documents = [];
|
|
12137
|
+
if (properties)
|
|
12138
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
12139
|
+
if (properties[keys[i]] != null)
|
|
12140
|
+
this[keys[i]] = properties[keys[i]];
|
|
12141
|
+
}
|
|
12142
|
+
|
|
12143
|
+
/**
|
|
12144
|
+
* Documents documents.
|
|
12145
|
+
* @member {Array.<Uint8Array>} documents
|
|
12146
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12147
|
+
* @instance
|
|
12148
|
+
*/
|
|
12149
|
+
Documents.prototype.documents = $util.emptyArray;
|
|
12150
|
+
|
|
12151
|
+
/**
|
|
12152
|
+
* Creates a new Documents instance using the specified properties.
|
|
12153
|
+
* @function create
|
|
12154
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12155
|
+
* @static
|
|
12156
|
+
* @param {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments=} [properties] Properties to set
|
|
12157
|
+
* @returns {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} Documents instance
|
|
12158
|
+
*/
|
|
12159
|
+
Documents.create = function create(properties) {
|
|
12160
|
+
return new Documents(properties);
|
|
12161
|
+
};
|
|
12162
|
+
|
|
12163
|
+
/**
|
|
12164
|
+
* Encodes the specified Documents message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.verify|verify} messages.
|
|
12165
|
+
* @function encode
|
|
12166
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12167
|
+
* @static
|
|
12168
|
+
* @param {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments} message Documents message or plain object to encode
|
|
12169
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
12170
|
+
* @returns {$protobuf.Writer} Writer
|
|
12171
|
+
*/
|
|
12172
|
+
Documents.encode = function encode(message, writer) {
|
|
12173
|
+
if (!writer)
|
|
12174
|
+
writer = $Writer.create();
|
|
12175
|
+
if (message.documents != null && message.documents.length)
|
|
12176
|
+
for (var i = 0; i < message.documents.length; ++i)
|
|
12177
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.documents[i]);
|
|
12178
|
+
return writer;
|
|
12179
|
+
};
|
|
12180
|
+
|
|
12181
|
+
/**
|
|
12182
|
+
* Encodes the specified Documents message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.verify|verify} messages.
|
|
12183
|
+
* @function encodeDelimited
|
|
12184
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12185
|
+
* @static
|
|
12186
|
+
* @param {org.dash.platform.dapi.v0.GetDocumentsResponse.IDocuments} message Documents message or plain object to encode
|
|
12187
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
12188
|
+
* @returns {$protobuf.Writer} Writer
|
|
12189
|
+
*/
|
|
12190
|
+
Documents.encodeDelimited = function encodeDelimited(message, writer) {
|
|
12191
|
+
return this.encode(message, writer).ldelim();
|
|
12192
|
+
};
|
|
12193
|
+
|
|
12194
|
+
/**
|
|
12195
|
+
* Decodes a Documents message from the specified reader or buffer.
|
|
12196
|
+
* @function decode
|
|
12197
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12198
|
+
* @static
|
|
12199
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
12200
|
+
* @param {number} [length] Message length if known beforehand
|
|
12201
|
+
* @returns {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} Documents
|
|
12202
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12203
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12204
|
+
*/
|
|
12205
|
+
Documents.decode = function decode(reader, length) {
|
|
12206
|
+
if (!(reader instanceof $Reader))
|
|
12207
|
+
reader = $Reader.create(reader);
|
|
12208
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents();
|
|
12209
|
+
while (reader.pos < end) {
|
|
12210
|
+
var tag = reader.uint32();
|
|
12211
|
+
switch (tag >>> 3) {
|
|
12212
|
+
case 1:
|
|
12213
|
+
if (!(message.documents && message.documents.length))
|
|
12214
|
+
message.documents = [];
|
|
12215
|
+
message.documents.push(reader.bytes());
|
|
12216
|
+
break;
|
|
12217
|
+
default:
|
|
12218
|
+
reader.skipType(tag & 7);
|
|
12219
|
+
break;
|
|
12220
|
+
}
|
|
12221
|
+
}
|
|
12222
|
+
return message;
|
|
12223
|
+
};
|
|
12224
|
+
|
|
12225
|
+
/**
|
|
12226
|
+
* Decodes a Documents message from the specified reader or buffer, length delimited.
|
|
12227
|
+
* @function decodeDelimited
|
|
12228
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12229
|
+
* @static
|
|
12230
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
12231
|
+
* @returns {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} Documents
|
|
12232
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12233
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12234
|
+
*/
|
|
12235
|
+
Documents.decodeDelimited = function decodeDelimited(reader) {
|
|
12236
|
+
if (!(reader instanceof $Reader))
|
|
12237
|
+
reader = new $Reader(reader);
|
|
12238
|
+
return this.decode(reader, reader.uint32());
|
|
12239
|
+
};
|
|
12240
|
+
|
|
12241
|
+
/**
|
|
12242
|
+
* Verifies a Documents message.
|
|
12243
|
+
* @function verify
|
|
12244
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12245
|
+
* @static
|
|
12246
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
12247
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
12248
|
+
*/
|
|
12249
|
+
Documents.verify = function verify(message) {
|
|
12250
|
+
if (typeof message !== "object" || message === null)
|
|
12251
|
+
return "object expected";
|
|
12252
|
+
if (message.documents != null && message.hasOwnProperty("documents")) {
|
|
12253
|
+
if (!Array.isArray(message.documents))
|
|
12254
|
+
return "documents: array expected";
|
|
12255
|
+
for (var i = 0; i < message.documents.length; ++i)
|
|
12256
|
+
if (!(message.documents[i] && typeof message.documents[i].length === "number" || $util.isString(message.documents[i])))
|
|
12257
|
+
return "documents: buffer[] expected";
|
|
12258
|
+
}
|
|
12259
|
+
return null;
|
|
12260
|
+
};
|
|
12261
|
+
|
|
12262
|
+
/**
|
|
12263
|
+
* Creates a Documents message from a plain object. Also converts values to their respective internal types.
|
|
12264
|
+
* @function fromObject
|
|
12265
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12266
|
+
* @static
|
|
12267
|
+
* @param {Object.<string,*>} object Plain object
|
|
12268
|
+
* @returns {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} Documents
|
|
12269
|
+
*/
|
|
12270
|
+
Documents.fromObject = function fromObject(object) {
|
|
12271
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents)
|
|
12272
|
+
return object;
|
|
12273
|
+
var message = new $root.org.dash.platform.dapi.v0.GetDocumentsResponse.Documents();
|
|
12274
|
+
if (object.documents) {
|
|
12275
|
+
if (!Array.isArray(object.documents))
|
|
12276
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsResponse.Documents.documents: array expected");
|
|
12277
|
+
message.documents = [];
|
|
12278
|
+
for (var i = 0; i < object.documents.length; ++i)
|
|
12279
|
+
if (typeof object.documents[i] === "string")
|
|
12280
|
+
$util.base64.decode(object.documents[i], message.documents[i] = $util.newBuffer($util.base64.length(object.documents[i])), 0);
|
|
12281
|
+
else if (object.documents[i].length >= 0)
|
|
12282
|
+
message.documents[i] = object.documents[i];
|
|
12283
|
+
}
|
|
12284
|
+
return message;
|
|
12285
|
+
};
|
|
12286
|
+
|
|
12287
|
+
/**
|
|
12288
|
+
* Creates a plain object from a Documents message. Also converts values to other types if specified.
|
|
12289
|
+
* @function toObject
|
|
12290
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12291
|
+
* @static
|
|
12292
|
+
* @param {org.dash.platform.dapi.v0.GetDocumentsResponse.Documents} message Documents
|
|
12293
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
12294
|
+
* @returns {Object.<string,*>} Plain object
|
|
12295
|
+
*/
|
|
12296
|
+
Documents.toObject = function toObject(message, options) {
|
|
12297
|
+
if (!options)
|
|
12298
|
+
options = {};
|
|
12299
|
+
var object = {};
|
|
12300
|
+
if (options.arrays || options.defaults)
|
|
12301
|
+
object.documents = [];
|
|
12302
|
+
if (message.documents && message.documents.length) {
|
|
12303
|
+
object.documents = [];
|
|
12304
|
+
for (var j = 0; j < message.documents.length; ++j)
|
|
12305
|
+
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];
|
|
12306
|
+
}
|
|
12307
|
+
return object;
|
|
12308
|
+
};
|
|
12309
|
+
|
|
12310
|
+
/**
|
|
12311
|
+
* Converts this Documents to JSON.
|
|
12312
|
+
* @function toJSON
|
|
12313
|
+
* @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.Documents
|
|
12314
|
+
* @instance
|
|
12315
|
+
* @returns {Object.<string,*>} JSON object
|
|
12316
|
+
*/
|
|
12317
|
+
Documents.prototype.toJSON = function toJSON() {
|
|
12318
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
12319
|
+
};
|
|
12320
|
+
|
|
12321
|
+
return Documents;
|
|
12322
|
+
})();
|
|
10702
12323
|
|
|
10703
12324
|
return GetDocumentsResponse;
|
|
10704
12325
|
})();
|
|
@@ -10938,7 +12559,7 @@ $root.org = (function() {
|
|
|
10938
12559
|
* Properties of a GetIdentitiesByPublicKeyHashesResponse.
|
|
10939
12560
|
* @memberof org.dash.platform.dapi.v0
|
|
10940
12561
|
* @interface IGetIdentitiesByPublicKeyHashesResponse
|
|
10941
|
-
* @property {
|
|
12562
|
+
* @property {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities|null} [identities] GetIdentitiesByPublicKeyHashesResponse identities
|
|
10942
12563
|
* @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentitiesByPublicKeyHashesResponse proof
|
|
10943
12564
|
* @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentitiesByPublicKeyHashesResponse metadata
|
|
10944
12565
|
*/
|
|
@@ -10952,7 +12573,6 @@ $root.org = (function() {
|
|
|
10952
12573
|
* @param {org.dash.platform.dapi.v0.IGetIdentitiesByPublicKeyHashesResponse=} [properties] Properties to set
|
|
10953
12574
|
*/
|
|
10954
12575
|
function GetIdentitiesByPublicKeyHashesResponse(properties) {
|
|
10955
|
-
this.identities = [];
|
|
10956
12576
|
if (properties)
|
|
10957
12577
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
10958
12578
|
if (properties[keys[i]] != null)
|
|
@@ -10961,11 +12581,11 @@ $root.org = (function() {
|
|
|
10961
12581
|
|
|
10962
12582
|
/**
|
|
10963
12583
|
* GetIdentitiesByPublicKeyHashesResponse identities.
|
|
10964
|
-
* @member {
|
|
12584
|
+
* @member {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities|null|undefined} identities
|
|
10965
12585
|
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse
|
|
10966
12586
|
* @instance
|
|
10967
12587
|
*/
|
|
10968
|
-
GetIdentitiesByPublicKeyHashesResponse.prototype.identities =
|
|
12588
|
+
GetIdentitiesByPublicKeyHashesResponse.prototype.identities = null;
|
|
10969
12589
|
|
|
10970
12590
|
/**
|
|
10971
12591
|
* GetIdentitiesByPublicKeyHashesResponse proof.
|
|
@@ -10983,6 +12603,20 @@ $root.org = (function() {
|
|
|
10983
12603
|
*/
|
|
10984
12604
|
GetIdentitiesByPublicKeyHashesResponse.prototype.metadata = null;
|
|
10985
12605
|
|
|
12606
|
+
// OneOf field names bound to virtual getters and setters
|
|
12607
|
+
var $oneOfFields;
|
|
12608
|
+
|
|
12609
|
+
/**
|
|
12610
|
+
* GetIdentitiesByPublicKeyHashesResponse result.
|
|
12611
|
+
* @member {"identities"|"proof"|undefined} result
|
|
12612
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse
|
|
12613
|
+
* @instance
|
|
12614
|
+
*/
|
|
12615
|
+
Object.defineProperty(GetIdentitiesByPublicKeyHashesResponse.prototype, "result", {
|
|
12616
|
+
get: $util.oneOfGetter($oneOfFields = ["identities", "proof"]),
|
|
12617
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
12618
|
+
});
|
|
12619
|
+
|
|
10986
12620
|
/**
|
|
10987
12621
|
* Creates a new GetIdentitiesByPublicKeyHashesResponse instance using the specified properties.
|
|
10988
12622
|
* @function create
|
|
@@ -11007,9 +12641,8 @@ $root.org = (function() {
|
|
|
11007
12641
|
GetIdentitiesByPublicKeyHashesResponse.encode = function encode(message, writer) {
|
|
11008
12642
|
if (!writer)
|
|
11009
12643
|
writer = $Writer.create();
|
|
11010
|
-
if (message.identities != null && message
|
|
11011
|
-
|
|
11012
|
-
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identities[i]);
|
|
12644
|
+
if (message.identities != null && Object.hasOwnProperty.call(message, "identities"))
|
|
12645
|
+
$root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.encode(message.identities, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
11013
12646
|
if (message.proof != null && Object.hasOwnProperty.call(message, "proof"))
|
|
11014
12647
|
$root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
11015
12648
|
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
@@ -11049,9 +12682,7 @@ $root.org = (function() {
|
|
|
11049
12682
|
var tag = reader.uint32();
|
|
11050
12683
|
switch (tag >>> 3) {
|
|
11051
12684
|
case 1:
|
|
11052
|
-
|
|
11053
|
-
message.identities = [];
|
|
11054
|
-
message.identities.push(reader.bytes());
|
|
12685
|
+
message.identities = $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.decode(reader, reader.uint32());
|
|
11055
12686
|
break;
|
|
11056
12687
|
case 2:
|
|
11057
12688
|
message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32());
|
|
@@ -11094,17 +12725,24 @@ $root.org = (function() {
|
|
|
11094
12725
|
GetIdentitiesByPublicKeyHashesResponse.verify = function verify(message) {
|
|
11095
12726
|
if (typeof message !== "object" || message === null)
|
|
11096
12727
|
return "object expected";
|
|
12728
|
+
var properties = {};
|
|
11097
12729
|
if (message.identities != null && message.hasOwnProperty("identities")) {
|
|
11098
|
-
|
|
11099
|
-
|
|
11100
|
-
|
|
11101
|
-
if (
|
|
11102
|
-
return "identities
|
|
12730
|
+
properties.result = 1;
|
|
12731
|
+
{
|
|
12732
|
+
var error = $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.verify(message.identities);
|
|
12733
|
+
if (error)
|
|
12734
|
+
return "identities." + error;
|
|
12735
|
+
}
|
|
11103
12736
|
}
|
|
11104
12737
|
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
12738
|
+
if (properties.result === 1)
|
|
12739
|
+
return "result: multiple values";
|
|
12740
|
+
properties.result = 1;
|
|
12741
|
+
{
|
|
12742
|
+
var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
|
|
12743
|
+
if (error)
|
|
12744
|
+
return "proof." + error;
|
|
12745
|
+
}
|
|
11108
12746
|
}
|
|
11109
12747
|
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
11110
12748
|
var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata);
|
|
@@ -11126,15 +12764,10 @@ $root.org = (function() {
|
|
|
11126
12764
|
if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse)
|
|
11127
12765
|
return object;
|
|
11128
12766
|
var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse();
|
|
11129
|
-
if (object.identities) {
|
|
11130
|
-
if (
|
|
11131
|
-
throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.identities:
|
|
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];
|
|
12767
|
+
if (object.identities != null) {
|
|
12768
|
+
if (typeof object.identities !== "object")
|
|
12769
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.identities: object expected");
|
|
12770
|
+
message.identities = $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.fromObject(object.identities);
|
|
11138
12771
|
}
|
|
11139
12772
|
if (object.proof != null) {
|
|
11140
12773
|
if (typeof object.proof !== "object")
|
|
@@ -11162,19 +12795,18 @@ $root.org = (function() {
|
|
|
11162
12795
|
if (!options)
|
|
11163
12796
|
options = {};
|
|
11164
12797
|
var object = {};
|
|
11165
|
-
if (options.
|
|
11166
|
-
object.identities = [];
|
|
11167
|
-
if (options.defaults) {
|
|
11168
|
-
object.proof = null;
|
|
12798
|
+
if (options.defaults)
|
|
11169
12799
|
object.metadata = null;
|
|
12800
|
+
if (message.identities != null && message.hasOwnProperty("identities")) {
|
|
12801
|
+
object.identities = $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.toObject(message.identities, options);
|
|
12802
|
+
if (options.oneofs)
|
|
12803
|
+
object.result = "identities";
|
|
11170
12804
|
}
|
|
11171
|
-
if (message.
|
|
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"))
|
|
12805
|
+
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
11177
12806
|
object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
|
|
12807
|
+
if (options.oneofs)
|
|
12808
|
+
object.result = "proof";
|
|
12809
|
+
}
|
|
11178
12810
|
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
11179
12811
|
object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
|
|
11180
12812
|
return object;
|
|
@@ -11191,6 +12823,212 @@ $root.org = (function() {
|
|
|
11191
12823
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
11192
12824
|
};
|
|
11193
12825
|
|
|
12826
|
+
GetIdentitiesByPublicKeyHashesResponse.Identities = (function() {
|
|
12827
|
+
|
|
12828
|
+
/**
|
|
12829
|
+
* Properties of an Identities.
|
|
12830
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse
|
|
12831
|
+
* @interface IIdentities
|
|
12832
|
+
* @property {Array.<Uint8Array>|null} [identities] Identities identities
|
|
12833
|
+
*/
|
|
12834
|
+
|
|
12835
|
+
/**
|
|
12836
|
+
* Constructs a new Identities.
|
|
12837
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse
|
|
12838
|
+
* @classdesc Represents an Identities.
|
|
12839
|
+
* @implements IIdentities
|
|
12840
|
+
* @constructor
|
|
12841
|
+
* @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities=} [properties] Properties to set
|
|
12842
|
+
*/
|
|
12843
|
+
function Identities(properties) {
|
|
12844
|
+
this.identities = [];
|
|
12845
|
+
if (properties)
|
|
12846
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
12847
|
+
if (properties[keys[i]] != null)
|
|
12848
|
+
this[keys[i]] = properties[keys[i]];
|
|
12849
|
+
}
|
|
12850
|
+
|
|
12851
|
+
/**
|
|
12852
|
+
* Identities identities.
|
|
12853
|
+
* @member {Array.<Uint8Array>} identities
|
|
12854
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12855
|
+
* @instance
|
|
12856
|
+
*/
|
|
12857
|
+
Identities.prototype.identities = $util.emptyArray;
|
|
12858
|
+
|
|
12859
|
+
/**
|
|
12860
|
+
* Creates a new Identities instance using the specified properties.
|
|
12861
|
+
* @function create
|
|
12862
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12863
|
+
* @static
|
|
12864
|
+
* @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities=} [properties] Properties to set
|
|
12865
|
+
* @returns {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} Identities instance
|
|
12866
|
+
*/
|
|
12867
|
+
Identities.create = function create(properties) {
|
|
12868
|
+
return new Identities(properties);
|
|
12869
|
+
};
|
|
12870
|
+
|
|
12871
|
+
/**
|
|
12872
|
+
* Encodes the specified Identities message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.verify|verify} messages.
|
|
12873
|
+
* @function encode
|
|
12874
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12875
|
+
* @static
|
|
12876
|
+
* @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities} message Identities message or plain object to encode
|
|
12877
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
12878
|
+
* @returns {$protobuf.Writer} Writer
|
|
12879
|
+
*/
|
|
12880
|
+
Identities.encode = function encode(message, writer) {
|
|
12881
|
+
if (!writer)
|
|
12882
|
+
writer = $Writer.create();
|
|
12883
|
+
if (message.identities != null && message.identities.length)
|
|
12884
|
+
for (var i = 0; i < message.identities.length; ++i)
|
|
12885
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identities[i]);
|
|
12886
|
+
return writer;
|
|
12887
|
+
};
|
|
12888
|
+
|
|
12889
|
+
/**
|
|
12890
|
+
* Encodes the specified Identities message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.verify|verify} messages.
|
|
12891
|
+
* @function encodeDelimited
|
|
12892
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12893
|
+
* @static
|
|
12894
|
+
* @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.IIdentities} message Identities message or plain object to encode
|
|
12895
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
12896
|
+
* @returns {$protobuf.Writer} Writer
|
|
12897
|
+
*/
|
|
12898
|
+
Identities.encodeDelimited = function encodeDelimited(message, writer) {
|
|
12899
|
+
return this.encode(message, writer).ldelim();
|
|
12900
|
+
};
|
|
12901
|
+
|
|
12902
|
+
/**
|
|
12903
|
+
* Decodes an Identities message from the specified reader or buffer.
|
|
12904
|
+
* @function decode
|
|
12905
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12906
|
+
* @static
|
|
12907
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
12908
|
+
* @param {number} [length] Message length if known beforehand
|
|
12909
|
+
* @returns {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} Identities
|
|
12910
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12911
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12912
|
+
*/
|
|
12913
|
+
Identities.decode = function decode(reader, length) {
|
|
12914
|
+
if (!(reader instanceof $Reader))
|
|
12915
|
+
reader = $Reader.create(reader);
|
|
12916
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities();
|
|
12917
|
+
while (reader.pos < end) {
|
|
12918
|
+
var tag = reader.uint32();
|
|
12919
|
+
switch (tag >>> 3) {
|
|
12920
|
+
case 1:
|
|
12921
|
+
if (!(message.identities && message.identities.length))
|
|
12922
|
+
message.identities = [];
|
|
12923
|
+
message.identities.push(reader.bytes());
|
|
12924
|
+
break;
|
|
12925
|
+
default:
|
|
12926
|
+
reader.skipType(tag & 7);
|
|
12927
|
+
break;
|
|
12928
|
+
}
|
|
12929
|
+
}
|
|
12930
|
+
return message;
|
|
12931
|
+
};
|
|
12932
|
+
|
|
12933
|
+
/**
|
|
12934
|
+
* Decodes an Identities message from the specified reader or buffer, length delimited.
|
|
12935
|
+
* @function decodeDelimited
|
|
12936
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12937
|
+
* @static
|
|
12938
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
12939
|
+
* @returns {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} Identities
|
|
12940
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12941
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12942
|
+
*/
|
|
12943
|
+
Identities.decodeDelimited = function decodeDelimited(reader) {
|
|
12944
|
+
if (!(reader instanceof $Reader))
|
|
12945
|
+
reader = new $Reader(reader);
|
|
12946
|
+
return this.decode(reader, reader.uint32());
|
|
12947
|
+
};
|
|
12948
|
+
|
|
12949
|
+
/**
|
|
12950
|
+
* Verifies an Identities message.
|
|
12951
|
+
* @function verify
|
|
12952
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12953
|
+
* @static
|
|
12954
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
12955
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
12956
|
+
*/
|
|
12957
|
+
Identities.verify = function verify(message) {
|
|
12958
|
+
if (typeof message !== "object" || message === null)
|
|
12959
|
+
return "object expected";
|
|
12960
|
+
if (message.identities != null && message.hasOwnProperty("identities")) {
|
|
12961
|
+
if (!Array.isArray(message.identities))
|
|
12962
|
+
return "identities: array expected";
|
|
12963
|
+
for (var i = 0; i < message.identities.length; ++i)
|
|
12964
|
+
if (!(message.identities[i] && typeof message.identities[i].length === "number" || $util.isString(message.identities[i])))
|
|
12965
|
+
return "identities: buffer[] expected";
|
|
12966
|
+
}
|
|
12967
|
+
return null;
|
|
12968
|
+
};
|
|
12969
|
+
|
|
12970
|
+
/**
|
|
12971
|
+
* Creates an Identities message from a plain object. Also converts values to their respective internal types.
|
|
12972
|
+
* @function fromObject
|
|
12973
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12974
|
+
* @static
|
|
12975
|
+
* @param {Object.<string,*>} object Plain object
|
|
12976
|
+
* @returns {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} Identities
|
|
12977
|
+
*/
|
|
12978
|
+
Identities.fromObject = function fromObject(object) {
|
|
12979
|
+
if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities)
|
|
12980
|
+
return object;
|
|
12981
|
+
var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities();
|
|
12982
|
+
if (object.identities) {
|
|
12983
|
+
if (!Array.isArray(object.identities))
|
|
12984
|
+
throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities.identities: array expected");
|
|
12985
|
+
message.identities = [];
|
|
12986
|
+
for (var i = 0; i < object.identities.length; ++i)
|
|
12987
|
+
if (typeof object.identities[i] === "string")
|
|
12988
|
+
$util.base64.decode(object.identities[i], message.identities[i] = $util.newBuffer($util.base64.length(object.identities[i])), 0);
|
|
12989
|
+
else if (object.identities[i].length >= 0)
|
|
12990
|
+
message.identities[i] = object.identities[i];
|
|
12991
|
+
}
|
|
12992
|
+
return message;
|
|
12993
|
+
};
|
|
12994
|
+
|
|
12995
|
+
/**
|
|
12996
|
+
* Creates a plain object from an Identities message. Also converts values to other types if specified.
|
|
12997
|
+
* @function toObject
|
|
12998
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
12999
|
+
* @static
|
|
13000
|
+
* @param {org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities} message Identities
|
|
13001
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
13002
|
+
* @returns {Object.<string,*>} Plain object
|
|
13003
|
+
*/
|
|
13004
|
+
Identities.toObject = function toObject(message, options) {
|
|
13005
|
+
if (!options)
|
|
13006
|
+
options = {};
|
|
13007
|
+
var object = {};
|
|
13008
|
+
if (options.arrays || options.defaults)
|
|
13009
|
+
object.identities = [];
|
|
13010
|
+
if (message.identities && message.identities.length) {
|
|
13011
|
+
object.identities = [];
|
|
13012
|
+
for (var j = 0; j < message.identities.length; ++j)
|
|
13013
|
+
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];
|
|
13014
|
+
}
|
|
13015
|
+
return object;
|
|
13016
|
+
};
|
|
13017
|
+
|
|
13018
|
+
/**
|
|
13019
|
+
* Converts this Identities to JSON.
|
|
13020
|
+
* @function toJSON
|
|
13021
|
+
* @memberof org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse.Identities
|
|
13022
|
+
* @instance
|
|
13023
|
+
* @returns {Object.<string,*>} JSON object
|
|
13024
|
+
*/
|
|
13025
|
+
Identities.prototype.toJSON = function toJSON() {
|
|
13026
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
13027
|
+
};
|
|
13028
|
+
|
|
13029
|
+
return Identities;
|
|
13030
|
+
})();
|
|
13031
|
+
|
|
11194
13032
|
return GetIdentitiesByPublicKeyHashesResponse;
|
|
11195
13033
|
})();
|
|
11196
13034
|
|
|
@@ -11956,12 +13794,12 @@ $root.org = (function() {
|
|
|
11956
13794
|
var $oneOfFields;
|
|
11957
13795
|
|
|
11958
13796
|
/**
|
|
11959
|
-
* WaitForStateTransitionResultResponse
|
|
11960
|
-
* @member {"error"|"proof"|undefined}
|
|
13797
|
+
* WaitForStateTransitionResultResponse result.
|
|
13798
|
+
* @member {"error"|"proof"|undefined} result
|
|
11961
13799
|
* @memberof org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse
|
|
11962
13800
|
* @instance
|
|
11963
13801
|
*/
|
|
11964
|
-
Object.defineProperty(WaitForStateTransitionResultResponse.prototype, "
|
|
13802
|
+
Object.defineProperty(WaitForStateTransitionResultResponse.prototype, "result", {
|
|
11965
13803
|
get: $util.oneOfGetter($oneOfFields = ["error", "proof"]),
|
|
11966
13804
|
set: $util.oneOfSetter($oneOfFields)
|
|
11967
13805
|
});
|
|
@@ -12076,7 +13914,7 @@ $root.org = (function() {
|
|
|
12076
13914
|
return "object expected";
|
|
12077
13915
|
var properties = {};
|
|
12078
13916
|
if (message.error != null && message.hasOwnProperty("error")) {
|
|
12079
|
-
properties.
|
|
13917
|
+
properties.result = 1;
|
|
12080
13918
|
{
|
|
12081
13919
|
var error = $root.org.dash.platform.dapi.v0.StateTransitionBroadcastError.verify(message.error);
|
|
12082
13920
|
if (error)
|
|
@@ -12084,9 +13922,9 @@ $root.org = (function() {
|
|
|
12084
13922
|
}
|
|
12085
13923
|
}
|
|
12086
13924
|
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
12087
|
-
if (properties.
|
|
12088
|
-
return "
|
|
12089
|
-
properties.
|
|
13925
|
+
if (properties.result === 1)
|
|
13926
|
+
return "result: multiple values";
|
|
13927
|
+
properties.result = 1;
|
|
12090
13928
|
{
|
|
12091
13929
|
var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof);
|
|
12092
13930
|
if (error)
|
|
@@ -12149,12 +13987,12 @@ $root.org = (function() {
|
|
|
12149
13987
|
if (message.error != null && message.hasOwnProperty("error")) {
|
|
12150
13988
|
object.error = $root.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject(message.error, options);
|
|
12151
13989
|
if (options.oneofs)
|
|
12152
|
-
object.
|
|
13990
|
+
object.result = "error";
|
|
12153
13991
|
}
|
|
12154
13992
|
if (message.proof != null && message.hasOwnProperty("proof")) {
|
|
12155
13993
|
object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options);
|
|
12156
13994
|
if (options.oneofs)
|
|
12157
|
-
object.
|
|
13995
|
+
object.result = "proof";
|
|
12158
13996
|
}
|
|
12159
13997
|
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
12160
13998
|
object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options);
|