@dashevo/dapi-grpc 0.25.0-dev.1 → 0.25.0-dev.10
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 +39 -0
- package/build.rs +65 -0
- package/clients/core/v0/rust/README.md +3 -0
- package/clients/core/v0/rust/core_example.rs +14 -0
- package/clients/platform/v0/nodejs/platform_pbjs.js +9682 -1470
- package/clients/platform/v0/nodejs/platform_protoc.js +6735 -1259
- package/clients/platform/v0/rust/README.md +3 -0
- package/clients/platform/v0/rust/platform_example.rs +15 -0
- package/clients/platform/v0/web/platform_pb.d.ts +709 -5
- package/clients/platform/v0/web/platform_pb.js +6735 -1259
- package/clients/platform/v0/web/platform_pb_service.d.ts +95 -0
- package/clients/platform/v0/web/platform_pb_service.js +200 -0
- package/package.json +15 -3
- package/protos/platform/v0/platform.proto +151 -7
- package/scripts/build.sh +84 -78
- package/scripts/patch-protobuf-js.sh +10 -9
- package/src/lib.rs +15 -0
|
@@ -22,6 +22,33 @@ type PlatformgetIdentity = {
|
|
|
22
22
|
readonly responseType: typeof platform_pb.GetIdentityResponse;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
type PlatformgetIdentityKeys = {
|
|
26
|
+
readonly methodName: string;
|
|
27
|
+
readonly service: typeof Platform;
|
|
28
|
+
readonly requestStream: false;
|
|
29
|
+
readonly responseStream: false;
|
|
30
|
+
readonly requestType: typeof platform_pb.GetIdentityKeysRequest;
|
|
31
|
+
readonly responseType: typeof platform_pb.GetIdentityKeysResponse;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
type PlatformgetIdentityBalance = {
|
|
35
|
+
readonly methodName: string;
|
|
36
|
+
readonly service: typeof Platform;
|
|
37
|
+
readonly requestStream: false;
|
|
38
|
+
readonly responseStream: false;
|
|
39
|
+
readonly requestType: typeof platform_pb.GetIdentityRequest;
|
|
40
|
+
readonly responseType: typeof platform_pb.GetIdentityBalanceResponse;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type PlatformgetIdentityBalanceAndRevision = {
|
|
44
|
+
readonly methodName: string;
|
|
45
|
+
readonly service: typeof Platform;
|
|
46
|
+
readonly requestStream: false;
|
|
47
|
+
readonly responseStream: false;
|
|
48
|
+
readonly requestType: typeof platform_pb.GetIdentityRequest;
|
|
49
|
+
readonly responseType: typeof platform_pb.GetIdentityBalanceAndRevisionResponse;
|
|
50
|
+
};
|
|
51
|
+
|
|
25
52
|
type PlatformgetDataContract = {
|
|
26
53
|
readonly methodName: string;
|
|
27
54
|
readonly service: typeof Platform;
|
|
@@ -31,6 +58,15 @@ type PlatformgetDataContract = {
|
|
|
31
58
|
readonly responseType: typeof platform_pb.GetDataContractResponse;
|
|
32
59
|
};
|
|
33
60
|
|
|
61
|
+
type PlatformgetDataContracts = {
|
|
62
|
+
readonly methodName: string;
|
|
63
|
+
readonly service: typeof Platform;
|
|
64
|
+
readonly requestStream: false;
|
|
65
|
+
readonly responseStream: false;
|
|
66
|
+
readonly requestType: typeof platform_pb.GetDataContractsRequest;
|
|
67
|
+
readonly responseType: typeof platform_pb.GetDataContractsResponse;
|
|
68
|
+
};
|
|
69
|
+
|
|
34
70
|
type PlatformgetDocuments = {
|
|
35
71
|
readonly methodName: string;
|
|
36
72
|
readonly service: typeof Platform;
|
|
@@ -49,6 +85,15 @@ type PlatformgetIdentitiesByPublicKeyHashes = {
|
|
|
49
85
|
readonly responseType: typeof platform_pb.GetIdentitiesByPublicKeyHashesResponse;
|
|
50
86
|
};
|
|
51
87
|
|
|
88
|
+
type PlatformgetIdentityByPublicKeyHashes = {
|
|
89
|
+
readonly methodName: string;
|
|
90
|
+
readonly service: typeof Platform;
|
|
91
|
+
readonly requestStream: false;
|
|
92
|
+
readonly responseStream: false;
|
|
93
|
+
readonly requestType: typeof platform_pb.GetIdentityByPublicKeyHashesRequest;
|
|
94
|
+
readonly responseType: typeof platform_pb.GetIdentityByPublicKeyHashesResponse;
|
|
95
|
+
};
|
|
96
|
+
|
|
52
97
|
type PlatformwaitForStateTransitionResult = {
|
|
53
98
|
readonly methodName: string;
|
|
54
99
|
readonly service: typeof Platform;
|
|
@@ -71,9 +116,14 @@ export class Platform {
|
|
|
71
116
|
static readonly serviceName: string;
|
|
72
117
|
static readonly broadcastStateTransition: PlatformbroadcastStateTransition;
|
|
73
118
|
static readonly getIdentity: PlatformgetIdentity;
|
|
119
|
+
static readonly getIdentityKeys: PlatformgetIdentityKeys;
|
|
120
|
+
static readonly getIdentityBalance: PlatformgetIdentityBalance;
|
|
121
|
+
static readonly getIdentityBalanceAndRevision: PlatformgetIdentityBalanceAndRevision;
|
|
74
122
|
static readonly getDataContract: PlatformgetDataContract;
|
|
123
|
+
static readonly getDataContracts: PlatformgetDataContracts;
|
|
75
124
|
static readonly getDocuments: PlatformgetDocuments;
|
|
76
125
|
static readonly getIdentitiesByPublicKeyHashes: PlatformgetIdentitiesByPublicKeyHashes;
|
|
126
|
+
static readonly getIdentityByPublicKeyHashes: PlatformgetIdentityByPublicKeyHashes;
|
|
77
127
|
static readonly waitForStateTransitionResult: PlatformwaitForStateTransitionResult;
|
|
78
128
|
static readonly getConsensusParams: PlatformgetConsensusParams;
|
|
79
129
|
}
|
|
@@ -128,6 +178,33 @@ export class PlatformClient {
|
|
|
128
178
|
requestMessage: platform_pb.GetIdentityRequest,
|
|
129
179
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityResponse|null) => void
|
|
130
180
|
): UnaryResponse;
|
|
181
|
+
getIdentityKeys(
|
|
182
|
+
requestMessage: platform_pb.GetIdentityKeysRequest,
|
|
183
|
+
metadata: grpc.Metadata,
|
|
184
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityKeysResponse|null) => void
|
|
185
|
+
): UnaryResponse;
|
|
186
|
+
getIdentityKeys(
|
|
187
|
+
requestMessage: platform_pb.GetIdentityKeysRequest,
|
|
188
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityKeysResponse|null) => void
|
|
189
|
+
): UnaryResponse;
|
|
190
|
+
getIdentityBalance(
|
|
191
|
+
requestMessage: platform_pb.GetIdentityRequest,
|
|
192
|
+
metadata: grpc.Metadata,
|
|
193
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceResponse|null) => void
|
|
194
|
+
): UnaryResponse;
|
|
195
|
+
getIdentityBalance(
|
|
196
|
+
requestMessage: platform_pb.GetIdentityRequest,
|
|
197
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceResponse|null) => void
|
|
198
|
+
): UnaryResponse;
|
|
199
|
+
getIdentityBalanceAndRevision(
|
|
200
|
+
requestMessage: platform_pb.GetIdentityRequest,
|
|
201
|
+
metadata: grpc.Metadata,
|
|
202
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceAndRevisionResponse|null) => void
|
|
203
|
+
): UnaryResponse;
|
|
204
|
+
getIdentityBalanceAndRevision(
|
|
205
|
+
requestMessage: platform_pb.GetIdentityRequest,
|
|
206
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceAndRevisionResponse|null) => void
|
|
207
|
+
): UnaryResponse;
|
|
131
208
|
getDataContract(
|
|
132
209
|
requestMessage: platform_pb.GetDataContractRequest,
|
|
133
210
|
metadata: grpc.Metadata,
|
|
@@ -137,6 +214,15 @@ export class PlatformClient {
|
|
|
137
214
|
requestMessage: platform_pb.GetDataContractRequest,
|
|
138
215
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractResponse|null) => void
|
|
139
216
|
): UnaryResponse;
|
|
217
|
+
getDataContracts(
|
|
218
|
+
requestMessage: platform_pb.GetDataContractsRequest,
|
|
219
|
+
metadata: grpc.Metadata,
|
|
220
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractsResponse|null) => void
|
|
221
|
+
): UnaryResponse;
|
|
222
|
+
getDataContracts(
|
|
223
|
+
requestMessage: platform_pb.GetDataContractsRequest,
|
|
224
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractsResponse|null) => void
|
|
225
|
+
): UnaryResponse;
|
|
140
226
|
getDocuments(
|
|
141
227
|
requestMessage: platform_pb.GetDocumentsRequest,
|
|
142
228
|
metadata: grpc.Metadata,
|
|
@@ -155,6 +241,15 @@ export class PlatformClient {
|
|
|
155
241
|
requestMessage: platform_pb.GetIdentitiesByPublicKeyHashesRequest,
|
|
156
242
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesByPublicKeyHashesResponse|null) => void
|
|
157
243
|
): UnaryResponse;
|
|
244
|
+
getIdentityByPublicKeyHashes(
|
|
245
|
+
requestMessage: platform_pb.GetIdentityByPublicKeyHashesRequest,
|
|
246
|
+
metadata: grpc.Metadata,
|
|
247
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityByPublicKeyHashesResponse|null) => void
|
|
248
|
+
): UnaryResponse;
|
|
249
|
+
getIdentityByPublicKeyHashes(
|
|
250
|
+
requestMessage: platform_pb.GetIdentityByPublicKeyHashesRequest,
|
|
251
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityByPublicKeyHashesResponse|null) => void
|
|
252
|
+
): UnaryResponse;
|
|
158
253
|
waitForStateTransitionResult(
|
|
159
254
|
requestMessage: platform_pb.WaitForStateTransitionResultRequest,
|
|
160
255
|
metadata: grpc.Metadata,
|
|
@@ -28,6 +28,33 @@ Platform.getIdentity = {
|
|
|
28
28
|
responseType: platform_pb.GetIdentityResponse
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
Platform.getIdentityKeys = {
|
|
32
|
+
methodName: "getIdentityKeys",
|
|
33
|
+
service: Platform,
|
|
34
|
+
requestStream: false,
|
|
35
|
+
responseStream: false,
|
|
36
|
+
requestType: platform_pb.GetIdentityKeysRequest,
|
|
37
|
+
responseType: platform_pb.GetIdentityKeysResponse
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
Platform.getIdentityBalance = {
|
|
41
|
+
methodName: "getIdentityBalance",
|
|
42
|
+
service: Platform,
|
|
43
|
+
requestStream: false,
|
|
44
|
+
responseStream: false,
|
|
45
|
+
requestType: platform_pb.GetIdentityRequest,
|
|
46
|
+
responseType: platform_pb.GetIdentityBalanceResponse
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
Platform.getIdentityBalanceAndRevision = {
|
|
50
|
+
methodName: "getIdentityBalanceAndRevision",
|
|
51
|
+
service: Platform,
|
|
52
|
+
requestStream: false,
|
|
53
|
+
responseStream: false,
|
|
54
|
+
requestType: platform_pb.GetIdentityRequest,
|
|
55
|
+
responseType: platform_pb.GetIdentityBalanceAndRevisionResponse
|
|
56
|
+
};
|
|
57
|
+
|
|
31
58
|
Platform.getDataContract = {
|
|
32
59
|
methodName: "getDataContract",
|
|
33
60
|
service: Platform,
|
|
@@ -37,6 +64,15 @@ Platform.getDataContract = {
|
|
|
37
64
|
responseType: platform_pb.GetDataContractResponse
|
|
38
65
|
};
|
|
39
66
|
|
|
67
|
+
Platform.getDataContracts = {
|
|
68
|
+
methodName: "getDataContracts",
|
|
69
|
+
service: Platform,
|
|
70
|
+
requestStream: false,
|
|
71
|
+
responseStream: false,
|
|
72
|
+
requestType: platform_pb.GetDataContractsRequest,
|
|
73
|
+
responseType: platform_pb.GetDataContractsResponse
|
|
74
|
+
};
|
|
75
|
+
|
|
40
76
|
Platform.getDocuments = {
|
|
41
77
|
methodName: "getDocuments",
|
|
42
78
|
service: Platform,
|
|
@@ -55,6 +91,15 @@ Platform.getIdentitiesByPublicKeyHashes = {
|
|
|
55
91
|
responseType: platform_pb.GetIdentitiesByPublicKeyHashesResponse
|
|
56
92
|
};
|
|
57
93
|
|
|
94
|
+
Platform.getIdentityByPublicKeyHashes = {
|
|
95
|
+
methodName: "getIdentityByPublicKeyHashes",
|
|
96
|
+
service: Platform,
|
|
97
|
+
requestStream: false,
|
|
98
|
+
responseStream: false,
|
|
99
|
+
requestType: platform_pb.GetIdentityByPublicKeyHashesRequest,
|
|
100
|
+
responseType: platform_pb.GetIdentityByPublicKeyHashesResponse
|
|
101
|
+
};
|
|
102
|
+
|
|
58
103
|
Platform.waitForStateTransitionResult = {
|
|
59
104
|
methodName: "waitForStateTransitionResult",
|
|
60
105
|
service: Platform,
|
|
@@ -142,6 +187,99 @@ PlatformClient.prototype.getIdentity = function getIdentity(requestMessage, meta
|
|
|
142
187
|
};
|
|
143
188
|
};
|
|
144
189
|
|
|
190
|
+
PlatformClient.prototype.getIdentityKeys = function getIdentityKeys(requestMessage, metadata, callback) {
|
|
191
|
+
if (arguments.length === 2) {
|
|
192
|
+
callback = arguments[1];
|
|
193
|
+
}
|
|
194
|
+
var client = grpc.unary(Platform.getIdentityKeys, {
|
|
195
|
+
request: requestMessage,
|
|
196
|
+
host: this.serviceHost,
|
|
197
|
+
metadata: metadata,
|
|
198
|
+
transport: this.options.transport,
|
|
199
|
+
debug: this.options.debug,
|
|
200
|
+
onEnd: function (response) {
|
|
201
|
+
if (callback) {
|
|
202
|
+
if (response.status !== grpc.Code.OK) {
|
|
203
|
+
var err = new Error(response.statusMessage);
|
|
204
|
+
err.code = response.status;
|
|
205
|
+
err.metadata = response.trailers;
|
|
206
|
+
callback(err, null);
|
|
207
|
+
} else {
|
|
208
|
+
callback(null, response.message);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
return {
|
|
214
|
+
cancel: function () {
|
|
215
|
+
callback = null;
|
|
216
|
+
client.close();
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
PlatformClient.prototype.getIdentityBalance = function getIdentityBalance(requestMessage, metadata, callback) {
|
|
222
|
+
if (arguments.length === 2) {
|
|
223
|
+
callback = arguments[1];
|
|
224
|
+
}
|
|
225
|
+
var client = grpc.unary(Platform.getIdentityBalance, {
|
|
226
|
+
request: requestMessage,
|
|
227
|
+
host: this.serviceHost,
|
|
228
|
+
metadata: metadata,
|
|
229
|
+
transport: this.options.transport,
|
|
230
|
+
debug: this.options.debug,
|
|
231
|
+
onEnd: function (response) {
|
|
232
|
+
if (callback) {
|
|
233
|
+
if (response.status !== grpc.Code.OK) {
|
|
234
|
+
var err = new Error(response.statusMessage);
|
|
235
|
+
err.code = response.status;
|
|
236
|
+
err.metadata = response.trailers;
|
|
237
|
+
callback(err, null);
|
|
238
|
+
} else {
|
|
239
|
+
callback(null, response.message);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
return {
|
|
245
|
+
cancel: function () {
|
|
246
|
+
callback = null;
|
|
247
|
+
client.close();
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
PlatformClient.prototype.getIdentityBalanceAndRevision = function getIdentityBalanceAndRevision(requestMessage, metadata, callback) {
|
|
253
|
+
if (arguments.length === 2) {
|
|
254
|
+
callback = arguments[1];
|
|
255
|
+
}
|
|
256
|
+
var client = grpc.unary(Platform.getIdentityBalanceAndRevision, {
|
|
257
|
+
request: requestMessage,
|
|
258
|
+
host: this.serviceHost,
|
|
259
|
+
metadata: metadata,
|
|
260
|
+
transport: this.options.transport,
|
|
261
|
+
debug: this.options.debug,
|
|
262
|
+
onEnd: function (response) {
|
|
263
|
+
if (callback) {
|
|
264
|
+
if (response.status !== grpc.Code.OK) {
|
|
265
|
+
var err = new Error(response.statusMessage);
|
|
266
|
+
err.code = response.status;
|
|
267
|
+
err.metadata = response.trailers;
|
|
268
|
+
callback(err, null);
|
|
269
|
+
} else {
|
|
270
|
+
callback(null, response.message);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
return {
|
|
276
|
+
cancel: function () {
|
|
277
|
+
callback = null;
|
|
278
|
+
client.close();
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
|
|
145
283
|
PlatformClient.prototype.getDataContract = function getDataContract(requestMessage, metadata, callback) {
|
|
146
284
|
if (arguments.length === 2) {
|
|
147
285
|
callback = arguments[1];
|
|
@@ -173,6 +311,37 @@ PlatformClient.prototype.getDataContract = function getDataContract(requestMessa
|
|
|
173
311
|
};
|
|
174
312
|
};
|
|
175
313
|
|
|
314
|
+
PlatformClient.prototype.getDataContracts = function getDataContracts(requestMessage, metadata, callback) {
|
|
315
|
+
if (arguments.length === 2) {
|
|
316
|
+
callback = arguments[1];
|
|
317
|
+
}
|
|
318
|
+
var client = grpc.unary(Platform.getDataContracts, {
|
|
319
|
+
request: requestMessage,
|
|
320
|
+
host: this.serviceHost,
|
|
321
|
+
metadata: metadata,
|
|
322
|
+
transport: this.options.transport,
|
|
323
|
+
debug: this.options.debug,
|
|
324
|
+
onEnd: function (response) {
|
|
325
|
+
if (callback) {
|
|
326
|
+
if (response.status !== grpc.Code.OK) {
|
|
327
|
+
var err = new Error(response.statusMessage);
|
|
328
|
+
err.code = response.status;
|
|
329
|
+
err.metadata = response.trailers;
|
|
330
|
+
callback(err, null);
|
|
331
|
+
} else {
|
|
332
|
+
callback(null, response.message);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
return {
|
|
338
|
+
cancel: function () {
|
|
339
|
+
callback = null;
|
|
340
|
+
client.close();
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
|
|
176
345
|
PlatformClient.prototype.getDocuments = function getDocuments(requestMessage, metadata, callback) {
|
|
177
346
|
if (arguments.length === 2) {
|
|
178
347
|
callback = arguments[1];
|
|
@@ -235,6 +404,37 @@ PlatformClient.prototype.getIdentitiesByPublicKeyHashes = function getIdentities
|
|
|
235
404
|
};
|
|
236
405
|
};
|
|
237
406
|
|
|
407
|
+
PlatformClient.prototype.getIdentityByPublicKeyHashes = function getIdentityByPublicKeyHashes(requestMessage, metadata, callback) {
|
|
408
|
+
if (arguments.length === 2) {
|
|
409
|
+
callback = arguments[1];
|
|
410
|
+
}
|
|
411
|
+
var client = grpc.unary(Platform.getIdentityByPublicKeyHashes, {
|
|
412
|
+
request: requestMessage,
|
|
413
|
+
host: this.serviceHost,
|
|
414
|
+
metadata: metadata,
|
|
415
|
+
transport: this.options.transport,
|
|
416
|
+
debug: this.options.debug,
|
|
417
|
+
onEnd: function (response) {
|
|
418
|
+
if (callback) {
|
|
419
|
+
if (response.status !== grpc.Code.OK) {
|
|
420
|
+
var err = new Error(response.statusMessage);
|
|
421
|
+
err.code = response.status;
|
|
422
|
+
err.metadata = response.trailers;
|
|
423
|
+
callback(err, null);
|
|
424
|
+
} else {
|
|
425
|
+
callback(null, response.message);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
return {
|
|
431
|
+
cancel: function () {
|
|
432
|
+
callback = null;
|
|
433
|
+
client.close();
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
|
|
238
438
|
PlatformClient.prototype.waitForStateTransitionResult = function waitForStateTransitionResult(requestMessage, metadata, callback) {
|
|
239
439
|
if (arguments.length === 2) {
|
|
240
440
|
callback = arguments[1];
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "0.25.0-dev.
|
|
3
|
+
"version": "0.25.0-dev.10",
|
|
4
4
|
"description": "DAPI GRPC definition file and generated clients",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "node.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "yarn exec scripts/build.sh
|
|
8
|
+
"build": "yarn exec scripts/build.sh",
|
|
9
9
|
"lint": "eslint .",
|
|
10
10
|
"prepublishOnly": "yarn run build",
|
|
11
11
|
"test": "yarn run test:unit",
|
|
@@ -21,6 +21,18 @@
|
|
|
21
21
|
"name": "Anton Suprunchuk",
|
|
22
22
|
"email": "anton.suprunchuk@dash.org",
|
|
23
23
|
"url": "https://github.com/antouhou"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "Samuel Westrich",
|
|
27
|
+
"email": "sam@dash.org"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "Igor Markin",
|
|
31
|
+
"email": "igor.markin@dash.org"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "Łukasz Klimek",
|
|
35
|
+
"email": "lukasz.klimek@dash.org"
|
|
24
36
|
}
|
|
25
37
|
],
|
|
26
38
|
"repository": {
|
|
@@ -33,7 +45,7 @@
|
|
|
33
45
|
},
|
|
34
46
|
"homepage": "https://github.com/dashevo/dapi-grpc#readme",
|
|
35
47
|
"dependencies": {
|
|
36
|
-
"@dashevo/grpc-common": "0.25.0-dev.
|
|
48
|
+
"@dashevo/grpc-common": "0.25.0-dev.10",
|
|
37
49
|
"@dashevo/protobufjs": "6.10.5",
|
|
38
50
|
"@grpc/grpc-js": "^1.3.7",
|
|
39
51
|
"@improbable-eng/grpc-web": "^0.15.0",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
|
+
import "google/protobuf/wrappers.proto";
|
|
3
|
+
import "google/protobuf/struct.proto";
|
|
2
4
|
|
|
3
5
|
package org.dash.platform.dapi.v0;
|
|
4
6
|
|
|
@@ -7,22 +9,29 @@ import "google/protobuf/timestamp.proto";
|
|
|
7
9
|
service Platform {
|
|
8
10
|
rpc broadcastStateTransition (BroadcastStateTransitionRequest) returns (BroadcastStateTransitionResponse);
|
|
9
11
|
rpc getIdentity (GetIdentityRequest) returns (GetIdentityResponse);
|
|
12
|
+
rpc getIdentityKeys (GetIdentityKeysRequest) returns (GetIdentityKeysResponse);
|
|
13
|
+
// rpc getIdentitiesKeys (GetIdentitiesKeysRequest) returns (GetIdentitiesKeysResponse);
|
|
14
|
+
rpc getIdentityBalance(GetIdentityRequest) returns (GetIdentityBalanceResponse);
|
|
15
|
+
rpc getIdentityBalanceAndRevision(GetIdentityRequest)
|
|
16
|
+
returns (GetIdentityBalanceAndRevisionResponse);
|
|
10
17
|
rpc getDataContract (GetDataContractRequest) returns (GetDataContractResponse);
|
|
18
|
+
rpc getDataContracts (GetDataContractsRequest) returns (GetDataContractsResponse);
|
|
11
19
|
rpc getDocuments (GetDocumentsRequest) returns (GetDocumentsResponse);
|
|
12
20
|
rpc getIdentitiesByPublicKeyHashes (GetIdentitiesByPublicKeyHashesRequest) returns (GetIdentitiesByPublicKeyHashesResponse);
|
|
21
|
+
rpc getIdentityByPublicKeyHashes (GetIdentityByPublicKeyHashesRequest) returns (GetIdentityByPublicKeyHashesResponse);
|
|
13
22
|
rpc waitForStateTransitionResult (WaitForStateTransitionResultRequest) returns (WaitForStateTransitionResultResponse);
|
|
14
23
|
rpc getConsensusParams (GetConsensusParamsRequest) returns (GetConsensusParamsResponse);
|
|
15
24
|
}
|
|
16
25
|
|
|
17
26
|
message Proof {
|
|
18
|
-
bytes
|
|
27
|
+
bytes grovedb_proof = 1;
|
|
19
28
|
bytes quorum_hash = 2;
|
|
20
29
|
bytes signature = 3;
|
|
21
30
|
uint32 round = 4;
|
|
22
31
|
}
|
|
23
32
|
|
|
24
33
|
message ResponseMetadata {
|
|
25
|
-
|
|
34
|
+
uint64 height = 1;
|
|
26
35
|
uint32 core_chain_locked_height = 2;
|
|
27
36
|
uint64 time_ms = 3;
|
|
28
37
|
uint32 protocol_version = 4;
|
|
@@ -53,7 +62,104 @@ message GetIdentityResponse {
|
|
|
53
62
|
ResponseMetadata metadata = 3;
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
|
|
65
|
+
message GetIdentityBalanceResponse {
|
|
66
|
+
google.protobuf.UInt64Value balance = 1;
|
|
67
|
+
Proof proof = 2;
|
|
68
|
+
ResponseMetadata metadata = 3;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message GetIdentityBalanceAndRevisionResponse {
|
|
72
|
+
google.protobuf.UInt64Value balance = 1;
|
|
73
|
+
google.protobuf.UInt64Value revision = 2;
|
|
74
|
+
Proof proof = 3;
|
|
75
|
+
ResponseMetadata metadata = 4;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
message KeyRequestType {
|
|
79
|
+
oneof request {
|
|
80
|
+
AllKeys all_keys = 1;
|
|
81
|
+
SpecificKeys specific_keys = 2;
|
|
82
|
+
SearchKey search_key = 3;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message AllKeys {
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message SpecificKeys {
|
|
90
|
+
repeated uint32 key_ids = 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message SearchKey {
|
|
94
|
+
map<uint32, SecurityLevelMap> purpose_map = 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
message SecurityLevelMap {
|
|
98
|
+
enum KeyKindRequestType {
|
|
99
|
+
CURRENT_KEY_OF_KIND_REQUEST = 0;
|
|
100
|
+
ALL_KEYS_OF_KIND_REQUEST = 1;
|
|
101
|
+
}
|
|
102
|
+
map<uint32, KeyKindRequestType> security_level_map = 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message GetIdentityKeysRequest {
|
|
106
|
+
bytes identity_id = 1;
|
|
107
|
+
KeyRequestType request_type = 2;
|
|
108
|
+
google.protobuf.UInt32Value limit = 3;
|
|
109
|
+
google.protobuf.UInt32Value offset = 4;
|
|
110
|
+
bool prove = 5;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
message GetIdentityKeysResponse {
|
|
114
|
+
message Keys {
|
|
115
|
+
repeated bytes keys_bytes = 1;
|
|
116
|
+
}
|
|
117
|
+
oneof result {
|
|
118
|
+
Keys keys = 1;
|
|
119
|
+
Proof proof = 2;
|
|
120
|
+
}
|
|
121
|
+
ResponseMetadata metadata = 3;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
message GetIdentitiesKeysRequest {
|
|
126
|
+
repeated bytes identity_ids = 1;
|
|
127
|
+
KeyRequestType request_type = 2;
|
|
128
|
+
google.protobuf.UInt32Value limit = 3;
|
|
129
|
+
google.protobuf.UInt32Value offset = 4;
|
|
130
|
+
bool prove = 5;
|
|
131
|
+
|
|
132
|
+
message SecurityLevelMap {
|
|
133
|
+
enum KeyKindRequestType {
|
|
134
|
+
CURRENT_KEY_OF_KIND_REQUEST = 0;
|
|
135
|
+
}
|
|
136
|
+
map<uint32, KeyKindRequestType> security_level_map = 1;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
message GetIdentitiesKeysResponse {
|
|
141
|
+
message PublicKey {
|
|
142
|
+
bytes value = 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message PublicKeyEntry {
|
|
146
|
+
bytes key = 1;
|
|
147
|
+
PublicKey value = 2;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
message PublicKeyEntries {
|
|
151
|
+
repeated PublicKeyEntry public_key_entries = 1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
oneof result {
|
|
155
|
+
PublicKeyEntries public_keys = 1;
|
|
156
|
+
Proof proof = 2;
|
|
157
|
+
}
|
|
158
|
+
ResponseMetadata metadata = 3;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
message GetDataContractRequest {
|
|
57
163
|
bytes id = 1;
|
|
58
164
|
bool prove = 2;
|
|
59
165
|
}
|
|
@@ -64,6 +170,31 @@ message GetDataContractResponse {
|
|
|
64
170
|
ResponseMetadata metadata = 3;
|
|
65
171
|
}
|
|
66
172
|
|
|
173
|
+
message GetDataContractsRequest {
|
|
174
|
+
repeated bytes ids = 1;
|
|
175
|
+
bool prove = 2;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
message GetDataContractsResponse {
|
|
179
|
+
message DataContractValue {
|
|
180
|
+
bytes value = 1;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
message DataContractEntry {
|
|
184
|
+
bytes key = 1;
|
|
185
|
+
DataContractValue value = 2;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
message DataContracts {
|
|
189
|
+
repeated DataContractEntry data_contract_entries = 1;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
oneof result {
|
|
193
|
+
DataContracts data_contracts = 1;
|
|
194
|
+
Proof proof = 2;
|
|
195
|
+
}
|
|
196
|
+
ResponseMetadata metadata = 3;
|
|
197
|
+
}
|
|
67
198
|
message GetDocumentsRequest {
|
|
68
199
|
bytes data_contract_id = 1;
|
|
69
200
|
string document_type = 2;
|
|
@@ -73,10 +204,10 @@ message GetDocumentsRequest {
|
|
|
73
204
|
|
|
74
205
|
uint32 limit = 5;
|
|
75
206
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
207
|
+
oneof start {
|
|
208
|
+
bytes start_after = 6;
|
|
209
|
+
bytes start_at = 7;
|
|
210
|
+
}
|
|
80
211
|
|
|
81
212
|
bool prove = 8;
|
|
82
213
|
}
|
|
@@ -98,6 +229,19 @@ message GetIdentitiesByPublicKeyHashesResponse {
|
|
|
98
229
|
ResponseMetadata metadata = 3;
|
|
99
230
|
}
|
|
100
231
|
|
|
232
|
+
message GetIdentityByPublicKeyHashesRequest {
|
|
233
|
+
bytes public_key_hash = 1;
|
|
234
|
+
bool prove = 2;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
message GetIdentityByPublicKeyHashesResponse {
|
|
238
|
+
oneof result {
|
|
239
|
+
bytes identity = 1;
|
|
240
|
+
Proof proof = 2;
|
|
241
|
+
}
|
|
242
|
+
ResponseMetadata metadata = 3;
|
|
243
|
+
}
|
|
244
|
+
|
|
101
245
|
message WaitForStateTransitionResultRequest {
|
|
102
246
|
bytes state_transition_hash = 1;
|
|
103
247
|
bool prove = 2;
|