@dashevo/dapi-grpc 1.0.0-dev.11 → 1.0.0-dev.13

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.
@@ -52,15 +52,29 @@ class CorePromiseClient {
52
52
  }
53
53
 
54
54
  /**
55
- * @param {!GetStatusRequest} getStatusRequest
55
+ * @param {!GetBlockchainStatusRequest} getBlockchainStatusRequest
56
56
  * @param {?Object<string, string>} metadata
57
- * @return {Promise<!GetStatusResponse>}
57
+ * @return {Promise<!GetBlockchainStatusResponse>}
58
58
  */
59
- getStatus(getStatusRequest, metadata = {}) {
59
+ getBlockchainStatus(getBlockchainStatusRequest, metadata = {}) {
60
60
  return promisify(
61
- this.client.getStatus.bind(this.client),
61
+ this.client.getBlockchainStatus.bind(this.client),
62
62
  )(
63
- getStatusRequest,
63
+ getBlockchainStatusRequest,
64
+ metadata,
65
+ );
66
+ }
67
+
68
+ /**
69
+ * @param {!GetMasternodeStatusRequest} getMasternodeStatusRequest
70
+ * @param {?Object<string, string>} metadata
71
+ * @return {Promise<!GetMasternodeStatusResponse>}
72
+ */
73
+ getMasternodeStatus(getMasternodeStatusRequest, metadata = {}) {
74
+ return promisify(
75
+ this.client.getMasternodeStatus.bind(this.client),
76
+ )(
77
+ getMasternodeStatusRequest,
64
78
  metadata,
65
79
  );
66
80
  }
@@ -3,73 +3,67 @@
3
3
 
4
4
  import * as jspb from "google-protobuf";
5
5
 
6
- export class GetStatusRequest extends jspb.Message {
6
+ export class GetBlockchainStatusRequest extends jspb.Message {
7
7
  serializeBinary(): Uint8Array;
8
- toObject(includeInstance?: boolean): GetStatusRequest.AsObject;
9
- static toObject(includeInstance: boolean, msg: GetStatusRequest): GetStatusRequest.AsObject;
8
+ toObject(includeInstance?: boolean): GetBlockchainStatusRequest.AsObject;
9
+ static toObject(includeInstance: boolean, msg: GetBlockchainStatusRequest): GetBlockchainStatusRequest.AsObject;
10
10
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
11
11
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
12
- static serializeBinaryToWriter(message: GetStatusRequest, writer: jspb.BinaryWriter): void;
13
- static deserializeBinary(bytes: Uint8Array): GetStatusRequest;
14
- static deserializeBinaryFromReader(message: GetStatusRequest, reader: jspb.BinaryReader): GetStatusRequest;
12
+ static serializeBinaryToWriter(message: GetBlockchainStatusRequest, writer: jspb.BinaryWriter): void;
13
+ static deserializeBinary(bytes: Uint8Array): GetBlockchainStatusRequest;
14
+ static deserializeBinaryFromReader(message: GetBlockchainStatusRequest, reader: jspb.BinaryReader): GetBlockchainStatusRequest;
15
15
  }
16
16
 
17
- export namespace GetStatusRequest {
17
+ export namespace GetBlockchainStatusRequest {
18
18
  export type AsObject = {
19
19
  }
20
20
  }
21
21
 
22
- export class GetStatusResponse extends jspb.Message {
22
+ export class GetBlockchainStatusResponse extends jspb.Message {
23
23
  hasVersion(): boolean;
24
24
  clearVersion(): void;
25
- getVersion(): GetStatusResponse.Version | undefined;
26
- setVersion(value?: GetStatusResponse.Version): void;
25
+ getVersion(): GetBlockchainStatusResponse.Version | undefined;
26
+ setVersion(value?: GetBlockchainStatusResponse.Version): void;
27
27
 
28
28
  hasTime(): boolean;
29
29
  clearTime(): void;
30
- getTime(): GetStatusResponse.Time | undefined;
31
- setTime(value?: GetStatusResponse.Time): void;
30
+ getTime(): GetBlockchainStatusResponse.Time | undefined;
31
+ setTime(value?: GetBlockchainStatusResponse.Time): void;
32
32
 
33
- getStatus(): GetStatusResponse.StatusMap[keyof GetStatusResponse.StatusMap];
34
- setStatus(value: GetStatusResponse.StatusMap[keyof GetStatusResponse.StatusMap]): void;
33
+ getStatus(): GetBlockchainStatusResponse.StatusMap[keyof GetBlockchainStatusResponse.StatusMap];
34
+ setStatus(value: GetBlockchainStatusResponse.StatusMap[keyof GetBlockchainStatusResponse.StatusMap]): void;
35
35
 
36
36
  getSyncProgress(): number;
37
37
  setSyncProgress(value: number): void;
38
38
 
39
39
  hasChain(): boolean;
40
40
  clearChain(): void;
41
- getChain(): GetStatusResponse.Chain | undefined;
42
- setChain(value?: GetStatusResponse.Chain): void;
43
-
44
- hasMasternode(): boolean;
45
- clearMasternode(): void;
46
- getMasternode(): GetStatusResponse.Masternode | undefined;
47
- setMasternode(value?: GetStatusResponse.Masternode): void;
41
+ getChain(): GetBlockchainStatusResponse.Chain | undefined;
42
+ setChain(value?: GetBlockchainStatusResponse.Chain): void;
48
43
 
49
44
  hasNetwork(): boolean;
50
45
  clearNetwork(): void;
51
- getNetwork(): GetStatusResponse.Network | undefined;
52
- setNetwork(value?: GetStatusResponse.Network): void;
46
+ getNetwork(): GetBlockchainStatusResponse.Network | undefined;
47
+ setNetwork(value?: GetBlockchainStatusResponse.Network): void;
53
48
 
54
49
  serializeBinary(): Uint8Array;
55
- toObject(includeInstance?: boolean): GetStatusResponse.AsObject;
56
- static toObject(includeInstance: boolean, msg: GetStatusResponse): GetStatusResponse.AsObject;
50
+ toObject(includeInstance?: boolean): GetBlockchainStatusResponse.AsObject;
51
+ static toObject(includeInstance: boolean, msg: GetBlockchainStatusResponse): GetBlockchainStatusResponse.AsObject;
57
52
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
58
53
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
59
- static serializeBinaryToWriter(message: GetStatusResponse, writer: jspb.BinaryWriter): void;
60
- static deserializeBinary(bytes: Uint8Array): GetStatusResponse;
61
- static deserializeBinaryFromReader(message: GetStatusResponse, reader: jspb.BinaryReader): GetStatusResponse;
54
+ static serializeBinaryToWriter(message: GetBlockchainStatusResponse, writer: jspb.BinaryWriter): void;
55
+ static deserializeBinary(bytes: Uint8Array): GetBlockchainStatusResponse;
56
+ static deserializeBinaryFromReader(message: GetBlockchainStatusResponse, reader: jspb.BinaryReader): GetBlockchainStatusResponse;
62
57
  }
63
58
 
64
- export namespace GetStatusResponse {
59
+ export namespace GetBlockchainStatusResponse {
65
60
  export type AsObject = {
66
- version?: GetStatusResponse.Version.AsObject,
67
- time?: GetStatusResponse.Time.AsObject,
68
- status: GetStatusResponse.StatusMap[keyof GetStatusResponse.StatusMap],
61
+ version?: GetBlockchainStatusResponse.Version.AsObject,
62
+ time?: GetBlockchainStatusResponse.Time.AsObject,
63
+ status: GetBlockchainStatusResponse.StatusMap[keyof GetBlockchainStatusResponse.StatusMap],
69
64
  syncProgress: number,
70
- chain?: GetStatusResponse.Chain.AsObject,
71
- masternode?: GetStatusResponse.Masternode.AsObject,
72
- network?: GetStatusResponse.Network.AsObject,
65
+ chain?: GetBlockchainStatusResponse.Chain.AsObject,
66
+ network?: GetBlockchainStatusResponse.Network.AsObject,
73
67
  }
74
68
 
75
69
  export class Version extends jspb.Message {
@@ -180,57 +174,6 @@ export namespace GetStatusResponse {
180
174
  }
181
175
  }
182
176
 
183
- export class Masternode extends jspb.Message {
184
- getStatus(): GetStatusResponse.Masternode.StatusMap[keyof GetStatusResponse.Masternode.StatusMap];
185
- setStatus(value: GetStatusResponse.Masternode.StatusMap[keyof GetStatusResponse.Masternode.StatusMap]): void;
186
-
187
- getProTxHash(): Uint8Array | string;
188
- getProTxHash_asU8(): Uint8Array;
189
- getProTxHash_asB64(): string;
190
- setProTxHash(value: Uint8Array | string): void;
191
-
192
- getPosePenalty(): number;
193
- setPosePenalty(value: number): void;
194
-
195
- getIsSynced(): boolean;
196
- setIsSynced(value: boolean): void;
197
-
198
- getSyncProgress(): number;
199
- setSyncProgress(value: number): void;
200
-
201
- serializeBinary(): Uint8Array;
202
- toObject(includeInstance?: boolean): Masternode.AsObject;
203
- static toObject(includeInstance: boolean, msg: Masternode): Masternode.AsObject;
204
- static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
205
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
206
- static serializeBinaryToWriter(message: Masternode, writer: jspb.BinaryWriter): void;
207
- static deserializeBinary(bytes: Uint8Array): Masternode;
208
- static deserializeBinaryFromReader(message: Masternode, reader: jspb.BinaryReader): Masternode;
209
- }
210
-
211
- export namespace Masternode {
212
- export type AsObject = {
213
- status: GetStatusResponse.Masternode.StatusMap[keyof GetStatusResponse.Masternode.StatusMap],
214
- proTxHash: Uint8Array | string,
215
- posePenalty: number,
216
- isSynced: boolean,
217
- syncProgress: number,
218
- }
219
-
220
- export interface StatusMap {
221
- UNKNOWN: 0;
222
- WAITING_FOR_PROTX: 1;
223
- POSE_BANNED: 2;
224
- REMOVED: 3;
225
- OPERATOR_KEY_CHANGED: 4;
226
- PROTX_IP_CHANGED: 5;
227
- READY: 6;
228
- ERROR: 7;
229
- }
230
-
231
- export const Status: StatusMap;
232
- }
233
-
234
177
  export class NetworkFee extends jspb.Message {
235
178
  getRelay(): number;
236
179
  setRelay(value: number): void;
@@ -261,8 +204,8 @@ export namespace GetStatusResponse {
261
204
 
262
205
  hasFee(): boolean;
263
206
  clearFee(): void;
264
- getFee(): GetStatusResponse.NetworkFee | undefined;
265
- setFee(value?: GetStatusResponse.NetworkFee): void;
207
+ getFee(): GetBlockchainStatusResponse.NetworkFee | undefined;
208
+ setFee(value?: GetBlockchainStatusResponse.NetworkFee): void;
266
209
 
267
210
  serializeBinary(): Uint8Array;
268
211
  toObject(includeInstance?: boolean): Network.AsObject;
@@ -277,7 +220,7 @@ export namespace GetStatusResponse {
277
220
  export namespace Network {
278
221
  export type AsObject = {
279
222
  peersCount: number,
280
- fee?: GetStatusResponse.NetworkFee.AsObject,
223
+ fee?: GetBlockchainStatusResponse.NetworkFee.AsObject,
281
224
  }
282
225
  }
283
226
 
@@ -291,6 +234,73 @@ export namespace GetStatusResponse {
291
234
  export const Status: StatusMap;
292
235
  }
293
236
 
237
+ export class GetMasternodeStatusRequest extends jspb.Message {
238
+ serializeBinary(): Uint8Array;
239
+ toObject(includeInstance?: boolean): GetMasternodeStatusRequest.AsObject;
240
+ static toObject(includeInstance: boolean, msg: GetMasternodeStatusRequest): GetMasternodeStatusRequest.AsObject;
241
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
242
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
243
+ static serializeBinaryToWriter(message: GetMasternodeStatusRequest, writer: jspb.BinaryWriter): void;
244
+ static deserializeBinary(bytes: Uint8Array): GetMasternodeStatusRequest;
245
+ static deserializeBinaryFromReader(message: GetMasternodeStatusRequest, reader: jspb.BinaryReader): GetMasternodeStatusRequest;
246
+ }
247
+
248
+ export namespace GetMasternodeStatusRequest {
249
+ export type AsObject = {
250
+ }
251
+ }
252
+
253
+ export class GetMasternodeStatusResponse extends jspb.Message {
254
+ getStatus(): GetMasternodeStatusResponse.StatusMap[keyof GetMasternodeStatusResponse.StatusMap];
255
+ setStatus(value: GetMasternodeStatusResponse.StatusMap[keyof GetMasternodeStatusResponse.StatusMap]): void;
256
+
257
+ getProTxHash(): Uint8Array | string;
258
+ getProTxHash_asU8(): Uint8Array;
259
+ getProTxHash_asB64(): string;
260
+ setProTxHash(value: Uint8Array | string): void;
261
+
262
+ getPosePenalty(): number;
263
+ setPosePenalty(value: number): void;
264
+
265
+ getIsSynced(): boolean;
266
+ setIsSynced(value: boolean): void;
267
+
268
+ getSyncProgress(): number;
269
+ setSyncProgress(value: number): void;
270
+
271
+ serializeBinary(): Uint8Array;
272
+ toObject(includeInstance?: boolean): GetMasternodeStatusResponse.AsObject;
273
+ static toObject(includeInstance: boolean, msg: GetMasternodeStatusResponse): GetMasternodeStatusResponse.AsObject;
274
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
275
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
276
+ static serializeBinaryToWriter(message: GetMasternodeStatusResponse, writer: jspb.BinaryWriter): void;
277
+ static deserializeBinary(bytes: Uint8Array): GetMasternodeStatusResponse;
278
+ static deserializeBinaryFromReader(message: GetMasternodeStatusResponse, reader: jspb.BinaryReader): GetMasternodeStatusResponse;
279
+ }
280
+
281
+ export namespace GetMasternodeStatusResponse {
282
+ export type AsObject = {
283
+ status: GetMasternodeStatusResponse.StatusMap[keyof GetMasternodeStatusResponse.StatusMap],
284
+ proTxHash: Uint8Array | string,
285
+ posePenalty: number,
286
+ isSynced: boolean,
287
+ syncProgress: number,
288
+ }
289
+
290
+ export interface StatusMap {
291
+ UNKNOWN: 0;
292
+ WAITING_FOR_PROTX: 1;
293
+ POSE_BANNED: 2;
294
+ REMOVED: 3;
295
+ OPERATOR_KEY_CHANGED: 4;
296
+ PROTX_IP_CHANGED: 5;
297
+ READY: 6;
298
+ ERROR: 7;
299
+ }
300
+
301
+ export const Status: StatusMap;
302
+ }
303
+
294
304
  export class GetBlockRequest extends jspb.Message {
295
305
  hasHeight(): boolean;
296
306
  clearHeight(): void;