@dashevo/dapi-grpc 1.0.0-dev.10 → 1.0.0-dev.12
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 +14 -8
- package/build.rs +6 -2
- package/clients/core/v0/nodejs/CorePromiseClient.js +51 -13
- package/clients/core/v0/nodejs/core_pbjs.js +869 -703
- package/clients/core/v0/nodejs/core_protoc.js +681 -609
- package/clients/core/v0/web/CorePromiseClient.js +19 -5
- package/clients/core/v0/web/core_pb.d.ts +99 -89
- package/clients/core/v0/web/core_pb.js +681 -609
- package/clients/core/v0/web/core_pb_service.d.ts +29 -10
- package/clients/core/v0/web/core_pb_service.js +46 -6
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +55 -14
- package/clients/platform/v0/nodejs/platform_pbjs.js +7805 -7761
- package/clients/platform/v0/nodejs/platform_protoc.js +7845 -7749
- package/clients/platform/v0/web/PlatformPromiseClient.js +22 -8
- package/clients/platform/v0/web/platform_pb.d.ts +388 -372
- package/clients/platform/v0/web/platform_pb.js +7845 -7749
- package/clients/platform/v0/web/platform_pb_service.d.ts +35 -35
- package/clients/platform/v0/web/platform_pb_service.js +35 -35
- package/package.json +2 -2
- package/protos/core/v0/core.proto +27 -23
- package/protos/platform/v0/platform.proto +81 -64
- package/src/core/proto/org.dash.platform.dapi.v0.rs +196 -101
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +381 -353
- package/test/unit/clients/core/v0/nodejs/CorePromiseClient.spec.js +27 -6
- package/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js +21 -0
- package/test/unit/getCoreDefinition.spec.js +5 -2
|
@@ -22,22 +22,22 @@ 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
41
|
};
|
|
42
42
|
|
|
43
43
|
type PlatformgetIdentityNonce = {
|
|
@@ -121,15 +121,6 @@ type PlatformgetDocuments = {
|
|
|
121
121
|
readonly responseType: typeof platform_pb.GetDocumentsResponse;
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
type PlatformgetIdentitiesByPublicKeyHashes = {
|
|
125
|
-
readonly methodName: string;
|
|
126
|
-
readonly service: typeof Platform;
|
|
127
|
-
readonly requestStream: false;
|
|
128
|
-
readonly responseStream: false;
|
|
129
|
-
readonly requestType: typeof platform_pb.GetIdentitiesByPublicKeyHashesRequest;
|
|
130
|
-
readonly responseType: typeof platform_pb.GetIdentitiesByPublicKeyHashesResponse;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
124
|
type PlatformgetIdentityByPublicKeyHash = {
|
|
134
125
|
readonly methodName: string;
|
|
135
126
|
readonly service: typeof Platform;
|
|
@@ -184,12 +175,21 @@ type PlatformgetEpochsInfo = {
|
|
|
184
175
|
readonly responseType: typeof platform_pb.GetEpochsInfoResponse;
|
|
185
176
|
};
|
|
186
177
|
|
|
178
|
+
type PlatformgetPathElements = {
|
|
179
|
+
readonly methodName: string;
|
|
180
|
+
readonly service: typeof Platform;
|
|
181
|
+
readonly requestStream: false;
|
|
182
|
+
readonly responseStream: false;
|
|
183
|
+
readonly requestType: typeof platform_pb.GetPathElementsRequest;
|
|
184
|
+
readonly responseType: typeof platform_pb.GetPathElementsResponse;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
187
|
export class Platform {
|
|
188
188
|
static readonly serviceName: string;
|
|
189
189
|
static readonly broadcastStateTransition: PlatformbroadcastStateTransition;
|
|
190
190
|
static readonly getIdentity: PlatformgetIdentity;
|
|
191
|
-
static readonly getIdentities: PlatformgetIdentities;
|
|
192
191
|
static readonly getIdentityKeys: PlatformgetIdentityKeys;
|
|
192
|
+
static readonly getIdentitiesContractKeys: PlatformgetIdentitiesContractKeys;
|
|
193
193
|
static readonly getIdentityNonce: PlatformgetIdentityNonce;
|
|
194
194
|
static readonly getIdentityContractNonce: PlatformgetIdentityContractNonce;
|
|
195
195
|
static readonly getIdentityBalance: PlatformgetIdentityBalance;
|
|
@@ -199,13 +199,13 @@ export class Platform {
|
|
|
199
199
|
static readonly getDataContractHistory: PlatformgetDataContractHistory;
|
|
200
200
|
static readonly getDataContracts: PlatformgetDataContracts;
|
|
201
201
|
static readonly getDocuments: PlatformgetDocuments;
|
|
202
|
-
static readonly getIdentitiesByPublicKeyHashes: PlatformgetIdentitiesByPublicKeyHashes;
|
|
203
202
|
static readonly getIdentityByPublicKeyHash: PlatformgetIdentityByPublicKeyHash;
|
|
204
203
|
static readonly waitForStateTransitionResult: PlatformwaitForStateTransitionResult;
|
|
205
204
|
static readonly getConsensusParams: PlatformgetConsensusParams;
|
|
206
205
|
static readonly getProtocolVersionUpgradeState: PlatformgetProtocolVersionUpgradeState;
|
|
207
206
|
static readonly getProtocolVersionUpgradeVoteStatus: PlatformgetProtocolVersionUpgradeVoteStatus;
|
|
208
207
|
static readonly getEpochsInfo: PlatformgetEpochsInfo;
|
|
208
|
+
static readonly getPathElements: PlatformgetPathElements;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
|
|
@@ -258,15 +258,6 @@ export class PlatformClient {
|
|
|
258
258
|
requestMessage: platform_pb.GetIdentityRequest,
|
|
259
259
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityResponse|null) => void
|
|
260
260
|
): UnaryResponse;
|
|
261
|
-
getIdentities(
|
|
262
|
-
requestMessage: platform_pb.GetIdentitiesRequest,
|
|
263
|
-
metadata: grpc.Metadata,
|
|
264
|
-
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesResponse|null) => void
|
|
265
|
-
): UnaryResponse;
|
|
266
|
-
getIdentities(
|
|
267
|
-
requestMessage: platform_pb.GetIdentitiesRequest,
|
|
268
|
-
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesResponse|null) => void
|
|
269
|
-
): UnaryResponse;
|
|
270
261
|
getIdentityKeys(
|
|
271
262
|
requestMessage: platform_pb.GetIdentityKeysRequest,
|
|
272
263
|
metadata: grpc.Metadata,
|
|
@@ -276,6 +267,15 @@ export class PlatformClient {
|
|
|
276
267
|
requestMessage: platform_pb.GetIdentityKeysRequest,
|
|
277
268
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityKeysResponse|null) => void
|
|
278
269
|
): UnaryResponse;
|
|
270
|
+
getIdentitiesContractKeys(
|
|
271
|
+
requestMessage: platform_pb.GetIdentitiesContractKeysRequest,
|
|
272
|
+
metadata: grpc.Metadata,
|
|
273
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesContractKeysResponse|null) => void
|
|
274
|
+
): UnaryResponse;
|
|
275
|
+
getIdentitiesContractKeys(
|
|
276
|
+
requestMessage: platform_pb.GetIdentitiesContractKeysRequest,
|
|
277
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesContractKeysResponse|null) => void
|
|
278
|
+
): UnaryResponse;
|
|
279
279
|
getIdentityNonce(
|
|
280
280
|
requestMessage: platform_pb.GetIdentityNonceRequest,
|
|
281
281
|
metadata: grpc.Metadata,
|
|
@@ -357,15 +357,6 @@ export class PlatformClient {
|
|
|
357
357
|
requestMessage: platform_pb.GetDocumentsRequest,
|
|
358
358
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetDocumentsResponse|null) => void
|
|
359
359
|
): UnaryResponse;
|
|
360
|
-
getIdentitiesByPublicKeyHashes(
|
|
361
|
-
requestMessage: platform_pb.GetIdentitiesByPublicKeyHashesRequest,
|
|
362
|
-
metadata: grpc.Metadata,
|
|
363
|
-
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesByPublicKeyHashesResponse|null) => void
|
|
364
|
-
): UnaryResponse;
|
|
365
|
-
getIdentitiesByPublicKeyHashes(
|
|
366
|
-
requestMessage: platform_pb.GetIdentitiesByPublicKeyHashesRequest,
|
|
367
|
-
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesByPublicKeyHashesResponse|null) => void
|
|
368
|
-
): UnaryResponse;
|
|
369
360
|
getIdentityByPublicKeyHash(
|
|
370
361
|
requestMessage: platform_pb.GetIdentityByPublicKeyHashRequest,
|
|
371
362
|
metadata: grpc.Metadata,
|
|
@@ -420,5 +411,14 @@ export class PlatformClient {
|
|
|
420
411
|
requestMessage: platform_pb.GetEpochsInfoRequest,
|
|
421
412
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetEpochsInfoResponse|null) => void
|
|
422
413
|
): UnaryResponse;
|
|
414
|
+
getPathElements(
|
|
415
|
+
requestMessage: platform_pb.GetPathElementsRequest,
|
|
416
|
+
metadata: grpc.Metadata,
|
|
417
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetPathElementsResponse|null) => void
|
|
418
|
+
): UnaryResponse;
|
|
419
|
+
getPathElements(
|
|
420
|
+
requestMessage: platform_pb.GetPathElementsRequest,
|
|
421
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetPathElementsResponse|null) => void
|
|
422
|
+
): UnaryResponse;
|
|
423
423
|
}
|
|
424
424
|
|
|
@@ -28,22 +28,22 @@ Platform.getIdentity = {
|
|
|
28
28
|
responseType: platform_pb.GetIdentityResponse
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
Platform.
|
|
32
|
-
methodName: "
|
|
31
|
+
Platform.getIdentityKeys = {
|
|
32
|
+
methodName: "getIdentityKeys",
|
|
33
33
|
service: Platform,
|
|
34
34
|
requestStream: false,
|
|
35
35
|
responseStream: false,
|
|
36
|
-
requestType: platform_pb.
|
|
37
|
-
responseType: platform_pb.
|
|
36
|
+
requestType: platform_pb.GetIdentityKeysRequest,
|
|
37
|
+
responseType: platform_pb.GetIdentityKeysResponse
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
Platform.
|
|
41
|
-
methodName: "
|
|
40
|
+
Platform.getIdentitiesContractKeys = {
|
|
41
|
+
methodName: "getIdentitiesContractKeys",
|
|
42
42
|
service: Platform,
|
|
43
43
|
requestStream: false,
|
|
44
44
|
responseStream: false,
|
|
45
|
-
requestType: platform_pb.
|
|
46
|
-
responseType: platform_pb.
|
|
45
|
+
requestType: platform_pb.GetIdentitiesContractKeysRequest,
|
|
46
|
+
responseType: platform_pb.GetIdentitiesContractKeysResponse
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
Platform.getIdentityNonce = {
|
|
@@ -127,15 +127,6 @@ Platform.getDocuments = {
|
|
|
127
127
|
responseType: platform_pb.GetDocumentsResponse
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
Platform.getIdentitiesByPublicKeyHashes = {
|
|
131
|
-
methodName: "getIdentitiesByPublicKeyHashes",
|
|
132
|
-
service: Platform,
|
|
133
|
-
requestStream: false,
|
|
134
|
-
responseStream: false,
|
|
135
|
-
requestType: platform_pb.GetIdentitiesByPublicKeyHashesRequest,
|
|
136
|
-
responseType: platform_pb.GetIdentitiesByPublicKeyHashesResponse
|
|
137
|
-
};
|
|
138
|
-
|
|
139
130
|
Platform.getIdentityByPublicKeyHash = {
|
|
140
131
|
methodName: "getIdentityByPublicKeyHash",
|
|
141
132
|
service: Platform,
|
|
@@ -190,6 +181,15 @@ Platform.getEpochsInfo = {
|
|
|
190
181
|
responseType: platform_pb.GetEpochsInfoResponse
|
|
191
182
|
};
|
|
192
183
|
|
|
184
|
+
Platform.getPathElements = {
|
|
185
|
+
methodName: "getPathElements",
|
|
186
|
+
service: Platform,
|
|
187
|
+
requestStream: false,
|
|
188
|
+
responseStream: false,
|
|
189
|
+
requestType: platform_pb.GetPathElementsRequest,
|
|
190
|
+
responseType: platform_pb.GetPathElementsResponse
|
|
191
|
+
};
|
|
192
|
+
|
|
193
193
|
exports.Platform = Platform;
|
|
194
194
|
|
|
195
195
|
function PlatformClient(serviceHost, options) {
|
|
@@ -259,11 +259,11 @@ PlatformClient.prototype.getIdentity = function getIdentity(requestMessage, meta
|
|
|
259
259
|
};
|
|
260
260
|
};
|
|
261
261
|
|
|
262
|
-
PlatformClient.prototype.
|
|
262
|
+
PlatformClient.prototype.getIdentityKeys = function getIdentityKeys(requestMessage, metadata, callback) {
|
|
263
263
|
if (arguments.length === 2) {
|
|
264
264
|
callback = arguments[1];
|
|
265
265
|
}
|
|
266
|
-
var client = grpc.unary(Platform.
|
|
266
|
+
var client = grpc.unary(Platform.getIdentityKeys, {
|
|
267
267
|
request: requestMessage,
|
|
268
268
|
host: this.serviceHost,
|
|
269
269
|
metadata: metadata,
|
|
@@ -290,11 +290,11 @@ PlatformClient.prototype.getIdentities = function getIdentities(requestMessage,
|
|
|
290
290
|
};
|
|
291
291
|
};
|
|
292
292
|
|
|
293
|
-
PlatformClient.prototype.
|
|
293
|
+
PlatformClient.prototype.getIdentitiesContractKeys = function getIdentitiesContractKeys(requestMessage, metadata, callback) {
|
|
294
294
|
if (arguments.length === 2) {
|
|
295
295
|
callback = arguments[1];
|
|
296
296
|
}
|
|
297
|
-
var client = grpc.unary(Platform.
|
|
297
|
+
var client = grpc.unary(Platform.getIdentitiesContractKeys, {
|
|
298
298
|
request: requestMessage,
|
|
299
299
|
host: this.serviceHost,
|
|
300
300
|
metadata: metadata,
|
|
@@ -600,11 +600,11 @@ PlatformClient.prototype.getDocuments = function getDocuments(requestMessage, me
|
|
|
600
600
|
};
|
|
601
601
|
};
|
|
602
602
|
|
|
603
|
-
PlatformClient.prototype.
|
|
603
|
+
PlatformClient.prototype.getIdentityByPublicKeyHash = function getIdentityByPublicKeyHash(requestMessage, metadata, callback) {
|
|
604
604
|
if (arguments.length === 2) {
|
|
605
605
|
callback = arguments[1];
|
|
606
606
|
}
|
|
607
|
-
var client = grpc.unary(Platform.
|
|
607
|
+
var client = grpc.unary(Platform.getIdentityByPublicKeyHash, {
|
|
608
608
|
request: requestMessage,
|
|
609
609
|
host: this.serviceHost,
|
|
610
610
|
metadata: metadata,
|
|
@@ -631,11 +631,11 @@ PlatformClient.prototype.getIdentitiesByPublicKeyHashes = function getIdentities
|
|
|
631
631
|
};
|
|
632
632
|
};
|
|
633
633
|
|
|
634
|
-
PlatformClient.prototype.
|
|
634
|
+
PlatformClient.prototype.waitForStateTransitionResult = function waitForStateTransitionResult(requestMessage, metadata, callback) {
|
|
635
635
|
if (arguments.length === 2) {
|
|
636
636
|
callback = arguments[1];
|
|
637
637
|
}
|
|
638
|
-
var client = grpc.unary(Platform.
|
|
638
|
+
var client = grpc.unary(Platform.waitForStateTransitionResult, {
|
|
639
639
|
request: requestMessage,
|
|
640
640
|
host: this.serviceHost,
|
|
641
641
|
metadata: metadata,
|
|
@@ -662,11 +662,11 @@ PlatformClient.prototype.getIdentityByPublicKeyHash = function getIdentityByPubl
|
|
|
662
662
|
};
|
|
663
663
|
};
|
|
664
664
|
|
|
665
|
-
PlatformClient.prototype.
|
|
665
|
+
PlatformClient.prototype.getConsensusParams = function getConsensusParams(requestMessage, metadata, callback) {
|
|
666
666
|
if (arguments.length === 2) {
|
|
667
667
|
callback = arguments[1];
|
|
668
668
|
}
|
|
669
|
-
var client = grpc.unary(Platform.
|
|
669
|
+
var client = grpc.unary(Platform.getConsensusParams, {
|
|
670
670
|
request: requestMessage,
|
|
671
671
|
host: this.serviceHost,
|
|
672
672
|
metadata: metadata,
|
|
@@ -693,11 +693,11 @@ PlatformClient.prototype.waitForStateTransitionResult = function waitForStateTra
|
|
|
693
693
|
};
|
|
694
694
|
};
|
|
695
695
|
|
|
696
|
-
PlatformClient.prototype.
|
|
696
|
+
PlatformClient.prototype.getProtocolVersionUpgradeState = function getProtocolVersionUpgradeState(requestMessage, metadata, callback) {
|
|
697
697
|
if (arguments.length === 2) {
|
|
698
698
|
callback = arguments[1];
|
|
699
699
|
}
|
|
700
|
-
var client = grpc.unary(Platform.
|
|
700
|
+
var client = grpc.unary(Platform.getProtocolVersionUpgradeState, {
|
|
701
701
|
request: requestMessage,
|
|
702
702
|
host: this.serviceHost,
|
|
703
703
|
metadata: metadata,
|
|
@@ -724,11 +724,11 @@ PlatformClient.prototype.getConsensusParams = function getConsensusParams(reques
|
|
|
724
724
|
};
|
|
725
725
|
};
|
|
726
726
|
|
|
727
|
-
PlatformClient.prototype.
|
|
727
|
+
PlatformClient.prototype.getProtocolVersionUpgradeVoteStatus = function getProtocolVersionUpgradeVoteStatus(requestMessage, metadata, callback) {
|
|
728
728
|
if (arguments.length === 2) {
|
|
729
729
|
callback = arguments[1];
|
|
730
730
|
}
|
|
731
|
-
var client = grpc.unary(Platform.
|
|
731
|
+
var client = grpc.unary(Platform.getProtocolVersionUpgradeVoteStatus, {
|
|
732
732
|
request: requestMessage,
|
|
733
733
|
host: this.serviceHost,
|
|
734
734
|
metadata: metadata,
|
|
@@ -755,11 +755,11 @@ PlatformClient.prototype.getProtocolVersionUpgradeState = function getProtocolVe
|
|
|
755
755
|
};
|
|
756
756
|
};
|
|
757
757
|
|
|
758
|
-
PlatformClient.prototype.
|
|
758
|
+
PlatformClient.prototype.getEpochsInfo = function getEpochsInfo(requestMessage, metadata, callback) {
|
|
759
759
|
if (arguments.length === 2) {
|
|
760
760
|
callback = arguments[1];
|
|
761
761
|
}
|
|
762
|
-
var client = grpc.unary(Platform.
|
|
762
|
+
var client = grpc.unary(Platform.getEpochsInfo, {
|
|
763
763
|
request: requestMessage,
|
|
764
764
|
host: this.serviceHost,
|
|
765
765
|
metadata: metadata,
|
|
@@ -786,11 +786,11 @@ PlatformClient.prototype.getProtocolVersionUpgradeVoteStatus = function getProto
|
|
|
786
786
|
};
|
|
787
787
|
};
|
|
788
788
|
|
|
789
|
-
PlatformClient.prototype.
|
|
789
|
+
PlatformClient.prototype.getPathElements = function getPathElements(requestMessage, metadata, callback) {
|
|
790
790
|
if (arguments.length === 2) {
|
|
791
791
|
callback = arguments[1];
|
|
792
792
|
}
|
|
793
|
-
var client = grpc.unary(Platform.
|
|
793
|
+
var client = grpc.unary(Platform.getPathElements, {
|
|
794
794
|
request: requestMessage,
|
|
795
795
|
host: this.serviceHost,
|
|
796
796
|
metadata: metadata,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.12",
|
|
4
4
|
"description": "DAPI GRPC definition file and generated clients",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "node.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/dashevo/dapi-grpc#readme",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@dashevo/grpc-common": "1.0.0-dev.
|
|
48
|
+
"@dashevo/grpc-common": "1.0.0-dev.12",
|
|
49
49
|
"@dashevo/protobufjs": "6.10.5",
|
|
50
50
|
"@grpc/grpc-js": "1.4.4",
|
|
51
51
|
"@improbable-eng/grpc-web": "^0.15.0",
|
|
@@ -3,7 +3,8 @@ syntax = "proto3";
|
|
|
3
3
|
package org.dash.platform.dapi.v0;
|
|
4
4
|
|
|
5
5
|
service Core {
|
|
6
|
-
rpc
|
|
6
|
+
rpc getBlockchainStatus (GetBlockchainStatusRequest) returns (GetBlockchainStatusResponse);
|
|
7
|
+
rpc getMasternodeStatus (GetMasternodeStatusRequest) returns (GetMasternodeStatusResponse);
|
|
7
8
|
rpc getBlock (GetBlockRequest) returns (GetBlockResponse);
|
|
8
9
|
rpc broadcastTransaction (BroadcastTransactionRequest) returns (BroadcastTransactionResponse);
|
|
9
10
|
rpc getTransaction (GetTransactionRequest) returns (GetTransactionResponse);
|
|
@@ -12,11 +13,11 @@ service Core {
|
|
|
12
13
|
rpc subscribeToTransactionsWithProofs (TransactionsWithProofsRequest) returns (stream TransactionsWithProofsResponse);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
message
|
|
16
|
+
message GetBlockchainStatusRequest {
|
|
16
17
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
message
|
|
20
|
+
message GetBlockchainStatusResponse {
|
|
20
21
|
message Version {
|
|
21
22
|
uint32 protocol = 1;
|
|
22
23
|
uint32 software = 2;
|
|
@@ -47,25 +48,6 @@ message GetStatusResponse {
|
|
|
47
48
|
double sync_progress = 8;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
message Masternode {
|
|
51
|
-
enum Status {
|
|
52
|
-
UNKNOWN = 0;
|
|
53
|
-
WAITING_FOR_PROTX = 1;
|
|
54
|
-
POSE_BANNED = 2;
|
|
55
|
-
REMOVED = 3;
|
|
56
|
-
OPERATOR_KEY_CHANGED = 4;
|
|
57
|
-
PROTX_IP_CHANGED = 5;
|
|
58
|
-
READY = 6;
|
|
59
|
-
ERROR = 7;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
Status status = 1;
|
|
63
|
-
bytes pro_tx_hash = 2;
|
|
64
|
-
uint32 pose_penalty = 3;
|
|
65
|
-
bool is_synced = 4;
|
|
66
|
-
double sync_progress = 5;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
51
|
message NetworkFee {
|
|
70
52
|
double relay = 1;
|
|
71
53
|
double incremental = 2;
|
|
@@ -81,10 +63,32 @@ message GetStatusResponse {
|
|
|
81
63
|
Status status = 3;
|
|
82
64
|
double sync_progress = 4;
|
|
83
65
|
Chain chain = 5;
|
|
84
|
-
Masternode masternode = 6;
|
|
85
66
|
Network network = 7;
|
|
86
67
|
}
|
|
87
68
|
|
|
69
|
+
message GetMasternodeStatusRequest {
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message GetMasternodeStatusResponse {
|
|
74
|
+
enum Status {
|
|
75
|
+
UNKNOWN = 0;
|
|
76
|
+
WAITING_FOR_PROTX = 1;
|
|
77
|
+
POSE_BANNED = 2;
|
|
78
|
+
REMOVED = 3;
|
|
79
|
+
OPERATOR_KEY_CHANGED = 4;
|
|
80
|
+
PROTX_IP_CHANGED = 5;
|
|
81
|
+
READY = 6;
|
|
82
|
+
ERROR = 7;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
Status status = 1;
|
|
86
|
+
bytes pro_tx_hash = 2;
|
|
87
|
+
uint32 pose_penalty = 3;
|
|
88
|
+
bool is_synced = 4;
|
|
89
|
+
double sync_progress = 5;
|
|
90
|
+
}
|
|
91
|
+
|
|
88
92
|
message GetBlockRequest {
|
|
89
93
|
oneof block {
|
|
90
94
|
uint32 height = 1;
|
|
@@ -10,8 +10,8 @@ service Platform {
|
|
|
10
10
|
rpc broadcastStateTransition(BroadcastStateTransitionRequest)
|
|
11
11
|
returns (BroadcastStateTransitionResponse);
|
|
12
12
|
rpc getIdentity(GetIdentityRequest) returns (GetIdentityResponse);
|
|
13
|
-
rpc getIdentities(GetIdentitiesRequest) returns (GetIdentitiesResponse);
|
|
14
13
|
rpc getIdentityKeys(GetIdentityKeysRequest) returns (GetIdentityKeysResponse);
|
|
14
|
+
rpc getIdentitiesContractKeys(GetIdentitiesContractKeysRequest) returns (GetIdentitiesContractKeysResponse);
|
|
15
15
|
rpc getIdentityNonce(GetIdentityNonceRequest) returns (GetIdentityNonceResponse);
|
|
16
16
|
rpc getIdentityContractNonce(GetIdentityContractNonceRequest) returns (GetIdentityContractNonceResponse);
|
|
17
17
|
rpc getIdentityBalance(GetIdentityBalanceRequest)
|
|
@@ -25,8 +25,6 @@ service Platform {
|
|
|
25
25
|
rpc getDataContracts(GetDataContractsRequest)
|
|
26
26
|
returns (GetDataContractsResponse);
|
|
27
27
|
rpc getDocuments(GetDocumentsRequest) returns (GetDocumentsResponse);
|
|
28
|
-
rpc getIdentitiesByPublicKeyHashes(GetIdentitiesByPublicKeyHashesRequest)
|
|
29
|
-
returns (GetIdentitiesByPublicKeyHashesResponse);
|
|
30
28
|
rpc getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest)
|
|
31
29
|
returns (GetIdentityByPublicKeyHashResponse);
|
|
32
30
|
rpc waitForStateTransitionResult(WaitForStateTransitionResultRequest)
|
|
@@ -36,6 +34,7 @@ service Platform {
|
|
|
36
34
|
rpc getProtocolVersionUpgradeState(GetProtocolVersionUpgradeStateRequest) returns (GetProtocolVersionUpgradeStateResponse);
|
|
37
35
|
rpc getProtocolVersionUpgradeVoteStatus(GetProtocolVersionUpgradeVoteStatusRequest) returns (GetProtocolVersionUpgradeVoteStatusResponse);
|
|
38
36
|
rpc getEpochsInfo(GetEpochsInfoRequest) returns (GetEpochsInfoResponse);
|
|
37
|
+
rpc getPathElements(GetPathElementsRequest) returns (GetPathElementsResponse);
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
message Proof {
|
|
@@ -62,6 +61,14 @@ message StateTransitionBroadcastError {
|
|
|
62
61
|
bytes data = 3;
|
|
63
62
|
}
|
|
64
63
|
|
|
64
|
+
enum KeyPurpose {
|
|
65
|
+
AUTHENTICATION = 0;
|
|
66
|
+
ENCRYPTION = 1;
|
|
67
|
+
DECRYPTION = 2;
|
|
68
|
+
TRANSFER = 3;
|
|
69
|
+
VOTING = 5;
|
|
70
|
+
}
|
|
71
|
+
|
|
65
72
|
message BroadcastStateTransitionRequest { bytes state_transition = 1; }
|
|
66
73
|
|
|
67
74
|
message BroadcastStateTransitionResponse {}
|
|
@@ -131,38 +138,6 @@ message GetIdentityResponse {
|
|
|
131
138
|
oneof version { GetIdentityResponseV0 v0 = 1; }
|
|
132
139
|
}
|
|
133
140
|
|
|
134
|
-
message GetIdentitiesRequest {
|
|
135
|
-
|
|
136
|
-
message GetIdentitiesRequestV0 {
|
|
137
|
-
repeated bytes ids = 1;
|
|
138
|
-
bool prove = 2;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
oneof version { GetIdentitiesRequestV0 v0 = 1; }
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
message GetIdentitiesResponse {
|
|
145
|
-
|
|
146
|
-
message IdentityValue { bytes value = 1; }
|
|
147
|
-
|
|
148
|
-
message IdentityEntry {
|
|
149
|
-
bytes key = 1;
|
|
150
|
-
IdentityValue value = 2;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
message Identities { repeated IdentityEntry identity_entries = 1; }
|
|
154
|
-
|
|
155
|
-
message GetIdentitiesResponseV0 {
|
|
156
|
-
oneof result {
|
|
157
|
-
Identities identities = 1;
|
|
158
|
-
Proof proof = 2;
|
|
159
|
-
}
|
|
160
|
-
ResponseMetadata metadata = 3;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
oneof version { GetIdentitiesResponseV0 v0 = 1; }
|
|
164
|
-
}
|
|
165
|
-
|
|
166
141
|
message GetIdentityNonceResponse {
|
|
167
142
|
|
|
168
143
|
message GetIdentityNonceResponseV0 {
|
|
@@ -270,6 +245,46 @@ message GetIdentityKeysResponse {
|
|
|
270
245
|
oneof version { GetIdentityKeysResponseV0 v0 = 1; }
|
|
271
246
|
}
|
|
272
247
|
|
|
248
|
+
message GetIdentitiesContractKeysRequest {
|
|
249
|
+
message GetIdentitiesContractKeysRequestV0 {
|
|
250
|
+
repeated bytes identities_ids = 1;
|
|
251
|
+
bytes contract_id = 2;
|
|
252
|
+
optional string document_type_name = 3;
|
|
253
|
+
repeated KeyPurpose purposes = 4;
|
|
254
|
+
bool prove = 5;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
oneof version {
|
|
258
|
+
GetIdentitiesContractKeysRequestV0 v0 = 1;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
message GetIdentitiesContractKeysResponse {
|
|
263
|
+
message GetIdentitiesContractKeysResponseV0 {
|
|
264
|
+
message PurposeKeys {
|
|
265
|
+
KeyPurpose purpose = 1;
|
|
266
|
+
repeated bytes keys_bytes = 2;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
message IdentityKeys {
|
|
270
|
+
bytes identity_id = 1;
|
|
271
|
+
repeated PurposeKeys keys = 2;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
message IdentitiesKeys {
|
|
275
|
+
repeated IdentityKeys entries = 1;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
oneof result {
|
|
279
|
+
IdentitiesKeys identities_keys = 1;
|
|
280
|
+
Proof proof = 2;
|
|
281
|
+
}
|
|
282
|
+
ResponseMetadata metadata = 3;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
oneof version { GetIdentitiesContractKeysResponseV0 v0 = 1; }
|
|
286
|
+
}
|
|
287
|
+
|
|
273
288
|
message GetProofsRequest {
|
|
274
289
|
message GetProofsRequestV0 {
|
|
275
290
|
message DocumentRequest {
|
|
@@ -416,35 +431,6 @@ message GetDocumentsResponse {
|
|
|
416
431
|
oneof version { GetDocumentsResponseV0 v0 = 1; }
|
|
417
432
|
}
|
|
418
433
|
|
|
419
|
-
message GetIdentitiesByPublicKeyHashesRequest {
|
|
420
|
-
message GetIdentitiesByPublicKeyHashesRequestV0 {
|
|
421
|
-
repeated bytes public_key_hashes = 1;
|
|
422
|
-
bool prove = 2;
|
|
423
|
-
}
|
|
424
|
-
oneof version { GetIdentitiesByPublicKeyHashesRequestV0 v0 = 1; }
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
message GetIdentitiesByPublicKeyHashesResponse {
|
|
428
|
-
message PublicKeyHashIdentityEntry {
|
|
429
|
-
bytes public_key_hash = 1;
|
|
430
|
-
google.protobuf.BytesValue value = 2;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
message IdentitiesByPublicKeyHashes {
|
|
434
|
-
repeated PublicKeyHashIdentityEntry identity_entries = 1;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
message GetIdentitiesByPublicKeyHashesResponseV0 {
|
|
438
|
-
oneof result {
|
|
439
|
-
IdentitiesByPublicKeyHashes identities = 1;
|
|
440
|
-
Proof proof = 2;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
ResponseMetadata metadata = 3;
|
|
444
|
-
}
|
|
445
|
-
oneof version { GetIdentitiesByPublicKeyHashesResponseV0 v0 = 1; }
|
|
446
|
-
}
|
|
447
|
-
|
|
448
434
|
message GetIdentityByPublicKeyHashRequest {
|
|
449
435
|
message GetIdentityByPublicKeyHashRequestV0 {
|
|
450
436
|
bytes public_key_hash = 1;
|
|
@@ -620,3 +606,34 @@ message GetEpochsInfoResponse {
|
|
|
620
606
|
GetEpochsInfoResponseV0 v0 = 1;
|
|
621
607
|
}
|
|
622
608
|
}
|
|
609
|
+
|
|
610
|
+
message GetPathElementsRequest {
|
|
611
|
+
message GetPathElementsRequestV0 {
|
|
612
|
+
repeated bytes path = 1;
|
|
613
|
+
repeated bytes keys = 2;
|
|
614
|
+
bool prove = 3;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
oneof version {
|
|
618
|
+
GetPathElementsRequestV0 v0 = 1;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
message GetPathElementsResponse {
|
|
623
|
+
message GetPathElementsResponseV0 {
|
|
624
|
+
message Elements {
|
|
625
|
+
repeated bytes elements = 1;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
oneof result {
|
|
629
|
+
Elements elements = 1;
|
|
630
|
+
Proof proof = 2;
|
|
631
|
+
}
|
|
632
|
+
ResponseMetadata metadata = 3;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
oneof version {
|
|
636
|
+
GetPathElementsResponseV0 v0 = 1;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|