@dashevo/dapi-grpc 0.25.22 → 1.0.0-beta.2
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 +35 -16
- package/build.rs +139 -56
- package/clients/core/v0/nodejs/CorePromiseClient.js +124 -13
- package/clients/core/v0/nodejs/core_pbjs.js +1922 -987
- package/clients/core/v0/nodejs/core_protoc.js +1291 -645
- package/clients/core/v0/rust/core_example.rs +1 -1
- package/clients/core/v0/web/CorePromiseClient.js +49 -5
- package/clients/core/v0/web/core_pb.d.ts +173 -89
- package/clients/core/v0/web/core_pb.js +1291 -645
- package/clients/core/v0/web/core_pb_service.d.ts +59 -10
- package/clients/core/v0/web/core_pb_service.js +134 -6
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +208 -14
- package/clients/platform/v0/nodejs/platform_pbjs.js +22951 -9938
- package/clients/platform/v0/nodejs/platform_protoc.js +22332 -9091
- package/clients/platform/v0/rust/platform_example.rs +1 -1
- package/clients/platform/v0/web/PlatformPromiseClient.js +64 -8
- package/clients/platform/v0/web/platform_pb.d.ts +2057 -302
- package/clients/platform/v0/web/platform_pb.js +22332 -9091
- package/clients/platform/v0/web/platform_pb_service.d.ts +187 -35
- package/clients/platform/v0/web/platform_pb_service.js +355 -35
- package/package.json +2 -2
- package/protos/core/v0/core.proto +45 -23
- package/protos/platform/v0/platform.proto +429 -50
- package/src/lib.rs +26 -2
- package/src/mock/serde_mockable.rs +105 -0
- package/src/mock.rs +130 -0
- package/test/unit/clients/core/v0/nodejs/CorePromiseClient.spec.js +27 -6
- package/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js +55 -1
- package/test/unit/getCoreDefinition.spec.js +5 -2
- package/src/core/proto/org.dash.platform.dapi.v0.rs +0 -666
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +0 -2481
|
@@ -22,22 +22,40 @@ type PlatformgetIdentity = {
|
|
|
22
22
|
readonly responseType: typeof platform_pb.GetIdentityResponse;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
type
|
|
25
|
+
type PlatformgetIdentityKeys = {
|
|
26
26
|
readonly methodName: string;
|
|
27
27
|
readonly service: typeof Platform;
|
|
28
28
|
readonly requestStream: false;
|
|
29
29
|
readonly responseStream: false;
|
|
30
|
-
readonly requestType: typeof platform_pb.
|
|
31
|
-
readonly responseType: typeof platform_pb.
|
|
30
|
+
readonly requestType: typeof platform_pb.GetIdentityKeysRequest;
|
|
31
|
+
readonly responseType: typeof platform_pb.GetIdentityKeysResponse;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
type
|
|
34
|
+
type PlatformgetIdentitiesContractKeys = {
|
|
35
35
|
readonly methodName: string;
|
|
36
36
|
readonly service: typeof Platform;
|
|
37
37
|
readonly requestStream: false;
|
|
38
38
|
readonly responseStream: false;
|
|
39
|
-
readonly requestType: typeof platform_pb.
|
|
40
|
-
readonly responseType: typeof platform_pb.
|
|
39
|
+
readonly requestType: typeof platform_pb.GetIdentitiesContractKeysRequest;
|
|
40
|
+
readonly responseType: typeof platform_pb.GetIdentitiesContractKeysResponse;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type PlatformgetIdentityNonce = {
|
|
44
|
+
readonly methodName: string;
|
|
45
|
+
readonly service: typeof Platform;
|
|
46
|
+
readonly requestStream: false;
|
|
47
|
+
readonly responseStream: false;
|
|
48
|
+
readonly requestType: typeof platform_pb.GetIdentityNonceRequest;
|
|
49
|
+
readonly responseType: typeof platform_pb.GetIdentityNonceResponse;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
type PlatformgetIdentityContractNonce = {
|
|
53
|
+
readonly methodName: string;
|
|
54
|
+
readonly service: typeof Platform;
|
|
55
|
+
readonly requestStream: false;
|
|
56
|
+
readonly responseStream: false;
|
|
57
|
+
readonly requestType: typeof platform_pb.GetIdentityContractNonceRequest;
|
|
58
|
+
readonly responseType: typeof platform_pb.GetIdentityContractNonceResponse;
|
|
41
59
|
};
|
|
42
60
|
|
|
43
61
|
type PlatformgetIdentityBalance = {
|
|
@@ -103,15 +121,6 @@ type PlatformgetDocuments = {
|
|
|
103
121
|
readonly responseType: typeof platform_pb.GetDocumentsResponse;
|
|
104
122
|
};
|
|
105
123
|
|
|
106
|
-
type PlatformgetIdentitiesByPublicKeyHashes = {
|
|
107
|
-
readonly methodName: string;
|
|
108
|
-
readonly service: typeof Platform;
|
|
109
|
-
readonly requestStream: false;
|
|
110
|
-
readonly responseStream: false;
|
|
111
|
-
readonly requestType: typeof platform_pb.GetIdentitiesByPublicKeyHashesRequest;
|
|
112
|
-
readonly responseType: typeof platform_pb.GetIdentitiesByPublicKeyHashesResponse;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
124
|
type PlatformgetIdentityByPublicKeyHash = {
|
|
116
125
|
readonly methodName: string;
|
|
117
126
|
readonly service: typeof Platform;
|
|
@@ -166,12 +175,77 @@ type PlatformgetEpochsInfo = {
|
|
|
166
175
|
readonly responseType: typeof platform_pb.GetEpochsInfoResponse;
|
|
167
176
|
};
|
|
168
177
|
|
|
178
|
+
type PlatformgetContestedResources = {
|
|
179
|
+
readonly methodName: string;
|
|
180
|
+
readonly service: typeof Platform;
|
|
181
|
+
readonly requestStream: false;
|
|
182
|
+
readonly responseStream: false;
|
|
183
|
+
readonly requestType: typeof platform_pb.GetContestedResourcesRequest;
|
|
184
|
+
readonly responseType: typeof platform_pb.GetContestedResourcesResponse;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
type PlatformgetContestedResourceVoteState = {
|
|
188
|
+
readonly methodName: string;
|
|
189
|
+
readonly service: typeof Platform;
|
|
190
|
+
readonly requestStream: false;
|
|
191
|
+
readonly responseStream: false;
|
|
192
|
+
readonly requestType: typeof platform_pb.GetContestedResourceVoteStateRequest;
|
|
193
|
+
readonly responseType: typeof platform_pb.GetContestedResourceVoteStateResponse;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
type PlatformgetContestedResourceVotersForIdentity = {
|
|
197
|
+
readonly methodName: string;
|
|
198
|
+
readonly service: typeof Platform;
|
|
199
|
+
readonly requestStream: false;
|
|
200
|
+
readonly responseStream: false;
|
|
201
|
+
readonly requestType: typeof platform_pb.GetContestedResourceVotersForIdentityRequest;
|
|
202
|
+
readonly responseType: typeof platform_pb.GetContestedResourceVotersForIdentityResponse;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
type PlatformgetContestedResourceIdentityVotes = {
|
|
206
|
+
readonly methodName: string;
|
|
207
|
+
readonly service: typeof Platform;
|
|
208
|
+
readonly requestStream: false;
|
|
209
|
+
readonly responseStream: false;
|
|
210
|
+
readonly requestType: typeof platform_pb.GetContestedResourceIdentityVotesRequest;
|
|
211
|
+
readonly responseType: typeof platform_pb.GetContestedResourceIdentityVotesResponse;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
type PlatformgetVotePollsByEndDate = {
|
|
215
|
+
readonly methodName: string;
|
|
216
|
+
readonly service: typeof Platform;
|
|
217
|
+
readonly requestStream: false;
|
|
218
|
+
readonly responseStream: false;
|
|
219
|
+
readonly requestType: typeof platform_pb.GetVotePollsByEndDateRequest;
|
|
220
|
+
readonly responseType: typeof platform_pb.GetVotePollsByEndDateResponse;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
type PlatformgetPrefundedSpecializedBalance = {
|
|
224
|
+
readonly methodName: string;
|
|
225
|
+
readonly service: typeof Platform;
|
|
226
|
+
readonly requestStream: false;
|
|
227
|
+
readonly responseStream: false;
|
|
228
|
+
readonly requestType: typeof platform_pb.GetPrefundedSpecializedBalanceRequest;
|
|
229
|
+
readonly responseType: typeof platform_pb.GetPrefundedSpecializedBalanceResponse;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
type PlatformgetPathElements = {
|
|
233
|
+
readonly methodName: string;
|
|
234
|
+
readonly service: typeof Platform;
|
|
235
|
+
readonly requestStream: false;
|
|
236
|
+
readonly responseStream: false;
|
|
237
|
+
readonly requestType: typeof platform_pb.GetPathElementsRequest;
|
|
238
|
+
readonly responseType: typeof platform_pb.GetPathElementsResponse;
|
|
239
|
+
};
|
|
240
|
+
|
|
169
241
|
export class Platform {
|
|
170
242
|
static readonly serviceName: string;
|
|
171
243
|
static readonly broadcastStateTransition: PlatformbroadcastStateTransition;
|
|
172
244
|
static readonly getIdentity: PlatformgetIdentity;
|
|
173
|
-
static readonly getIdentities: PlatformgetIdentities;
|
|
174
245
|
static readonly getIdentityKeys: PlatformgetIdentityKeys;
|
|
246
|
+
static readonly getIdentitiesContractKeys: PlatformgetIdentitiesContractKeys;
|
|
247
|
+
static readonly getIdentityNonce: PlatformgetIdentityNonce;
|
|
248
|
+
static readonly getIdentityContractNonce: PlatformgetIdentityContractNonce;
|
|
175
249
|
static readonly getIdentityBalance: PlatformgetIdentityBalance;
|
|
176
250
|
static readonly getIdentityBalanceAndRevision: PlatformgetIdentityBalanceAndRevision;
|
|
177
251
|
static readonly getProofs: PlatformgetProofs;
|
|
@@ -179,13 +253,19 @@ export class Platform {
|
|
|
179
253
|
static readonly getDataContractHistory: PlatformgetDataContractHistory;
|
|
180
254
|
static readonly getDataContracts: PlatformgetDataContracts;
|
|
181
255
|
static readonly getDocuments: PlatformgetDocuments;
|
|
182
|
-
static readonly getIdentitiesByPublicKeyHashes: PlatformgetIdentitiesByPublicKeyHashes;
|
|
183
256
|
static readonly getIdentityByPublicKeyHash: PlatformgetIdentityByPublicKeyHash;
|
|
184
257
|
static readonly waitForStateTransitionResult: PlatformwaitForStateTransitionResult;
|
|
185
258
|
static readonly getConsensusParams: PlatformgetConsensusParams;
|
|
186
259
|
static readonly getProtocolVersionUpgradeState: PlatformgetProtocolVersionUpgradeState;
|
|
187
260
|
static readonly getProtocolVersionUpgradeVoteStatus: PlatformgetProtocolVersionUpgradeVoteStatus;
|
|
188
261
|
static readonly getEpochsInfo: PlatformgetEpochsInfo;
|
|
262
|
+
static readonly getContestedResources: PlatformgetContestedResources;
|
|
263
|
+
static readonly getContestedResourceVoteState: PlatformgetContestedResourceVoteState;
|
|
264
|
+
static readonly getContestedResourceVotersForIdentity: PlatformgetContestedResourceVotersForIdentity;
|
|
265
|
+
static readonly getContestedResourceIdentityVotes: PlatformgetContestedResourceIdentityVotes;
|
|
266
|
+
static readonly getVotePollsByEndDate: PlatformgetVotePollsByEndDate;
|
|
267
|
+
static readonly getPrefundedSpecializedBalance: PlatformgetPrefundedSpecializedBalance;
|
|
268
|
+
static readonly getPathElements: PlatformgetPathElements;
|
|
189
269
|
}
|
|
190
270
|
|
|
191
271
|
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
|
|
@@ -238,15 +318,6 @@ export class PlatformClient {
|
|
|
238
318
|
requestMessage: platform_pb.GetIdentityRequest,
|
|
239
319
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityResponse|null) => void
|
|
240
320
|
): UnaryResponse;
|
|
241
|
-
getIdentities(
|
|
242
|
-
requestMessage: platform_pb.GetIdentitiesRequest,
|
|
243
|
-
metadata: grpc.Metadata,
|
|
244
|
-
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesResponse|null) => void
|
|
245
|
-
): UnaryResponse;
|
|
246
|
-
getIdentities(
|
|
247
|
-
requestMessage: platform_pb.GetIdentitiesRequest,
|
|
248
|
-
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesResponse|null) => void
|
|
249
|
-
): UnaryResponse;
|
|
250
321
|
getIdentityKeys(
|
|
251
322
|
requestMessage: platform_pb.GetIdentityKeysRequest,
|
|
252
323
|
metadata: grpc.Metadata,
|
|
@@ -256,6 +327,33 @@ export class PlatformClient {
|
|
|
256
327
|
requestMessage: platform_pb.GetIdentityKeysRequest,
|
|
257
328
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityKeysResponse|null) => void
|
|
258
329
|
): UnaryResponse;
|
|
330
|
+
getIdentitiesContractKeys(
|
|
331
|
+
requestMessage: platform_pb.GetIdentitiesContractKeysRequest,
|
|
332
|
+
metadata: grpc.Metadata,
|
|
333
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesContractKeysResponse|null) => void
|
|
334
|
+
): UnaryResponse;
|
|
335
|
+
getIdentitiesContractKeys(
|
|
336
|
+
requestMessage: platform_pb.GetIdentitiesContractKeysRequest,
|
|
337
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesContractKeysResponse|null) => void
|
|
338
|
+
): UnaryResponse;
|
|
339
|
+
getIdentityNonce(
|
|
340
|
+
requestMessage: platform_pb.GetIdentityNonceRequest,
|
|
341
|
+
metadata: grpc.Metadata,
|
|
342
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityNonceResponse|null) => void
|
|
343
|
+
): UnaryResponse;
|
|
344
|
+
getIdentityNonce(
|
|
345
|
+
requestMessage: platform_pb.GetIdentityNonceRequest,
|
|
346
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityNonceResponse|null) => void
|
|
347
|
+
): UnaryResponse;
|
|
348
|
+
getIdentityContractNonce(
|
|
349
|
+
requestMessage: platform_pb.GetIdentityContractNonceRequest,
|
|
350
|
+
metadata: grpc.Metadata,
|
|
351
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityContractNonceResponse|null) => void
|
|
352
|
+
): UnaryResponse;
|
|
353
|
+
getIdentityContractNonce(
|
|
354
|
+
requestMessage: platform_pb.GetIdentityContractNonceRequest,
|
|
355
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityContractNonceResponse|null) => void
|
|
356
|
+
): UnaryResponse;
|
|
259
357
|
getIdentityBalance(
|
|
260
358
|
requestMessage: platform_pb.GetIdentityBalanceRequest,
|
|
261
359
|
metadata: grpc.Metadata,
|
|
@@ -319,15 +417,6 @@ export class PlatformClient {
|
|
|
319
417
|
requestMessage: platform_pb.GetDocumentsRequest,
|
|
320
418
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetDocumentsResponse|null) => void
|
|
321
419
|
): UnaryResponse;
|
|
322
|
-
getIdentitiesByPublicKeyHashes(
|
|
323
|
-
requestMessage: platform_pb.GetIdentitiesByPublicKeyHashesRequest,
|
|
324
|
-
metadata: grpc.Metadata,
|
|
325
|
-
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesByPublicKeyHashesResponse|null) => void
|
|
326
|
-
): UnaryResponse;
|
|
327
|
-
getIdentitiesByPublicKeyHashes(
|
|
328
|
-
requestMessage: platform_pb.GetIdentitiesByPublicKeyHashesRequest,
|
|
329
|
-
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesByPublicKeyHashesResponse|null) => void
|
|
330
|
-
): UnaryResponse;
|
|
331
420
|
getIdentityByPublicKeyHash(
|
|
332
421
|
requestMessage: platform_pb.GetIdentityByPublicKeyHashRequest,
|
|
333
422
|
metadata: grpc.Metadata,
|
|
@@ -382,5 +471,68 @@ export class PlatformClient {
|
|
|
382
471
|
requestMessage: platform_pb.GetEpochsInfoRequest,
|
|
383
472
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetEpochsInfoResponse|null) => void
|
|
384
473
|
): UnaryResponse;
|
|
474
|
+
getContestedResources(
|
|
475
|
+
requestMessage: platform_pb.GetContestedResourcesRequest,
|
|
476
|
+
metadata: grpc.Metadata,
|
|
477
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetContestedResourcesResponse|null) => void
|
|
478
|
+
): UnaryResponse;
|
|
479
|
+
getContestedResources(
|
|
480
|
+
requestMessage: platform_pb.GetContestedResourcesRequest,
|
|
481
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetContestedResourcesResponse|null) => void
|
|
482
|
+
): UnaryResponse;
|
|
483
|
+
getContestedResourceVoteState(
|
|
484
|
+
requestMessage: platform_pb.GetContestedResourceVoteStateRequest,
|
|
485
|
+
metadata: grpc.Metadata,
|
|
486
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetContestedResourceVoteStateResponse|null) => void
|
|
487
|
+
): UnaryResponse;
|
|
488
|
+
getContestedResourceVoteState(
|
|
489
|
+
requestMessage: platform_pb.GetContestedResourceVoteStateRequest,
|
|
490
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetContestedResourceVoteStateResponse|null) => void
|
|
491
|
+
): UnaryResponse;
|
|
492
|
+
getContestedResourceVotersForIdentity(
|
|
493
|
+
requestMessage: platform_pb.GetContestedResourceVotersForIdentityRequest,
|
|
494
|
+
metadata: grpc.Metadata,
|
|
495
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetContestedResourceVotersForIdentityResponse|null) => void
|
|
496
|
+
): UnaryResponse;
|
|
497
|
+
getContestedResourceVotersForIdentity(
|
|
498
|
+
requestMessage: platform_pb.GetContestedResourceVotersForIdentityRequest,
|
|
499
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetContestedResourceVotersForIdentityResponse|null) => void
|
|
500
|
+
): UnaryResponse;
|
|
501
|
+
getContestedResourceIdentityVotes(
|
|
502
|
+
requestMessage: platform_pb.GetContestedResourceIdentityVotesRequest,
|
|
503
|
+
metadata: grpc.Metadata,
|
|
504
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetContestedResourceIdentityVotesResponse|null) => void
|
|
505
|
+
): UnaryResponse;
|
|
506
|
+
getContestedResourceIdentityVotes(
|
|
507
|
+
requestMessage: platform_pb.GetContestedResourceIdentityVotesRequest,
|
|
508
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetContestedResourceIdentityVotesResponse|null) => void
|
|
509
|
+
): UnaryResponse;
|
|
510
|
+
getVotePollsByEndDate(
|
|
511
|
+
requestMessage: platform_pb.GetVotePollsByEndDateRequest,
|
|
512
|
+
metadata: grpc.Metadata,
|
|
513
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetVotePollsByEndDateResponse|null) => void
|
|
514
|
+
): UnaryResponse;
|
|
515
|
+
getVotePollsByEndDate(
|
|
516
|
+
requestMessage: platform_pb.GetVotePollsByEndDateRequest,
|
|
517
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetVotePollsByEndDateResponse|null) => void
|
|
518
|
+
): UnaryResponse;
|
|
519
|
+
getPrefundedSpecializedBalance(
|
|
520
|
+
requestMessage: platform_pb.GetPrefundedSpecializedBalanceRequest,
|
|
521
|
+
metadata: grpc.Metadata,
|
|
522
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetPrefundedSpecializedBalanceResponse|null) => void
|
|
523
|
+
): UnaryResponse;
|
|
524
|
+
getPrefundedSpecializedBalance(
|
|
525
|
+
requestMessage: platform_pb.GetPrefundedSpecializedBalanceRequest,
|
|
526
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetPrefundedSpecializedBalanceResponse|null) => void
|
|
527
|
+
): UnaryResponse;
|
|
528
|
+
getPathElements(
|
|
529
|
+
requestMessage: platform_pb.GetPathElementsRequest,
|
|
530
|
+
metadata: grpc.Metadata,
|
|
531
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetPathElementsResponse|null) => void
|
|
532
|
+
): UnaryResponse;
|
|
533
|
+
getPathElements(
|
|
534
|
+
requestMessage: platform_pb.GetPathElementsRequest,
|
|
535
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetPathElementsResponse|null) => void
|
|
536
|
+
): UnaryResponse;
|
|
385
537
|
}
|
|
386
538
|
|