@dashevo/dapi-grpc 2.0.0-dev.1 → 2.0.0-rc.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.
@@ -0,0 +1,420 @@
1
+ // source: drive.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ const proto = {};
17
+
18
+ var platform_v0_platform_pb = require('../../../platform/v0/web/platform_pb.js');
19
+ goog.object.extend(proto, platform_v0_platform_pb);
20
+ goog.exportSymbol('proto.org.dash.platform.drive.v0.GetProofsRequest', null, { proto });
21
+ goog.exportSymbol('proto.org.dash.platform.drive.v0.GetProofsResponse', null, { proto });
22
+ /**
23
+ * Generated by JsPbCodeGenerator.
24
+ * @param {Array=} opt_data Optional initial data array, typically from a
25
+ * server response, or constructed directly in Javascript. The array is used
26
+ * in place and becomes part of the constructed object. It is not cloned.
27
+ * If no data is provided, the constructed object will be empty, but still
28
+ * valid.
29
+ * @extends {jspb.Message}
30
+ * @constructor
31
+ */
32
+ proto.org.dash.platform.drive.v0.GetProofsRequest = function(opt_data) {
33
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
34
+ };
35
+ goog.inherits(proto.org.dash.platform.drive.v0.GetProofsRequest, jspb.Message);
36
+ if (goog.DEBUG && !COMPILED) {
37
+ /**
38
+ * @public
39
+ * @override
40
+ */
41
+ proto.org.dash.platform.drive.v0.GetProofsRequest.displayName = 'proto.org.dash.platform.drive.v0.GetProofsRequest';
42
+ }
43
+ /**
44
+ * Generated by JsPbCodeGenerator.
45
+ * @param {Array=} opt_data Optional initial data array, typically from a
46
+ * server response, or constructed directly in Javascript. The array is used
47
+ * in place and becomes part of the constructed object. It is not cloned.
48
+ * If no data is provided, the constructed object will be empty, but still
49
+ * valid.
50
+ * @extends {jspb.Message}
51
+ * @constructor
52
+ */
53
+ proto.org.dash.platform.drive.v0.GetProofsResponse = function(opt_data) {
54
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
55
+ };
56
+ goog.inherits(proto.org.dash.platform.drive.v0.GetProofsResponse, jspb.Message);
57
+ if (goog.DEBUG && !COMPILED) {
58
+ /**
59
+ * @public
60
+ * @override
61
+ */
62
+ proto.org.dash.platform.drive.v0.GetProofsResponse.displayName = 'proto.org.dash.platform.drive.v0.GetProofsResponse';
63
+ }
64
+
65
+
66
+
67
+ if (jspb.Message.GENERATE_TO_OBJECT) {
68
+ /**
69
+ * Creates an object representation of this proto.
70
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
71
+ * Optional fields that are not set will be set to undefined.
72
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
73
+ * For the list of reserved names please see:
74
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
75
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
76
+ * JSPB instance for transitional soy proto support:
77
+ * http://goto/soy-param-migration
78
+ * @return {!Object}
79
+ */
80
+ proto.org.dash.platform.drive.v0.GetProofsRequest.prototype.toObject = function(opt_includeInstance) {
81
+ return proto.org.dash.platform.drive.v0.GetProofsRequest.toObject(opt_includeInstance, this);
82
+ };
83
+
84
+
85
+ /**
86
+ * Static version of the {@see toObject} method.
87
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
88
+ * the JSPB instance for transitional soy proto support:
89
+ * http://goto/soy-param-migration
90
+ * @param {!proto.org.dash.platform.drive.v0.GetProofsRequest} msg The msg instance to transform.
91
+ * @return {!Object}
92
+ * @suppress {unusedLocalVariables} f is only used for nested messages
93
+ */
94
+ proto.org.dash.platform.drive.v0.GetProofsRequest.toObject = function(includeInstance, msg) {
95
+ var f, obj = {
96
+ stateTransition: msg.getStateTransition_asB64()
97
+ };
98
+
99
+ if (includeInstance) {
100
+ obj.$jspbMessageInstance = msg;
101
+ }
102
+ return obj;
103
+ };
104
+ }
105
+
106
+
107
+ /**
108
+ * Deserializes binary data (in protobuf wire format).
109
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
110
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsRequest}
111
+ */
112
+ proto.org.dash.platform.drive.v0.GetProofsRequest.deserializeBinary = function(bytes) {
113
+ var reader = new jspb.BinaryReader(bytes);
114
+ var msg = new proto.org.dash.platform.drive.v0.GetProofsRequest;
115
+ return proto.org.dash.platform.drive.v0.GetProofsRequest.deserializeBinaryFromReader(msg, reader);
116
+ };
117
+
118
+
119
+ /**
120
+ * Deserializes binary data (in protobuf wire format) from the
121
+ * given reader into the given message object.
122
+ * @param {!proto.org.dash.platform.drive.v0.GetProofsRequest} msg The message object to deserialize into.
123
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
124
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsRequest}
125
+ */
126
+ proto.org.dash.platform.drive.v0.GetProofsRequest.deserializeBinaryFromReader = function(msg, reader) {
127
+ while (reader.nextField()) {
128
+ if (reader.isEndGroup()) {
129
+ break;
130
+ }
131
+ var field = reader.getFieldNumber();
132
+ switch (field) {
133
+ case 1:
134
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
135
+ msg.setStateTransition(value);
136
+ break;
137
+ default:
138
+ reader.skipField();
139
+ break;
140
+ }
141
+ }
142
+ return msg;
143
+ };
144
+
145
+
146
+ /**
147
+ * Serializes the message to binary data (in protobuf wire format).
148
+ * @return {!Uint8Array}
149
+ */
150
+ proto.org.dash.platform.drive.v0.GetProofsRequest.prototype.serializeBinary = function() {
151
+ var writer = new jspb.BinaryWriter();
152
+ proto.org.dash.platform.drive.v0.GetProofsRequest.serializeBinaryToWriter(this, writer);
153
+ return writer.getResultBuffer();
154
+ };
155
+
156
+
157
+ /**
158
+ * Serializes the given message to binary data (in protobuf wire
159
+ * format), writing to the given BinaryWriter.
160
+ * @param {!proto.org.dash.platform.drive.v0.GetProofsRequest} message
161
+ * @param {!jspb.BinaryWriter} writer
162
+ * @suppress {unusedLocalVariables} f is only used for nested messages
163
+ */
164
+ proto.org.dash.platform.drive.v0.GetProofsRequest.serializeBinaryToWriter = function(message, writer) {
165
+ var f = undefined;
166
+ f = message.getStateTransition_asU8();
167
+ if (f.length > 0) {
168
+ writer.writeBytes(
169
+ 1,
170
+ f
171
+ );
172
+ }
173
+ };
174
+
175
+
176
+ /**
177
+ * optional bytes state_transition = 1;
178
+ * @return {string}
179
+ */
180
+ proto.org.dash.platform.drive.v0.GetProofsRequest.prototype.getStateTransition = function() {
181
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
182
+ };
183
+
184
+
185
+ /**
186
+ * optional bytes state_transition = 1;
187
+ * This is a type-conversion wrapper around `getStateTransition()`
188
+ * @return {string}
189
+ */
190
+ proto.org.dash.platform.drive.v0.GetProofsRequest.prototype.getStateTransition_asB64 = function() {
191
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
192
+ this.getStateTransition()));
193
+ };
194
+
195
+
196
+ /**
197
+ * optional bytes state_transition = 1;
198
+ * Note that Uint8Array is not supported on all browsers.
199
+ * @see http://caniuse.com/Uint8Array
200
+ * This is a type-conversion wrapper around `getStateTransition()`
201
+ * @return {!Uint8Array}
202
+ */
203
+ proto.org.dash.platform.drive.v0.GetProofsRequest.prototype.getStateTransition_asU8 = function() {
204
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
205
+ this.getStateTransition()));
206
+ };
207
+
208
+
209
+ /**
210
+ * @param {!(string|Uint8Array)} value
211
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsRequest} returns this
212
+ */
213
+ proto.org.dash.platform.drive.v0.GetProofsRequest.prototype.setStateTransition = function(value) {
214
+ return jspb.Message.setProto3BytesField(this, 1, value);
215
+ };
216
+
217
+
218
+
219
+
220
+
221
+ if (jspb.Message.GENERATE_TO_OBJECT) {
222
+ /**
223
+ * Creates an object representation of this proto.
224
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
225
+ * Optional fields that are not set will be set to undefined.
226
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
227
+ * For the list of reserved names please see:
228
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
229
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
230
+ * JSPB instance for transitional soy proto support:
231
+ * http://goto/soy-param-migration
232
+ * @return {!Object}
233
+ */
234
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.toObject = function(opt_includeInstance) {
235
+ return proto.org.dash.platform.drive.v0.GetProofsResponse.toObject(opt_includeInstance, this);
236
+ };
237
+
238
+
239
+ /**
240
+ * Static version of the {@see toObject} method.
241
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
242
+ * the JSPB instance for transitional soy proto support:
243
+ * http://goto/soy-param-migration
244
+ * @param {!proto.org.dash.platform.drive.v0.GetProofsResponse} msg The msg instance to transform.
245
+ * @return {!Object}
246
+ * @suppress {unusedLocalVariables} f is only used for nested messages
247
+ */
248
+ proto.org.dash.platform.drive.v0.GetProofsResponse.toObject = function(includeInstance, msg) {
249
+ var f, obj = {
250
+ proof: (f = msg.getProof()) && platform_v0_platform_pb.Proof.toObject(includeInstance, f),
251
+ metadata: (f = msg.getMetadata()) && platform_v0_platform_pb.ResponseMetadata.toObject(includeInstance, f)
252
+ };
253
+
254
+ if (includeInstance) {
255
+ obj.$jspbMessageInstance = msg;
256
+ }
257
+ return obj;
258
+ };
259
+ }
260
+
261
+
262
+ /**
263
+ * Deserializes binary data (in protobuf wire format).
264
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
265
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsResponse}
266
+ */
267
+ proto.org.dash.platform.drive.v0.GetProofsResponse.deserializeBinary = function(bytes) {
268
+ var reader = new jspb.BinaryReader(bytes);
269
+ var msg = new proto.org.dash.platform.drive.v0.GetProofsResponse;
270
+ return proto.org.dash.platform.drive.v0.GetProofsResponse.deserializeBinaryFromReader(msg, reader);
271
+ };
272
+
273
+
274
+ /**
275
+ * Deserializes binary data (in protobuf wire format) from the
276
+ * given reader into the given message object.
277
+ * @param {!proto.org.dash.platform.drive.v0.GetProofsResponse} msg The message object to deserialize into.
278
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
279
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsResponse}
280
+ */
281
+ proto.org.dash.platform.drive.v0.GetProofsResponse.deserializeBinaryFromReader = function(msg, reader) {
282
+ while (reader.nextField()) {
283
+ if (reader.isEndGroup()) {
284
+ break;
285
+ }
286
+ var field = reader.getFieldNumber();
287
+ switch (field) {
288
+ case 1:
289
+ var value = new platform_v0_platform_pb.Proof;
290
+ reader.readMessage(value,platform_v0_platform_pb.Proof.deserializeBinaryFromReader);
291
+ msg.setProof(value);
292
+ break;
293
+ case 2:
294
+ var value = new platform_v0_platform_pb.ResponseMetadata;
295
+ reader.readMessage(value,platform_v0_platform_pb.ResponseMetadata.deserializeBinaryFromReader);
296
+ msg.setMetadata(value);
297
+ break;
298
+ default:
299
+ reader.skipField();
300
+ break;
301
+ }
302
+ }
303
+ return msg;
304
+ };
305
+
306
+
307
+ /**
308
+ * Serializes the message to binary data (in protobuf wire format).
309
+ * @return {!Uint8Array}
310
+ */
311
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.serializeBinary = function() {
312
+ var writer = new jspb.BinaryWriter();
313
+ proto.org.dash.platform.drive.v0.GetProofsResponse.serializeBinaryToWriter(this, writer);
314
+ return writer.getResultBuffer();
315
+ };
316
+
317
+
318
+ /**
319
+ * Serializes the given message to binary data (in protobuf wire
320
+ * format), writing to the given BinaryWriter.
321
+ * @param {!proto.org.dash.platform.drive.v0.GetProofsResponse} message
322
+ * @param {!jspb.BinaryWriter} writer
323
+ * @suppress {unusedLocalVariables} f is only used for nested messages
324
+ */
325
+ proto.org.dash.platform.drive.v0.GetProofsResponse.serializeBinaryToWriter = function(message, writer) {
326
+ var f = undefined;
327
+ f = message.getProof();
328
+ if (f != null) {
329
+ writer.writeMessage(
330
+ 1,
331
+ f,
332
+ platform_v0_platform_pb.Proof.serializeBinaryToWriter
333
+ );
334
+ }
335
+ f = message.getMetadata();
336
+ if (f != null) {
337
+ writer.writeMessage(
338
+ 2,
339
+ f,
340
+ platform_v0_platform_pb.ResponseMetadata.serializeBinaryToWriter
341
+ );
342
+ }
343
+ };
344
+
345
+
346
+ /**
347
+ * optional org.dash.platform.dapi.v0.Proof proof = 1;
348
+ * @return {?proto.org.dash.platform.dapi.v0.Proof}
349
+ */
350
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.getProof = function() {
351
+ return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ (
352
+ jspb.Message.getWrapperField(this, platform_v0_platform_pb.Proof, 1));
353
+ };
354
+
355
+
356
+ /**
357
+ * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value
358
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsResponse} returns this
359
+ */
360
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.setProof = function(value) {
361
+ return jspb.Message.setWrapperField(this, 1, value);
362
+ };
363
+
364
+
365
+ /**
366
+ * Clears the message field making it undefined.
367
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsResponse} returns this
368
+ */
369
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.clearProof = function() {
370
+ return this.setProof(undefined);
371
+ };
372
+
373
+
374
+ /**
375
+ * Returns whether this field is set.
376
+ * @return {boolean}
377
+ */
378
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.hasProof = function() {
379
+ return jspb.Message.getField(this, 1) != null;
380
+ };
381
+
382
+
383
+ /**
384
+ * optional org.dash.platform.dapi.v0.ResponseMetadata metadata = 2;
385
+ * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata}
386
+ */
387
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.getMetadata = function() {
388
+ return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ (
389
+ jspb.Message.getWrapperField(this, platform_v0_platform_pb.ResponseMetadata, 2));
390
+ };
391
+
392
+
393
+ /**
394
+ * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value
395
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsResponse} returns this
396
+ */
397
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.setMetadata = function(value) {
398
+ return jspb.Message.setWrapperField(this, 2, value);
399
+ };
400
+
401
+
402
+ /**
403
+ * Clears the message field making it undefined.
404
+ * @return {!proto.org.dash.platform.drive.v0.GetProofsResponse} returns this
405
+ */
406
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.clearMetadata = function() {
407
+ return this.setMetadata(undefined);
408
+ };
409
+
410
+
411
+ /**
412
+ * Returns whether this field is set.
413
+ * @return {boolean}
414
+ */
415
+ proto.org.dash.platform.drive.v0.GetProofsResponse.prototype.hasMetadata = function() {
416
+ return jspb.Message.getField(this, 2) != null;
417
+ };
418
+
419
+
420
+ goog.object.extend(exports, proto.org.dash.platform.drive.v0);
@@ -0,0 +1,56 @@
1
+ // package: org.dash.platform.drive.v0
2
+ // file: drive.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+ import * as platform_v0_platform_pb from "./platform/v0/platform_pb";
6
+
7
+ export class GetProofsRequest extends jspb.Message {
8
+ getStateTransition(): Uint8Array | string;
9
+ getStateTransition_asU8(): Uint8Array;
10
+ getStateTransition_asB64(): string;
11
+ setStateTransition(value: Uint8Array | string): void;
12
+
13
+ serializeBinary(): Uint8Array;
14
+ toObject(includeInstance?: boolean): GetProofsRequest.AsObject;
15
+ static toObject(includeInstance: boolean, msg: GetProofsRequest): GetProofsRequest.AsObject;
16
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
17
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
18
+ static serializeBinaryToWriter(message: GetProofsRequest, writer: jspb.BinaryWriter): void;
19
+ static deserializeBinary(bytes: Uint8Array): GetProofsRequest;
20
+ static deserializeBinaryFromReader(message: GetProofsRequest, reader: jspb.BinaryReader): GetProofsRequest;
21
+ }
22
+
23
+ export namespace GetProofsRequest {
24
+ export type AsObject = {
25
+ stateTransition: Uint8Array | string,
26
+ }
27
+ }
28
+
29
+ export class GetProofsResponse extends jspb.Message {
30
+ hasProof(): boolean;
31
+ clearProof(): void;
32
+ getProof(): platform_v0_platform_pb.Proof | undefined;
33
+ setProof(value?: platform_v0_platform_pb.Proof): void;
34
+
35
+ hasMetadata(): boolean;
36
+ clearMetadata(): void;
37
+ getMetadata(): platform_v0_platform_pb.ResponseMetadata | undefined;
38
+ setMetadata(value?: platform_v0_platform_pb.ResponseMetadata): void;
39
+
40
+ serializeBinary(): Uint8Array;
41
+ toObject(includeInstance?: boolean): GetProofsResponse.AsObject;
42
+ static toObject(includeInstance: boolean, msg: GetProofsResponse): GetProofsResponse.AsObject;
43
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
44
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
45
+ static serializeBinaryToWriter(message: GetProofsResponse, writer: jspb.BinaryWriter): void;
46
+ static deserializeBinary(bytes: Uint8Array): GetProofsResponse;
47
+ static deserializeBinaryFromReader(message: GetProofsResponse, reader: jspb.BinaryReader): GetProofsResponse;
48
+ }
49
+
50
+ export namespace GetProofsResponse {
51
+ export type AsObject = {
52
+ proof?: platform_v0_platform_pb.Proof.AsObject,
53
+ metadata?: platform_v0_platform_pb.ResponseMetadata.AsObject,
54
+ }
55
+ }
56
+