@keepkey/device-protocol 7.12.1 → 7.13.1

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,2271 @@
1
+ // source: messages-mayachain.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
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
+
18
+ var types_pb = require('./types_pb.js');
19
+ goog.object.extend(proto, types_pb);
20
+ goog.exportSymbol('proto.MayachainAddress', null, global);
21
+ goog.exportSymbol('proto.MayachainGetAddress', null, global);
22
+ goog.exportSymbol('proto.MayachainMsgAck', null, global);
23
+ goog.exportSymbol('proto.MayachainMsgDeposit', null, global);
24
+ goog.exportSymbol('proto.MayachainMsgRequest', null, global);
25
+ goog.exportSymbol('proto.MayachainMsgSend', null, global);
26
+ goog.exportSymbol('proto.MayachainSignTx', null, global);
27
+ goog.exportSymbol('proto.MayachainSignedTx', null, global);
28
+ /**
29
+ * Generated by JsPbCodeGenerator.
30
+ * @param {Array=} opt_data Optional initial data array, typically from a
31
+ * server response, or constructed directly in Javascript. The array is used
32
+ * in place and becomes part of the constructed object. It is not cloned.
33
+ * If no data is provided, the constructed object will be empty, but still
34
+ * valid.
35
+ * @extends {jspb.Message}
36
+ * @constructor
37
+ */
38
+ proto.MayachainGetAddress = function(opt_data) {
39
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.MayachainGetAddress.repeatedFields_, null);
40
+ };
41
+ goog.inherits(proto.MayachainGetAddress, jspb.Message);
42
+ if (goog.DEBUG && !COMPILED) {
43
+ /**
44
+ * @public
45
+ * @override
46
+ */
47
+ proto.MayachainGetAddress.displayName = 'proto.MayachainGetAddress';
48
+ }
49
+ /**
50
+ * Generated by JsPbCodeGenerator.
51
+ * @param {Array=} opt_data Optional initial data array, typically from a
52
+ * server response, or constructed directly in Javascript. The array is used
53
+ * in place and becomes part of the constructed object. It is not cloned.
54
+ * If no data is provided, the constructed object will be empty, but still
55
+ * valid.
56
+ * @extends {jspb.Message}
57
+ * @constructor
58
+ */
59
+ proto.MayachainAddress = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
61
+ };
62
+ goog.inherits(proto.MayachainAddress, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ proto.MayachainAddress.displayName = 'proto.MayachainAddress';
69
+ }
70
+ /**
71
+ * Generated by JsPbCodeGenerator.
72
+ * @param {Array=} opt_data Optional initial data array, typically from a
73
+ * server response, or constructed directly in Javascript. The array is used
74
+ * in place and becomes part of the constructed object. It is not cloned.
75
+ * If no data is provided, the constructed object will be empty, but still
76
+ * valid.
77
+ * @extends {jspb.Message}
78
+ * @constructor
79
+ */
80
+ proto.MayachainSignTx = function(opt_data) {
81
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.MayachainSignTx.repeatedFields_, null);
82
+ };
83
+ goog.inherits(proto.MayachainSignTx, jspb.Message);
84
+ if (goog.DEBUG && !COMPILED) {
85
+ /**
86
+ * @public
87
+ * @override
88
+ */
89
+ proto.MayachainSignTx.displayName = 'proto.MayachainSignTx';
90
+ }
91
+ /**
92
+ * Generated by JsPbCodeGenerator.
93
+ * @param {Array=} opt_data Optional initial data array, typically from a
94
+ * server response, or constructed directly in Javascript. The array is used
95
+ * in place and becomes part of the constructed object. It is not cloned.
96
+ * If no data is provided, the constructed object will be empty, but still
97
+ * valid.
98
+ * @extends {jspb.Message}
99
+ * @constructor
100
+ */
101
+ proto.MayachainMsgRequest = function(opt_data) {
102
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
103
+ };
104
+ goog.inherits(proto.MayachainMsgRequest, jspb.Message);
105
+ if (goog.DEBUG && !COMPILED) {
106
+ /**
107
+ * @public
108
+ * @override
109
+ */
110
+ proto.MayachainMsgRequest.displayName = 'proto.MayachainMsgRequest';
111
+ }
112
+ /**
113
+ * Generated by JsPbCodeGenerator.
114
+ * @param {Array=} opt_data Optional initial data array, typically from a
115
+ * server response, or constructed directly in Javascript. The array is used
116
+ * in place and becomes part of the constructed object. It is not cloned.
117
+ * If no data is provided, the constructed object will be empty, but still
118
+ * valid.
119
+ * @extends {jspb.Message}
120
+ * @constructor
121
+ */
122
+ proto.MayachainMsgAck = function(opt_data) {
123
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
124
+ };
125
+ goog.inherits(proto.MayachainMsgAck, jspb.Message);
126
+ if (goog.DEBUG && !COMPILED) {
127
+ /**
128
+ * @public
129
+ * @override
130
+ */
131
+ proto.MayachainMsgAck.displayName = 'proto.MayachainMsgAck';
132
+ }
133
+ /**
134
+ * Generated by JsPbCodeGenerator.
135
+ * @param {Array=} opt_data Optional initial data array, typically from a
136
+ * server response, or constructed directly in Javascript. The array is used
137
+ * in place and becomes part of the constructed object. It is not cloned.
138
+ * If no data is provided, the constructed object will be empty, but still
139
+ * valid.
140
+ * @extends {jspb.Message}
141
+ * @constructor
142
+ */
143
+ proto.MayachainMsgSend = function(opt_data) {
144
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
145
+ };
146
+ goog.inherits(proto.MayachainMsgSend, jspb.Message);
147
+ if (goog.DEBUG && !COMPILED) {
148
+ /**
149
+ * @public
150
+ * @override
151
+ */
152
+ proto.MayachainMsgSend.displayName = 'proto.MayachainMsgSend';
153
+ }
154
+ /**
155
+ * Generated by JsPbCodeGenerator.
156
+ * @param {Array=} opt_data Optional initial data array, typically from a
157
+ * server response, or constructed directly in Javascript. The array is used
158
+ * in place and becomes part of the constructed object. It is not cloned.
159
+ * If no data is provided, the constructed object will be empty, but still
160
+ * valid.
161
+ * @extends {jspb.Message}
162
+ * @constructor
163
+ */
164
+ proto.MayachainMsgDeposit = function(opt_data) {
165
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
166
+ };
167
+ goog.inherits(proto.MayachainMsgDeposit, jspb.Message);
168
+ if (goog.DEBUG && !COMPILED) {
169
+ /**
170
+ * @public
171
+ * @override
172
+ */
173
+ proto.MayachainMsgDeposit.displayName = 'proto.MayachainMsgDeposit';
174
+ }
175
+ /**
176
+ * Generated by JsPbCodeGenerator.
177
+ * @param {Array=} opt_data Optional initial data array, typically from a
178
+ * server response, or constructed directly in Javascript. The array is used
179
+ * in place and becomes part of the constructed object. It is not cloned.
180
+ * If no data is provided, the constructed object will be empty, but still
181
+ * valid.
182
+ * @extends {jspb.Message}
183
+ * @constructor
184
+ */
185
+ proto.MayachainSignedTx = function(opt_data) {
186
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
187
+ };
188
+ goog.inherits(proto.MayachainSignedTx, jspb.Message);
189
+ if (goog.DEBUG && !COMPILED) {
190
+ /**
191
+ * @public
192
+ * @override
193
+ */
194
+ proto.MayachainSignedTx.displayName = 'proto.MayachainSignedTx';
195
+ }
196
+
197
+ /**
198
+ * List of repeated fields within this message type.
199
+ * @private {!Array<number>}
200
+ * @const
201
+ */
202
+ proto.MayachainGetAddress.repeatedFields_ = [1];
203
+
204
+
205
+
206
+ if (jspb.Message.GENERATE_TO_OBJECT) {
207
+ /**
208
+ * Creates an object representation of this proto.
209
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
210
+ * Optional fields that are not set will be set to undefined.
211
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
212
+ * For the list of reserved names please see:
213
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
214
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
215
+ * JSPB instance for transitional soy proto support:
216
+ * http://goto/soy-param-migration
217
+ * @return {!Object}
218
+ */
219
+ proto.MayachainGetAddress.prototype.toObject = function(opt_includeInstance) {
220
+ return proto.MayachainGetAddress.toObject(opt_includeInstance, this);
221
+ };
222
+
223
+
224
+ /**
225
+ * Static version of the {@see toObject} method.
226
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
227
+ * the JSPB instance for transitional soy proto support:
228
+ * http://goto/soy-param-migration
229
+ * @param {!proto.MayachainGetAddress} msg The msg instance to transform.
230
+ * @return {!Object}
231
+ * @suppress {unusedLocalVariables} f is only used for nested messages
232
+ */
233
+ proto.MayachainGetAddress.toObject = function(includeInstance, msg) {
234
+ var f, obj = {
235
+ addressNList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
236
+ showDisplay: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f,
237
+ testnet: (f = jspb.Message.getBooleanField(msg, 3)) == null ? undefined : f
238
+ };
239
+
240
+ if (includeInstance) {
241
+ obj.$jspbMessageInstance = msg;
242
+ }
243
+ return obj;
244
+ };
245
+ }
246
+
247
+
248
+ /**
249
+ * Deserializes binary data (in protobuf wire format).
250
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
251
+ * @return {!proto.MayachainGetAddress}
252
+ */
253
+ proto.MayachainGetAddress.deserializeBinary = function(bytes) {
254
+ var reader = new jspb.BinaryReader(bytes);
255
+ var msg = new proto.MayachainGetAddress;
256
+ return proto.MayachainGetAddress.deserializeBinaryFromReader(msg, reader);
257
+ };
258
+
259
+
260
+ /**
261
+ * Deserializes binary data (in protobuf wire format) from the
262
+ * given reader into the given message object.
263
+ * @param {!proto.MayachainGetAddress} msg The message object to deserialize into.
264
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
265
+ * @return {!proto.MayachainGetAddress}
266
+ */
267
+ proto.MayachainGetAddress.deserializeBinaryFromReader = function(msg, reader) {
268
+ while (reader.nextField()) {
269
+ if (reader.isEndGroup()) {
270
+ break;
271
+ }
272
+ var field = reader.getFieldNumber();
273
+ switch (field) {
274
+ case 1:
275
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]);
276
+ for (var i = 0; i < values.length; i++) {
277
+ msg.addAddressN(values[i]);
278
+ }
279
+ break;
280
+ case 2:
281
+ var value = /** @type {boolean} */ (reader.readBool());
282
+ msg.setShowDisplay(value);
283
+ break;
284
+ case 3:
285
+ var value = /** @type {boolean} */ (reader.readBool());
286
+ msg.setTestnet(value);
287
+ break;
288
+ default:
289
+ reader.skipField();
290
+ break;
291
+ }
292
+ }
293
+ return msg;
294
+ };
295
+
296
+
297
+ /**
298
+ * Serializes the message to binary data (in protobuf wire format).
299
+ * @return {!Uint8Array}
300
+ */
301
+ proto.MayachainGetAddress.prototype.serializeBinary = function() {
302
+ var writer = new jspb.BinaryWriter();
303
+ proto.MayachainGetAddress.serializeBinaryToWriter(this, writer);
304
+ return writer.getResultBuffer();
305
+ };
306
+
307
+
308
+ /**
309
+ * Serializes the given message to binary data (in protobuf wire
310
+ * format), writing to the given BinaryWriter.
311
+ * @param {!proto.MayachainGetAddress} message
312
+ * @param {!jspb.BinaryWriter} writer
313
+ * @suppress {unusedLocalVariables} f is only used for nested messages
314
+ */
315
+ proto.MayachainGetAddress.serializeBinaryToWriter = function(message, writer) {
316
+ var f = undefined;
317
+ f = message.getAddressNList();
318
+ if (f.length > 0) {
319
+ writer.writeRepeatedUint32(
320
+ 1,
321
+ f
322
+ );
323
+ }
324
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
325
+ if (f != null) {
326
+ writer.writeBool(
327
+ 2,
328
+ f
329
+ );
330
+ }
331
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 3));
332
+ if (f != null) {
333
+ writer.writeBool(
334
+ 3,
335
+ f
336
+ );
337
+ }
338
+ };
339
+
340
+
341
+ /**
342
+ * repeated uint32 address_n = 1;
343
+ * @return {!Array<number>}
344
+ */
345
+ proto.MayachainGetAddress.prototype.getAddressNList = function() {
346
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 1));
347
+ };
348
+
349
+
350
+ /**
351
+ * @param {!Array<number>} value
352
+ * @return {!proto.MayachainGetAddress} returns this
353
+ */
354
+ proto.MayachainGetAddress.prototype.setAddressNList = function(value) {
355
+ return jspb.Message.setField(this, 1, value || []);
356
+ };
357
+
358
+
359
+ /**
360
+ * @param {number} value
361
+ * @param {number=} opt_index
362
+ * @return {!proto.MayachainGetAddress} returns this
363
+ */
364
+ proto.MayachainGetAddress.prototype.addAddressN = function(value, opt_index) {
365
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
366
+ };
367
+
368
+
369
+ /**
370
+ * Clears the list making it empty but non-null.
371
+ * @return {!proto.MayachainGetAddress} returns this
372
+ */
373
+ proto.MayachainGetAddress.prototype.clearAddressNList = function() {
374
+ return this.setAddressNList([]);
375
+ };
376
+
377
+
378
+ /**
379
+ * optional bool show_display = 2;
380
+ * @return {boolean}
381
+ */
382
+ proto.MayachainGetAddress.prototype.getShowDisplay = function() {
383
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
384
+ };
385
+
386
+
387
+ /**
388
+ * @param {boolean} value
389
+ * @return {!proto.MayachainGetAddress} returns this
390
+ */
391
+ proto.MayachainGetAddress.prototype.setShowDisplay = function(value) {
392
+ return jspb.Message.setField(this, 2, value);
393
+ };
394
+
395
+
396
+ /**
397
+ * Clears the field making it undefined.
398
+ * @return {!proto.MayachainGetAddress} returns this
399
+ */
400
+ proto.MayachainGetAddress.prototype.clearShowDisplay = function() {
401
+ return jspb.Message.setField(this, 2, undefined);
402
+ };
403
+
404
+
405
+ /**
406
+ * Returns whether this field is set.
407
+ * @return {boolean}
408
+ */
409
+ proto.MayachainGetAddress.prototype.hasShowDisplay = function() {
410
+ return jspb.Message.getField(this, 2) != null;
411
+ };
412
+
413
+
414
+ /**
415
+ * optional bool testnet = 3;
416
+ * @return {boolean}
417
+ */
418
+ proto.MayachainGetAddress.prototype.getTestnet = function() {
419
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
420
+ };
421
+
422
+
423
+ /**
424
+ * @param {boolean} value
425
+ * @return {!proto.MayachainGetAddress} returns this
426
+ */
427
+ proto.MayachainGetAddress.prototype.setTestnet = function(value) {
428
+ return jspb.Message.setField(this, 3, value);
429
+ };
430
+
431
+
432
+ /**
433
+ * Clears the field making it undefined.
434
+ * @return {!proto.MayachainGetAddress} returns this
435
+ */
436
+ proto.MayachainGetAddress.prototype.clearTestnet = function() {
437
+ return jspb.Message.setField(this, 3, undefined);
438
+ };
439
+
440
+
441
+ /**
442
+ * Returns whether this field is set.
443
+ * @return {boolean}
444
+ */
445
+ proto.MayachainGetAddress.prototype.hasTestnet = function() {
446
+ return jspb.Message.getField(this, 3) != null;
447
+ };
448
+
449
+
450
+
451
+
452
+
453
+ if (jspb.Message.GENERATE_TO_OBJECT) {
454
+ /**
455
+ * Creates an object representation of this proto.
456
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
457
+ * Optional fields that are not set will be set to undefined.
458
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
459
+ * For the list of reserved names please see:
460
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
461
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
462
+ * JSPB instance for transitional soy proto support:
463
+ * http://goto/soy-param-migration
464
+ * @return {!Object}
465
+ */
466
+ proto.MayachainAddress.prototype.toObject = function(opt_includeInstance) {
467
+ return proto.MayachainAddress.toObject(opt_includeInstance, this);
468
+ };
469
+
470
+
471
+ /**
472
+ * Static version of the {@see toObject} method.
473
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
474
+ * the JSPB instance for transitional soy proto support:
475
+ * http://goto/soy-param-migration
476
+ * @param {!proto.MayachainAddress} msg The msg instance to transform.
477
+ * @return {!Object}
478
+ * @suppress {unusedLocalVariables} f is only used for nested messages
479
+ */
480
+ proto.MayachainAddress.toObject = function(includeInstance, msg) {
481
+ var f, obj = {
482
+ address: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f
483
+ };
484
+
485
+ if (includeInstance) {
486
+ obj.$jspbMessageInstance = msg;
487
+ }
488
+ return obj;
489
+ };
490
+ }
491
+
492
+
493
+ /**
494
+ * Deserializes binary data (in protobuf wire format).
495
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
496
+ * @return {!proto.MayachainAddress}
497
+ */
498
+ proto.MayachainAddress.deserializeBinary = function(bytes) {
499
+ var reader = new jspb.BinaryReader(bytes);
500
+ var msg = new proto.MayachainAddress;
501
+ return proto.MayachainAddress.deserializeBinaryFromReader(msg, reader);
502
+ };
503
+
504
+
505
+ /**
506
+ * Deserializes binary data (in protobuf wire format) from the
507
+ * given reader into the given message object.
508
+ * @param {!proto.MayachainAddress} msg The message object to deserialize into.
509
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
510
+ * @return {!proto.MayachainAddress}
511
+ */
512
+ proto.MayachainAddress.deserializeBinaryFromReader = function(msg, reader) {
513
+ while (reader.nextField()) {
514
+ if (reader.isEndGroup()) {
515
+ break;
516
+ }
517
+ var field = reader.getFieldNumber();
518
+ switch (field) {
519
+ case 1:
520
+ var value = /** @type {string} */ (reader.readString());
521
+ msg.setAddress(value);
522
+ break;
523
+ default:
524
+ reader.skipField();
525
+ break;
526
+ }
527
+ }
528
+ return msg;
529
+ };
530
+
531
+
532
+ /**
533
+ * Serializes the message to binary data (in protobuf wire format).
534
+ * @return {!Uint8Array}
535
+ */
536
+ proto.MayachainAddress.prototype.serializeBinary = function() {
537
+ var writer = new jspb.BinaryWriter();
538
+ proto.MayachainAddress.serializeBinaryToWriter(this, writer);
539
+ return writer.getResultBuffer();
540
+ };
541
+
542
+
543
+ /**
544
+ * Serializes the given message to binary data (in protobuf wire
545
+ * format), writing to the given BinaryWriter.
546
+ * @param {!proto.MayachainAddress} message
547
+ * @param {!jspb.BinaryWriter} writer
548
+ * @suppress {unusedLocalVariables} f is only used for nested messages
549
+ */
550
+ proto.MayachainAddress.serializeBinaryToWriter = function(message, writer) {
551
+ var f = undefined;
552
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
553
+ if (f != null) {
554
+ writer.writeString(
555
+ 1,
556
+ f
557
+ );
558
+ }
559
+ };
560
+
561
+
562
+ /**
563
+ * optional string address = 1;
564
+ * @return {string}
565
+ */
566
+ proto.MayachainAddress.prototype.getAddress = function() {
567
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
568
+ };
569
+
570
+
571
+ /**
572
+ * @param {string} value
573
+ * @return {!proto.MayachainAddress} returns this
574
+ */
575
+ proto.MayachainAddress.prototype.setAddress = function(value) {
576
+ return jspb.Message.setField(this, 1, value);
577
+ };
578
+
579
+
580
+ /**
581
+ * Clears the field making it undefined.
582
+ * @return {!proto.MayachainAddress} returns this
583
+ */
584
+ proto.MayachainAddress.prototype.clearAddress = function() {
585
+ return jspb.Message.setField(this, 1, undefined);
586
+ };
587
+
588
+
589
+ /**
590
+ * Returns whether this field is set.
591
+ * @return {boolean}
592
+ */
593
+ proto.MayachainAddress.prototype.hasAddress = function() {
594
+ return jspb.Message.getField(this, 1) != null;
595
+ };
596
+
597
+
598
+
599
+ /**
600
+ * List of repeated fields within this message type.
601
+ * @private {!Array<number>}
602
+ * @const
603
+ */
604
+ proto.MayachainSignTx.repeatedFields_ = [1];
605
+
606
+
607
+
608
+ if (jspb.Message.GENERATE_TO_OBJECT) {
609
+ /**
610
+ * Creates an object representation of this proto.
611
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
612
+ * Optional fields that are not set will be set to undefined.
613
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
614
+ * For the list of reserved names please see:
615
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
616
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
617
+ * JSPB instance for transitional soy proto support:
618
+ * http://goto/soy-param-migration
619
+ * @return {!Object}
620
+ */
621
+ proto.MayachainSignTx.prototype.toObject = function(opt_includeInstance) {
622
+ return proto.MayachainSignTx.toObject(opt_includeInstance, this);
623
+ };
624
+
625
+
626
+ /**
627
+ * Static version of the {@see toObject} method.
628
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
629
+ * the JSPB instance for transitional soy proto support:
630
+ * http://goto/soy-param-migration
631
+ * @param {!proto.MayachainSignTx} msg The msg instance to transform.
632
+ * @return {!Object}
633
+ * @suppress {unusedLocalVariables} f is only used for nested messages
634
+ */
635
+ proto.MayachainSignTx.toObject = function(includeInstance, msg) {
636
+ var f, obj = {
637
+ addressNList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
638
+ accountNumber: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
639
+ chainId: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
640
+ feeAmount: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
641
+ gas: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
642
+ memo: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f,
643
+ sequence: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
644
+ msgCount: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f,
645
+ testnet: (f = jspb.Message.getBooleanField(msg, 9)) == null ? undefined : f
646
+ };
647
+
648
+ if (includeInstance) {
649
+ obj.$jspbMessageInstance = msg;
650
+ }
651
+ return obj;
652
+ };
653
+ }
654
+
655
+
656
+ /**
657
+ * Deserializes binary data (in protobuf wire format).
658
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
659
+ * @return {!proto.MayachainSignTx}
660
+ */
661
+ proto.MayachainSignTx.deserializeBinary = function(bytes) {
662
+ var reader = new jspb.BinaryReader(bytes);
663
+ var msg = new proto.MayachainSignTx;
664
+ return proto.MayachainSignTx.deserializeBinaryFromReader(msg, reader);
665
+ };
666
+
667
+
668
+ /**
669
+ * Deserializes binary data (in protobuf wire format) from the
670
+ * given reader into the given message object.
671
+ * @param {!proto.MayachainSignTx} msg The message object to deserialize into.
672
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
673
+ * @return {!proto.MayachainSignTx}
674
+ */
675
+ proto.MayachainSignTx.deserializeBinaryFromReader = function(msg, reader) {
676
+ while (reader.nextField()) {
677
+ if (reader.isEndGroup()) {
678
+ break;
679
+ }
680
+ var field = reader.getFieldNumber();
681
+ switch (field) {
682
+ case 1:
683
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]);
684
+ for (var i = 0; i < values.length; i++) {
685
+ msg.addAddressN(values[i]);
686
+ }
687
+ break;
688
+ case 2:
689
+ var value = /** @type {string} */ (reader.readUint64String());
690
+ msg.setAccountNumber(value);
691
+ break;
692
+ case 3:
693
+ var value = /** @type {string} */ (reader.readString());
694
+ msg.setChainId(value);
695
+ break;
696
+ case 4:
697
+ var value = /** @type {number} */ (reader.readUint32());
698
+ msg.setFeeAmount(value);
699
+ break;
700
+ case 5:
701
+ var value = /** @type {number} */ (reader.readUint32());
702
+ msg.setGas(value);
703
+ break;
704
+ case 6:
705
+ var value = /** @type {string} */ (reader.readString());
706
+ msg.setMemo(value);
707
+ break;
708
+ case 7:
709
+ var value = /** @type {string} */ (reader.readUint64String());
710
+ msg.setSequence(value);
711
+ break;
712
+ case 8:
713
+ var value = /** @type {number} */ (reader.readUint32());
714
+ msg.setMsgCount(value);
715
+ break;
716
+ case 9:
717
+ var value = /** @type {boolean} */ (reader.readBool());
718
+ msg.setTestnet(value);
719
+ break;
720
+ default:
721
+ reader.skipField();
722
+ break;
723
+ }
724
+ }
725
+ return msg;
726
+ };
727
+
728
+
729
+ /**
730
+ * Serializes the message to binary data (in protobuf wire format).
731
+ * @return {!Uint8Array}
732
+ */
733
+ proto.MayachainSignTx.prototype.serializeBinary = function() {
734
+ var writer = new jspb.BinaryWriter();
735
+ proto.MayachainSignTx.serializeBinaryToWriter(this, writer);
736
+ return writer.getResultBuffer();
737
+ };
738
+
739
+
740
+ /**
741
+ * Serializes the given message to binary data (in protobuf wire
742
+ * format), writing to the given BinaryWriter.
743
+ * @param {!proto.MayachainSignTx} message
744
+ * @param {!jspb.BinaryWriter} writer
745
+ * @suppress {unusedLocalVariables} f is only used for nested messages
746
+ */
747
+ proto.MayachainSignTx.serializeBinaryToWriter = function(message, writer) {
748
+ var f = undefined;
749
+ f = message.getAddressNList();
750
+ if (f.length > 0) {
751
+ writer.writeRepeatedUint32(
752
+ 1,
753
+ f
754
+ );
755
+ }
756
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
757
+ if (f != null) {
758
+ writer.writeUint64String(
759
+ 2,
760
+ f
761
+ );
762
+ }
763
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
764
+ if (f != null) {
765
+ writer.writeString(
766
+ 3,
767
+ f
768
+ );
769
+ }
770
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
771
+ if (f != null) {
772
+ writer.writeUint32(
773
+ 4,
774
+ f
775
+ );
776
+ }
777
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
778
+ if (f != null) {
779
+ writer.writeUint32(
780
+ 5,
781
+ f
782
+ );
783
+ }
784
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
785
+ if (f != null) {
786
+ writer.writeString(
787
+ 6,
788
+ f
789
+ );
790
+ }
791
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
792
+ if (f != null) {
793
+ writer.writeUint64String(
794
+ 7,
795
+ f
796
+ );
797
+ }
798
+ f = /** @type {number} */ (jspb.Message.getField(message, 8));
799
+ if (f != null) {
800
+ writer.writeUint32(
801
+ 8,
802
+ f
803
+ );
804
+ }
805
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 9));
806
+ if (f != null) {
807
+ writer.writeBool(
808
+ 9,
809
+ f
810
+ );
811
+ }
812
+ };
813
+
814
+
815
+ /**
816
+ * repeated uint32 address_n = 1;
817
+ * @return {!Array<number>}
818
+ */
819
+ proto.MayachainSignTx.prototype.getAddressNList = function() {
820
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 1));
821
+ };
822
+
823
+
824
+ /**
825
+ * @param {!Array<number>} value
826
+ * @return {!proto.MayachainSignTx} returns this
827
+ */
828
+ proto.MayachainSignTx.prototype.setAddressNList = function(value) {
829
+ return jspb.Message.setField(this, 1, value || []);
830
+ };
831
+
832
+
833
+ /**
834
+ * @param {number} value
835
+ * @param {number=} opt_index
836
+ * @return {!proto.MayachainSignTx} returns this
837
+ */
838
+ proto.MayachainSignTx.prototype.addAddressN = function(value, opt_index) {
839
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
840
+ };
841
+
842
+
843
+ /**
844
+ * Clears the list making it empty but non-null.
845
+ * @return {!proto.MayachainSignTx} returns this
846
+ */
847
+ proto.MayachainSignTx.prototype.clearAddressNList = function() {
848
+ return this.setAddressNList([]);
849
+ };
850
+
851
+
852
+ /**
853
+ * optional uint64 account_number = 2;
854
+ * @return {string}
855
+ */
856
+ proto.MayachainSignTx.prototype.getAccountNumber = function() {
857
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0"));
858
+ };
859
+
860
+
861
+ /**
862
+ * @param {string} value
863
+ * @return {!proto.MayachainSignTx} returns this
864
+ */
865
+ proto.MayachainSignTx.prototype.setAccountNumber = function(value) {
866
+ return jspb.Message.setField(this, 2, value);
867
+ };
868
+
869
+
870
+ /**
871
+ * Clears the field making it undefined.
872
+ * @return {!proto.MayachainSignTx} returns this
873
+ */
874
+ proto.MayachainSignTx.prototype.clearAccountNumber = function() {
875
+ return jspb.Message.setField(this, 2, undefined);
876
+ };
877
+
878
+
879
+ /**
880
+ * Returns whether this field is set.
881
+ * @return {boolean}
882
+ */
883
+ proto.MayachainSignTx.prototype.hasAccountNumber = function() {
884
+ return jspb.Message.getField(this, 2) != null;
885
+ };
886
+
887
+
888
+ /**
889
+ * optional string chain_id = 3;
890
+ * @return {string}
891
+ */
892
+ proto.MayachainSignTx.prototype.getChainId = function() {
893
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
894
+ };
895
+
896
+
897
+ /**
898
+ * @param {string} value
899
+ * @return {!proto.MayachainSignTx} returns this
900
+ */
901
+ proto.MayachainSignTx.prototype.setChainId = function(value) {
902
+ return jspb.Message.setField(this, 3, value);
903
+ };
904
+
905
+
906
+ /**
907
+ * Clears the field making it undefined.
908
+ * @return {!proto.MayachainSignTx} returns this
909
+ */
910
+ proto.MayachainSignTx.prototype.clearChainId = function() {
911
+ return jspb.Message.setField(this, 3, undefined);
912
+ };
913
+
914
+
915
+ /**
916
+ * Returns whether this field is set.
917
+ * @return {boolean}
918
+ */
919
+ proto.MayachainSignTx.prototype.hasChainId = function() {
920
+ return jspb.Message.getField(this, 3) != null;
921
+ };
922
+
923
+
924
+ /**
925
+ * optional uint32 fee_amount = 4;
926
+ * @return {number}
927
+ */
928
+ proto.MayachainSignTx.prototype.getFeeAmount = function() {
929
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
930
+ };
931
+
932
+
933
+ /**
934
+ * @param {number} value
935
+ * @return {!proto.MayachainSignTx} returns this
936
+ */
937
+ proto.MayachainSignTx.prototype.setFeeAmount = function(value) {
938
+ return jspb.Message.setField(this, 4, value);
939
+ };
940
+
941
+
942
+ /**
943
+ * Clears the field making it undefined.
944
+ * @return {!proto.MayachainSignTx} returns this
945
+ */
946
+ proto.MayachainSignTx.prototype.clearFeeAmount = function() {
947
+ return jspb.Message.setField(this, 4, undefined);
948
+ };
949
+
950
+
951
+ /**
952
+ * Returns whether this field is set.
953
+ * @return {boolean}
954
+ */
955
+ proto.MayachainSignTx.prototype.hasFeeAmount = function() {
956
+ return jspb.Message.getField(this, 4) != null;
957
+ };
958
+
959
+
960
+ /**
961
+ * optional uint32 gas = 5;
962
+ * @return {number}
963
+ */
964
+ proto.MayachainSignTx.prototype.getGas = function() {
965
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
966
+ };
967
+
968
+
969
+ /**
970
+ * @param {number} value
971
+ * @return {!proto.MayachainSignTx} returns this
972
+ */
973
+ proto.MayachainSignTx.prototype.setGas = function(value) {
974
+ return jspb.Message.setField(this, 5, value);
975
+ };
976
+
977
+
978
+ /**
979
+ * Clears the field making it undefined.
980
+ * @return {!proto.MayachainSignTx} returns this
981
+ */
982
+ proto.MayachainSignTx.prototype.clearGas = function() {
983
+ return jspb.Message.setField(this, 5, undefined);
984
+ };
985
+
986
+
987
+ /**
988
+ * Returns whether this field is set.
989
+ * @return {boolean}
990
+ */
991
+ proto.MayachainSignTx.prototype.hasGas = function() {
992
+ return jspb.Message.getField(this, 5) != null;
993
+ };
994
+
995
+
996
+ /**
997
+ * optional string memo = 6;
998
+ * @return {string}
999
+ */
1000
+ proto.MayachainSignTx.prototype.getMemo = function() {
1001
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1002
+ };
1003
+
1004
+
1005
+ /**
1006
+ * @param {string} value
1007
+ * @return {!proto.MayachainSignTx} returns this
1008
+ */
1009
+ proto.MayachainSignTx.prototype.setMemo = function(value) {
1010
+ return jspb.Message.setField(this, 6, value);
1011
+ };
1012
+
1013
+
1014
+ /**
1015
+ * Clears the field making it undefined.
1016
+ * @return {!proto.MayachainSignTx} returns this
1017
+ */
1018
+ proto.MayachainSignTx.prototype.clearMemo = function() {
1019
+ return jspb.Message.setField(this, 6, undefined);
1020
+ };
1021
+
1022
+
1023
+ /**
1024
+ * Returns whether this field is set.
1025
+ * @return {boolean}
1026
+ */
1027
+ proto.MayachainSignTx.prototype.hasMemo = function() {
1028
+ return jspb.Message.getField(this, 6) != null;
1029
+ };
1030
+
1031
+
1032
+ /**
1033
+ * optional uint64 sequence = 7;
1034
+ * @return {string}
1035
+ */
1036
+ proto.MayachainSignTx.prototype.getSequence = function() {
1037
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0"));
1038
+ };
1039
+
1040
+
1041
+ /**
1042
+ * @param {string} value
1043
+ * @return {!proto.MayachainSignTx} returns this
1044
+ */
1045
+ proto.MayachainSignTx.prototype.setSequence = function(value) {
1046
+ return jspb.Message.setField(this, 7, value);
1047
+ };
1048
+
1049
+
1050
+ /**
1051
+ * Clears the field making it undefined.
1052
+ * @return {!proto.MayachainSignTx} returns this
1053
+ */
1054
+ proto.MayachainSignTx.prototype.clearSequence = function() {
1055
+ return jspb.Message.setField(this, 7, undefined);
1056
+ };
1057
+
1058
+
1059
+ /**
1060
+ * Returns whether this field is set.
1061
+ * @return {boolean}
1062
+ */
1063
+ proto.MayachainSignTx.prototype.hasSequence = function() {
1064
+ return jspb.Message.getField(this, 7) != null;
1065
+ };
1066
+
1067
+
1068
+ /**
1069
+ * optional uint32 msg_count = 8;
1070
+ * @return {number}
1071
+ */
1072
+ proto.MayachainSignTx.prototype.getMsgCount = function() {
1073
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1074
+ };
1075
+
1076
+
1077
+ /**
1078
+ * @param {number} value
1079
+ * @return {!proto.MayachainSignTx} returns this
1080
+ */
1081
+ proto.MayachainSignTx.prototype.setMsgCount = function(value) {
1082
+ return jspb.Message.setField(this, 8, value);
1083
+ };
1084
+
1085
+
1086
+ /**
1087
+ * Clears the field making it undefined.
1088
+ * @return {!proto.MayachainSignTx} returns this
1089
+ */
1090
+ proto.MayachainSignTx.prototype.clearMsgCount = function() {
1091
+ return jspb.Message.setField(this, 8, undefined);
1092
+ };
1093
+
1094
+
1095
+ /**
1096
+ * Returns whether this field is set.
1097
+ * @return {boolean}
1098
+ */
1099
+ proto.MayachainSignTx.prototype.hasMsgCount = function() {
1100
+ return jspb.Message.getField(this, 8) != null;
1101
+ };
1102
+
1103
+
1104
+ /**
1105
+ * optional bool testnet = 9;
1106
+ * @return {boolean}
1107
+ */
1108
+ proto.MayachainSignTx.prototype.getTestnet = function() {
1109
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
1110
+ };
1111
+
1112
+
1113
+ /**
1114
+ * @param {boolean} value
1115
+ * @return {!proto.MayachainSignTx} returns this
1116
+ */
1117
+ proto.MayachainSignTx.prototype.setTestnet = function(value) {
1118
+ return jspb.Message.setField(this, 9, value);
1119
+ };
1120
+
1121
+
1122
+ /**
1123
+ * Clears the field making it undefined.
1124
+ * @return {!proto.MayachainSignTx} returns this
1125
+ */
1126
+ proto.MayachainSignTx.prototype.clearTestnet = function() {
1127
+ return jspb.Message.setField(this, 9, undefined);
1128
+ };
1129
+
1130
+
1131
+ /**
1132
+ * Returns whether this field is set.
1133
+ * @return {boolean}
1134
+ */
1135
+ proto.MayachainSignTx.prototype.hasTestnet = function() {
1136
+ return jspb.Message.getField(this, 9) != null;
1137
+ };
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1144
+ /**
1145
+ * Creates an object representation of this proto.
1146
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1147
+ * Optional fields that are not set will be set to undefined.
1148
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1149
+ * For the list of reserved names please see:
1150
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1151
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1152
+ * JSPB instance for transitional soy proto support:
1153
+ * http://goto/soy-param-migration
1154
+ * @return {!Object}
1155
+ */
1156
+ proto.MayachainMsgRequest.prototype.toObject = function(opt_includeInstance) {
1157
+ return proto.MayachainMsgRequest.toObject(opt_includeInstance, this);
1158
+ };
1159
+
1160
+
1161
+ /**
1162
+ * Static version of the {@see toObject} method.
1163
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1164
+ * the JSPB instance for transitional soy proto support:
1165
+ * http://goto/soy-param-migration
1166
+ * @param {!proto.MayachainMsgRequest} msg The msg instance to transform.
1167
+ * @return {!Object}
1168
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1169
+ */
1170
+ proto.MayachainMsgRequest.toObject = function(includeInstance, msg) {
1171
+ var f, obj = {
1172
+
1173
+ };
1174
+
1175
+ if (includeInstance) {
1176
+ obj.$jspbMessageInstance = msg;
1177
+ }
1178
+ return obj;
1179
+ };
1180
+ }
1181
+
1182
+
1183
+ /**
1184
+ * Deserializes binary data (in protobuf wire format).
1185
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1186
+ * @return {!proto.MayachainMsgRequest}
1187
+ */
1188
+ proto.MayachainMsgRequest.deserializeBinary = function(bytes) {
1189
+ var reader = new jspb.BinaryReader(bytes);
1190
+ var msg = new proto.MayachainMsgRequest;
1191
+ return proto.MayachainMsgRequest.deserializeBinaryFromReader(msg, reader);
1192
+ };
1193
+
1194
+
1195
+ /**
1196
+ * Deserializes binary data (in protobuf wire format) from the
1197
+ * given reader into the given message object.
1198
+ * @param {!proto.MayachainMsgRequest} msg The message object to deserialize into.
1199
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1200
+ * @return {!proto.MayachainMsgRequest}
1201
+ */
1202
+ proto.MayachainMsgRequest.deserializeBinaryFromReader = function(msg, reader) {
1203
+ while (reader.nextField()) {
1204
+ if (reader.isEndGroup()) {
1205
+ break;
1206
+ }
1207
+ var field = reader.getFieldNumber();
1208
+ switch (field) {
1209
+ default:
1210
+ reader.skipField();
1211
+ break;
1212
+ }
1213
+ }
1214
+ return msg;
1215
+ };
1216
+
1217
+
1218
+ /**
1219
+ * Serializes the message to binary data (in protobuf wire format).
1220
+ * @return {!Uint8Array}
1221
+ */
1222
+ proto.MayachainMsgRequest.prototype.serializeBinary = function() {
1223
+ var writer = new jspb.BinaryWriter();
1224
+ proto.MayachainMsgRequest.serializeBinaryToWriter(this, writer);
1225
+ return writer.getResultBuffer();
1226
+ };
1227
+
1228
+
1229
+ /**
1230
+ * Serializes the given message to binary data (in protobuf wire
1231
+ * format), writing to the given BinaryWriter.
1232
+ * @param {!proto.MayachainMsgRequest} message
1233
+ * @param {!jspb.BinaryWriter} writer
1234
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1235
+ */
1236
+ proto.MayachainMsgRequest.serializeBinaryToWriter = function(message, writer) {
1237
+ var f = undefined;
1238
+ };
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1245
+ /**
1246
+ * Creates an object representation of this proto.
1247
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1248
+ * Optional fields that are not set will be set to undefined.
1249
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1250
+ * For the list of reserved names please see:
1251
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1252
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1253
+ * JSPB instance for transitional soy proto support:
1254
+ * http://goto/soy-param-migration
1255
+ * @return {!Object}
1256
+ */
1257
+ proto.MayachainMsgAck.prototype.toObject = function(opt_includeInstance) {
1258
+ return proto.MayachainMsgAck.toObject(opt_includeInstance, this);
1259
+ };
1260
+
1261
+
1262
+ /**
1263
+ * Static version of the {@see toObject} method.
1264
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1265
+ * the JSPB instance for transitional soy proto support:
1266
+ * http://goto/soy-param-migration
1267
+ * @param {!proto.MayachainMsgAck} msg The msg instance to transform.
1268
+ * @return {!Object}
1269
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1270
+ */
1271
+ proto.MayachainMsgAck.toObject = function(includeInstance, msg) {
1272
+ var f, obj = {
1273
+ send: (f = msg.getSend()) && proto.MayachainMsgSend.toObject(includeInstance, f),
1274
+ deposit: (f = msg.getDeposit()) && proto.MayachainMsgDeposit.toObject(includeInstance, f)
1275
+ };
1276
+
1277
+ if (includeInstance) {
1278
+ obj.$jspbMessageInstance = msg;
1279
+ }
1280
+ return obj;
1281
+ };
1282
+ }
1283
+
1284
+
1285
+ /**
1286
+ * Deserializes binary data (in protobuf wire format).
1287
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1288
+ * @return {!proto.MayachainMsgAck}
1289
+ */
1290
+ proto.MayachainMsgAck.deserializeBinary = function(bytes) {
1291
+ var reader = new jspb.BinaryReader(bytes);
1292
+ var msg = new proto.MayachainMsgAck;
1293
+ return proto.MayachainMsgAck.deserializeBinaryFromReader(msg, reader);
1294
+ };
1295
+
1296
+
1297
+ /**
1298
+ * Deserializes binary data (in protobuf wire format) from the
1299
+ * given reader into the given message object.
1300
+ * @param {!proto.MayachainMsgAck} msg The message object to deserialize into.
1301
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1302
+ * @return {!proto.MayachainMsgAck}
1303
+ */
1304
+ proto.MayachainMsgAck.deserializeBinaryFromReader = function(msg, reader) {
1305
+ while (reader.nextField()) {
1306
+ if (reader.isEndGroup()) {
1307
+ break;
1308
+ }
1309
+ var field = reader.getFieldNumber();
1310
+ switch (field) {
1311
+ case 1:
1312
+ var value = new proto.MayachainMsgSend;
1313
+ reader.readMessage(value,proto.MayachainMsgSend.deserializeBinaryFromReader);
1314
+ msg.setSend(value);
1315
+ break;
1316
+ case 2:
1317
+ var value = new proto.MayachainMsgDeposit;
1318
+ reader.readMessage(value,proto.MayachainMsgDeposit.deserializeBinaryFromReader);
1319
+ msg.setDeposit(value);
1320
+ break;
1321
+ default:
1322
+ reader.skipField();
1323
+ break;
1324
+ }
1325
+ }
1326
+ return msg;
1327
+ };
1328
+
1329
+
1330
+ /**
1331
+ * Serializes the message to binary data (in protobuf wire format).
1332
+ * @return {!Uint8Array}
1333
+ */
1334
+ proto.MayachainMsgAck.prototype.serializeBinary = function() {
1335
+ var writer = new jspb.BinaryWriter();
1336
+ proto.MayachainMsgAck.serializeBinaryToWriter(this, writer);
1337
+ return writer.getResultBuffer();
1338
+ };
1339
+
1340
+
1341
+ /**
1342
+ * Serializes the given message to binary data (in protobuf wire
1343
+ * format), writing to the given BinaryWriter.
1344
+ * @param {!proto.MayachainMsgAck} message
1345
+ * @param {!jspb.BinaryWriter} writer
1346
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1347
+ */
1348
+ proto.MayachainMsgAck.serializeBinaryToWriter = function(message, writer) {
1349
+ var f = undefined;
1350
+ f = message.getSend();
1351
+ if (f != null) {
1352
+ writer.writeMessage(
1353
+ 1,
1354
+ f,
1355
+ proto.MayachainMsgSend.serializeBinaryToWriter
1356
+ );
1357
+ }
1358
+ f = message.getDeposit();
1359
+ if (f != null) {
1360
+ writer.writeMessage(
1361
+ 2,
1362
+ f,
1363
+ proto.MayachainMsgDeposit.serializeBinaryToWriter
1364
+ );
1365
+ }
1366
+ };
1367
+
1368
+
1369
+ /**
1370
+ * optional MayachainMsgSend send = 1;
1371
+ * @return {?proto.MayachainMsgSend}
1372
+ */
1373
+ proto.MayachainMsgAck.prototype.getSend = function() {
1374
+ return /** @type{?proto.MayachainMsgSend} */ (
1375
+ jspb.Message.getWrapperField(this, proto.MayachainMsgSend, 1));
1376
+ };
1377
+
1378
+
1379
+ /**
1380
+ * @param {?proto.MayachainMsgSend|undefined} value
1381
+ * @return {!proto.MayachainMsgAck} returns this
1382
+ */
1383
+ proto.MayachainMsgAck.prototype.setSend = function(value) {
1384
+ return jspb.Message.setWrapperField(this, 1, value);
1385
+ };
1386
+
1387
+
1388
+ /**
1389
+ * Clears the message field making it undefined.
1390
+ * @return {!proto.MayachainMsgAck} returns this
1391
+ */
1392
+ proto.MayachainMsgAck.prototype.clearSend = function() {
1393
+ return this.setSend(undefined);
1394
+ };
1395
+
1396
+
1397
+ /**
1398
+ * Returns whether this field is set.
1399
+ * @return {boolean}
1400
+ */
1401
+ proto.MayachainMsgAck.prototype.hasSend = function() {
1402
+ return jspb.Message.getField(this, 1) != null;
1403
+ };
1404
+
1405
+
1406
+ /**
1407
+ * optional MayachainMsgDeposit deposit = 2;
1408
+ * @return {?proto.MayachainMsgDeposit}
1409
+ */
1410
+ proto.MayachainMsgAck.prototype.getDeposit = function() {
1411
+ return /** @type{?proto.MayachainMsgDeposit} */ (
1412
+ jspb.Message.getWrapperField(this, proto.MayachainMsgDeposit, 2));
1413
+ };
1414
+
1415
+
1416
+ /**
1417
+ * @param {?proto.MayachainMsgDeposit|undefined} value
1418
+ * @return {!proto.MayachainMsgAck} returns this
1419
+ */
1420
+ proto.MayachainMsgAck.prototype.setDeposit = function(value) {
1421
+ return jspb.Message.setWrapperField(this, 2, value);
1422
+ };
1423
+
1424
+
1425
+ /**
1426
+ * Clears the message field making it undefined.
1427
+ * @return {!proto.MayachainMsgAck} returns this
1428
+ */
1429
+ proto.MayachainMsgAck.prototype.clearDeposit = function() {
1430
+ return this.setDeposit(undefined);
1431
+ };
1432
+
1433
+
1434
+ /**
1435
+ * Returns whether this field is set.
1436
+ * @return {boolean}
1437
+ */
1438
+ proto.MayachainMsgAck.prototype.hasDeposit = function() {
1439
+ return jspb.Message.getField(this, 2) != null;
1440
+ };
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1447
+ /**
1448
+ * Creates an object representation of this proto.
1449
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1450
+ * Optional fields that are not set will be set to undefined.
1451
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1452
+ * For the list of reserved names please see:
1453
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1454
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1455
+ * JSPB instance for transitional soy proto support:
1456
+ * http://goto/soy-param-migration
1457
+ * @return {!Object}
1458
+ */
1459
+ proto.MayachainMsgSend.prototype.toObject = function(opt_includeInstance) {
1460
+ return proto.MayachainMsgSend.toObject(opt_includeInstance, this);
1461
+ };
1462
+
1463
+
1464
+ /**
1465
+ * Static version of the {@see toObject} method.
1466
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1467
+ * the JSPB instance for transitional soy proto support:
1468
+ * http://goto/soy-param-migration
1469
+ * @param {!proto.MayachainMsgSend} msg The msg instance to transform.
1470
+ * @return {!Object}
1471
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1472
+ */
1473
+ proto.MayachainMsgSend.toObject = function(includeInstance, msg) {
1474
+ var f, obj = {
1475
+ fromAddress: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f,
1476
+ toAddress: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
1477
+ amount: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f,
1478
+ addressType: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f
1479
+ };
1480
+
1481
+ if (includeInstance) {
1482
+ obj.$jspbMessageInstance = msg;
1483
+ }
1484
+ return obj;
1485
+ };
1486
+ }
1487
+
1488
+
1489
+ /**
1490
+ * Deserializes binary data (in protobuf wire format).
1491
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1492
+ * @return {!proto.MayachainMsgSend}
1493
+ */
1494
+ proto.MayachainMsgSend.deserializeBinary = function(bytes) {
1495
+ var reader = new jspb.BinaryReader(bytes);
1496
+ var msg = new proto.MayachainMsgSend;
1497
+ return proto.MayachainMsgSend.deserializeBinaryFromReader(msg, reader);
1498
+ };
1499
+
1500
+
1501
+ /**
1502
+ * Deserializes binary data (in protobuf wire format) from the
1503
+ * given reader into the given message object.
1504
+ * @param {!proto.MayachainMsgSend} msg The message object to deserialize into.
1505
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1506
+ * @return {!proto.MayachainMsgSend}
1507
+ */
1508
+ proto.MayachainMsgSend.deserializeBinaryFromReader = function(msg, reader) {
1509
+ while (reader.nextField()) {
1510
+ if (reader.isEndGroup()) {
1511
+ break;
1512
+ }
1513
+ var field = reader.getFieldNumber();
1514
+ switch (field) {
1515
+ case 6:
1516
+ var value = /** @type {string} */ (reader.readString());
1517
+ msg.setFromAddress(value);
1518
+ break;
1519
+ case 7:
1520
+ var value = /** @type {string} */ (reader.readString());
1521
+ msg.setToAddress(value);
1522
+ break;
1523
+ case 8:
1524
+ var value = /** @type {string} */ (reader.readUint64String());
1525
+ msg.setAmount(value);
1526
+ break;
1527
+ case 9:
1528
+ var value = /** @type {!proto.OutputAddressType} */ (reader.readEnum());
1529
+ msg.setAddressType(value);
1530
+ break;
1531
+ default:
1532
+ reader.skipField();
1533
+ break;
1534
+ }
1535
+ }
1536
+ return msg;
1537
+ };
1538
+
1539
+
1540
+ /**
1541
+ * Serializes the message to binary data (in protobuf wire format).
1542
+ * @return {!Uint8Array}
1543
+ */
1544
+ proto.MayachainMsgSend.prototype.serializeBinary = function() {
1545
+ var writer = new jspb.BinaryWriter();
1546
+ proto.MayachainMsgSend.serializeBinaryToWriter(this, writer);
1547
+ return writer.getResultBuffer();
1548
+ };
1549
+
1550
+
1551
+ /**
1552
+ * Serializes the given message to binary data (in protobuf wire
1553
+ * format), writing to the given BinaryWriter.
1554
+ * @param {!proto.MayachainMsgSend} message
1555
+ * @param {!jspb.BinaryWriter} writer
1556
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1557
+ */
1558
+ proto.MayachainMsgSend.serializeBinaryToWriter = function(message, writer) {
1559
+ var f = undefined;
1560
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
1561
+ if (f != null) {
1562
+ writer.writeString(
1563
+ 6,
1564
+ f
1565
+ );
1566
+ }
1567
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
1568
+ if (f != null) {
1569
+ writer.writeString(
1570
+ 7,
1571
+ f
1572
+ );
1573
+ }
1574
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
1575
+ if (f != null) {
1576
+ writer.writeUint64String(
1577
+ 8,
1578
+ f
1579
+ );
1580
+ }
1581
+ f = /** @type {!proto.OutputAddressType} */ (jspb.Message.getField(message, 9));
1582
+ if (f != null) {
1583
+ writer.writeEnum(
1584
+ 9,
1585
+ f
1586
+ );
1587
+ }
1588
+ };
1589
+
1590
+
1591
+ /**
1592
+ * optional string from_address = 6;
1593
+ * @return {string}
1594
+ */
1595
+ proto.MayachainMsgSend.prototype.getFromAddress = function() {
1596
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1597
+ };
1598
+
1599
+
1600
+ /**
1601
+ * @param {string} value
1602
+ * @return {!proto.MayachainMsgSend} returns this
1603
+ */
1604
+ proto.MayachainMsgSend.prototype.setFromAddress = function(value) {
1605
+ return jspb.Message.setField(this, 6, value);
1606
+ };
1607
+
1608
+
1609
+ /**
1610
+ * Clears the field making it undefined.
1611
+ * @return {!proto.MayachainMsgSend} returns this
1612
+ */
1613
+ proto.MayachainMsgSend.prototype.clearFromAddress = function() {
1614
+ return jspb.Message.setField(this, 6, undefined);
1615
+ };
1616
+
1617
+
1618
+ /**
1619
+ * Returns whether this field is set.
1620
+ * @return {boolean}
1621
+ */
1622
+ proto.MayachainMsgSend.prototype.hasFromAddress = function() {
1623
+ return jspb.Message.getField(this, 6) != null;
1624
+ };
1625
+
1626
+
1627
+ /**
1628
+ * optional string to_address = 7;
1629
+ * @return {string}
1630
+ */
1631
+ proto.MayachainMsgSend.prototype.getToAddress = function() {
1632
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1633
+ };
1634
+
1635
+
1636
+ /**
1637
+ * @param {string} value
1638
+ * @return {!proto.MayachainMsgSend} returns this
1639
+ */
1640
+ proto.MayachainMsgSend.prototype.setToAddress = function(value) {
1641
+ return jspb.Message.setField(this, 7, value);
1642
+ };
1643
+
1644
+
1645
+ /**
1646
+ * Clears the field making it undefined.
1647
+ * @return {!proto.MayachainMsgSend} returns this
1648
+ */
1649
+ proto.MayachainMsgSend.prototype.clearToAddress = function() {
1650
+ return jspb.Message.setField(this, 7, undefined);
1651
+ };
1652
+
1653
+
1654
+ /**
1655
+ * Returns whether this field is set.
1656
+ * @return {boolean}
1657
+ */
1658
+ proto.MayachainMsgSend.prototype.hasToAddress = function() {
1659
+ return jspb.Message.getField(this, 7) != null;
1660
+ };
1661
+
1662
+
1663
+ /**
1664
+ * optional uint64 amount = 8;
1665
+ * @return {string}
1666
+ */
1667
+ proto.MayachainMsgSend.prototype.getAmount = function() {
1668
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0"));
1669
+ };
1670
+
1671
+
1672
+ /**
1673
+ * @param {string} value
1674
+ * @return {!proto.MayachainMsgSend} returns this
1675
+ */
1676
+ proto.MayachainMsgSend.prototype.setAmount = function(value) {
1677
+ return jspb.Message.setField(this, 8, value);
1678
+ };
1679
+
1680
+
1681
+ /**
1682
+ * Clears the field making it undefined.
1683
+ * @return {!proto.MayachainMsgSend} returns this
1684
+ */
1685
+ proto.MayachainMsgSend.prototype.clearAmount = function() {
1686
+ return jspb.Message.setField(this, 8, undefined);
1687
+ };
1688
+
1689
+
1690
+ /**
1691
+ * Returns whether this field is set.
1692
+ * @return {boolean}
1693
+ */
1694
+ proto.MayachainMsgSend.prototype.hasAmount = function() {
1695
+ return jspb.Message.getField(this, 8) != null;
1696
+ };
1697
+
1698
+
1699
+ /**
1700
+ * optional OutputAddressType address_type = 9;
1701
+ * @return {!proto.OutputAddressType}
1702
+ */
1703
+ proto.MayachainMsgSend.prototype.getAddressType = function() {
1704
+ return /** @type {!proto.OutputAddressType} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
1705
+ };
1706
+
1707
+
1708
+ /**
1709
+ * @param {!proto.OutputAddressType} value
1710
+ * @return {!proto.MayachainMsgSend} returns this
1711
+ */
1712
+ proto.MayachainMsgSend.prototype.setAddressType = function(value) {
1713
+ return jspb.Message.setField(this, 9, value);
1714
+ };
1715
+
1716
+
1717
+ /**
1718
+ * Clears the field making it undefined.
1719
+ * @return {!proto.MayachainMsgSend} returns this
1720
+ */
1721
+ proto.MayachainMsgSend.prototype.clearAddressType = function() {
1722
+ return jspb.Message.setField(this, 9, undefined);
1723
+ };
1724
+
1725
+
1726
+ /**
1727
+ * Returns whether this field is set.
1728
+ * @return {boolean}
1729
+ */
1730
+ proto.MayachainMsgSend.prototype.hasAddressType = function() {
1731
+ return jspb.Message.getField(this, 9) != null;
1732
+ };
1733
+
1734
+
1735
+
1736
+
1737
+
1738
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1739
+ /**
1740
+ * Creates an object representation of this proto.
1741
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1742
+ * Optional fields that are not set will be set to undefined.
1743
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1744
+ * For the list of reserved names please see:
1745
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1746
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1747
+ * JSPB instance for transitional soy proto support:
1748
+ * http://goto/soy-param-migration
1749
+ * @return {!Object}
1750
+ */
1751
+ proto.MayachainMsgDeposit.prototype.toObject = function(opt_includeInstance) {
1752
+ return proto.MayachainMsgDeposit.toObject(opt_includeInstance, this);
1753
+ };
1754
+
1755
+
1756
+ /**
1757
+ * Static version of the {@see toObject} method.
1758
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1759
+ * the JSPB instance for transitional soy proto support:
1760
+ * http://goto/soy-param-migration
1761
+ * @param {!proto.MayachainMsgDeposit} msg The msg instance to transform.
1762
+ * @return {!Object}
1763
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1764
+ */
1765
+ proto.MayachainMsgDeposit.toObject = function(includeInstance, msg) {
1766
+ var f, obj = {
1767
+ asset: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
1768
+ amount: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
1769
+ memo: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
1770
+ signer: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f
1771
+ };
1772
+
1773
+ if (includeInstance) {
1774
+ obj.$jspbMessageInstance = msg;
1775
+ }
1776
+ return obj;
1777
+ };
1778
+ }
1779
+
1780
+
1781
+ /**
1782
+ * Deserializes binary data (in protobuf wire format).
1783
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1784
+ * @return {!proto.MayachainMsgDeposit}
1785
+ */
1786
+ proto.MayachainMsgDeposit.deserializeBinary = function(bytes) {
1787
+ var reader = new jspb.BinaryReader(bytes);
1788
+ var msg = new proto.MayachainMsgDeposit;
1789
+ return proto.MayachainMsgDeposit.deserializeBinaryFromReader(msg, reader);
1790
+ };
1791
+
1792
+
1793
+ /**
1794
+ * Deserializes binary data (in protobuf wire format) from the
1795
+ * given reader into the given message object.
1796
+ * @param {!proto.MayachainMsgDeposit} msg The message object to deserialize into.
1797
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1798
+ * @return {!proto.MayachainMsgDeposit}
1799
+ */
1800
+ proto.MayachainMsgDeposit.deserializeBinaryFromReader = function(msg, reader) {
1801
+ while (reader.nextField()) {
1802
+ if (reader.isEndGroup()) {
1803
+ break;
1804
+ }
1805
+ var field = reader.getFieldNumber();
1806
+ switch (field) {
1807
+ case 1:
1808
+ var value = /** @type {string} */ (reader.readString());
1809
+ msg.setAsset(value);
1810
+ break;
1811
+ case 2:
1812
+ var value = /** @type {string} */ (reader.readUint64String());
1813
+ msg.setAmount(value);
1814
+ break;
1815
+ case 3:
1816
+ var value = /** @type {string} */ (reader.readString());
1817
+ msg.setMemo(value);
1818
+ break;
1819
+ case 4:
1820
+ var value = /** @type {string} */ (reader.readString());
1821
+ msg.setSigner(value);
1822
+ break;
1823
+ default:
1824
+ reader.skipField();
1825
+ break;
1826
+ }
1827
+ }
1828
+ return msg;
1829
+ };
1830
+
1831
+
1832
+ /**
1833
+ * Serializes the message to binary data (in protobuf wire format).
1834
+ * @return {!Uint8Array}
1835
+ */
1836
+ proto.MayachainMsgDeposit.prototype.serializeBinary = function() {
1837
+ var writer = new jspb.BinaryWriter();
1838
+ proto.MayachainMsgDeposit.serializeBinaryToWriter(this, writer);
1839
+ return writer.getResultBuffer();
1840
+ };
1841
+
1842
+
1843
+ /**
1844
+ * Serializes the given message to binary data (in protobuf wire
1845
+ * format), writing to the given BinaryWriter.
1846
+ * @param {!proto.MayachainMsgDeposit} message
1847
+ * @param {!jspb.BinaryWriter} writer
1848
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1849
+ */
1850
+ proto.MayachainMsgDeposit.serializeBinaryToWriter = function(message, writer) {
1851
+ var f = undefined;
1852
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1853
+ if (f != null) {
1854
+ writer.writeString(
1855
+ 1,
1856
+ f
1857
+ );
1858
+ }
1859
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1860
+ if (f != null) {
1861
+ writer.writeUint64String(
1862
+ 2,
1863
+ f
1864
+ );
1865
+ }
1866
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1867
+ if (f != null) {
1868
+ writer.writeString(
1869
+ 3,
1870
+ f
1871
+ );
1872
+ }
1873
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1874
+ if (f != null) {
1875
+ writer.writeString(
1876
+ 4,
1877
+ f
1878
+ );
1879
+ }
1880
+ };
1881
+
1882
+
1883
+ /**
1884
+ * optional string asset = 1;
1885
+ * @return {string}
1886
+ */
1887
+ proto.MayachainMsgDeposit.prototype.getAsset = function() {
1888
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1889
+ };
1890
+
1891
+
1892
+ /**
1893
+ * @param {string} value
1894
+ * @return {!proto.MayachainMsgDeposit} returns this
1895
+ */
1896
+ proto.MayachainMsgDeposit.prototype.setAsset = function(value) {
1897
+ return jspb.Message.setField(this, 1, value);
1898
+ };
1899
+
1900
+
1901
+ /**
1902
+ * Clears the field making it undefined.
1903
+ * @return {!proto.MayachainMsgDeposit} returns this
1904
+ */
1905
+ proto.MayachainMsgDeposit.prototype.clearAsset = function() {
1906
+ return jspb.Message.setField(this, 1, undefined);
1907
+ };
1908
+
1909
+
1910
+ /**
1911
+ * Returns whether this field is set.
1912
+ * @return {boolean}
1913
+ */
1914
+ proto.MayachainMsgDeposit.prototype.hasAsset = function() {
1915
+ return jspb.Message.getField(this, 1) != null;
1916
+ };
1917
+
1918
+
1919
+ /**
1920
+ * optional uint64 amount = 2;
1921
+ * @return {string}
1922
+ */
1923
+ proto.MayachainMsgDeposit.prototype.getAmount = function() {
1924
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0"));
1925
+ };
1926
+
1927
+
1928
+ /**
1929
+ * @param {string} value
1930
+ * @return {!proto.MayachainMsgDeposit} returns this
1931
+ */
1932
+ proto.MayachainMsgDeposit.prototype.setAmount = function(value) {
1933
+ return jspb.Message.setField(this, 2, value);
1934
+ };
1935
+
1936
+
1937
+ /**
1938
+ * Clears the field making it undefined.
1939
+ * @return {!proto.MayachainMsgDeposit} returns this
1940
+ */
1941
+ proto.MayachainMsgDeposit.prototype.clearAmount = function() {
1942
+ return jspb.Message.setField(this, 2, undefined);
1943
+ };
1944
+
1945
+
1946
+ /**
1947
+ * Returns whether this field is set.
1948
+ * @return {boolean}
1949
+ */
1950
+ proto.MayachainMsgDeposit.prototype.hasAmount = function() {
1951
+ return jspb.Message.getField(this, 2) != null;
1952
+ };
1953
+
1954
+
1955
+ /**
1956
+ * optional string memo = 3;
1957
+ * @return {string}
1958
+ */
1959
+ proto.MayachainMsgDeposit.prototype.getMemo = function() {
1960
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1961
+ };
1962
+
1963
+
1964
+ /**
1965
+ * @param {string} value
1966
+ * @return {!proto.MayachainMsgDeposit} returns this
1967
+ */
1968
+ proto.MayachainMsgDeposit.prototype.setMemo = function(value) {
1969
+ return jspb.Message.setField(this, 3, value);
1970
+ };
1971
+
1972
+
1973
+ /**
1974
+ * Clears the field making it undefined.
1975
+ * @return {!proto.MayachainMsgDeposit} returns this
1976
+ */
1977
+ proto.MayachainMsgDeposit.prototype.clearMemo = function() {
1978
+ return jspb.Message.setField(this, 3, undefined);
1979
+ };
1980
+
1981
+
1982
+ /**
1983
+ * Returns whether this field is set.
1984
+ * @return {boolean}
1985
+ */
1986
+ proto.MayachainMsgDeposit.prototype.hasMemo = function() {
1987
+ return jspb.Message.getField(this, 3) != null;
1988
+ };
1989
+
1990
+
1991
+ /**
1992
+ * optional string signer = 4;
1993
+ * @return {string}
1994
+ */
1995
+ proto.MayachainMsgDeposit.prototype.getSigner = function() {
1996
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1997
+ };
1998
+
1999
+
2000
+ /**
2001
+ * @param {string} value
2002
+ * @return {!proto.MayachainMsgDeposit} returns this
2003
+ */
2004
+ proto.MayachainMsgDeposit.prototype.setSigner = function(value) {
2005
+ return jspb.Message.setField(this, 4, value);
2006
+ };
2007
+
2008
+
2009
+ /**
2010
+ * Clears the field making it undefined.
2011
+ * @return {!proto.MayachainMsgDeposit} returns this
2012
+ */
2013
+ proto.MayachainMsgDeposit.prototype.clearSigner = function() {
2014
+ return jspb.Message.setField(this, 4, undefined);
2015
+ };
2016
+
2017
+
2018
+ /**
2019
+ * Returns whether this field is set.
2020
+ * @return {boolean}
2021
+ */
2022
+ proto.MayachainMsgDeposit.prototype.hasSigner = function() {
2023
+ return jspb.Message.getField(this, 4) != null;
2024
+ };
2025
+
2026
+
2027
+
2028
+
2029
+
2030
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2031
+ /**
2032
+ * Creates an object representation of this proto.
2033
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2034
+ * Optional fields that are not set will be set to undefined.
2035
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2036
+ * For the list of reserved names please see:
2037
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2038
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2039
+ * JSPB instance for transitional soy proto support:
2040
+ * http://goto/soy-param-migration
2041
+ * @return {!Object}
2042
+ */
2043
+ proto.MayachainSignedTx.prototype.toObject = function(opt_includeInstance) {
2044
+ return proto.MayachainSignedTx.toObject(opt_includeInstance, this);
2045
+ };
2046
+
2047
+
2048
+ /**
2049
+ * Static version of the {@see toObject} method.
2050
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2051
+ * the JSPB instance for transitional soy proto support:
2052
+ * http://goto/soy-param-migration
2053
+ * @param {!proto.MayachainSignedTx} msg The msg instance to transform.
2054
+ * @return {!Object}
2055
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2056
+ */
2057
+ proto.MayachainSignedTx.toObject = function(includeInstance, msg) {
2058
+ var f, obj = {
2059
+ publicKey: msg.getPublicKey_asB64(),
2060
+ signature: msg.getSignature_asB64()
2061
+ };
2062
+
2063
+ if (includeInstance) {
2064
+ obj.$jspbMessageInstance = msg;
2065
+ }
2066
+ return obj;
2067
+ };
2068
+ }
2069
+
2070
+
2071
+ /**
2072
+ * Deserializes binary data (in protobuf wire format).
2073
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2074
+ * @return {!proto.MayachainSignedTx}
2075
+ */
2076
+ proto.MayachainSignedTx.deserializeBinary = function(bytes) {
2077
+ var reader = new jspb.BinaryReader(bytes);
2078
+ var msg = new proto.MayachainSignedTx;
2079
+ return proto.MayachainSignedTx.deserializeBinaryFromReader(msg, reader);
2080
+ };
2081
+
2082
+
2083
+ /**
2084
+ * Deserializes binary data (in protobuf wire format) from the
2085
+ * given reader into the given message object.
2086
+ * @param {!proto.MayachainSignedTx} msg The message object to deserialize into.
2087
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2088
+ * @return {!proto.MayachainSignedTx}
2089
+ */
2090
+ proto.MayachainSignedTx.deserializeBinaryFromReader = function(msg, reader) {
2091
+ while (reader.nextField()) {
2092
+ if (reader.isEndGroup()) {
2093
+ break;
2094
+ }
2095
+ var field = reader.getFieldNumber();
2096
+ switch (field) {
2097
+ case 1:
2098
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2099
+ msg.setPublicKey(value);
2100
+ break;
2101
+ case 2:
2102
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2103
+ msg.setSignature(value);
2104
+ break;
2105
+ default:
2106
+ reader.skipField();
2107
+ break;
2108
+ }
2109
+ }
2110
+ return msg;
2111
+ };
2112
+
2113
+
2114
+ /**
2115
+ * Serializes the message to binary data (in protobuf wire format).
2116
+ * @return {!Uint8Array}
2117
+ */
2118
+ proto.MayachainSignedTx.prototype.serializeBinary = function() {
2119
+ var writer = new jspb.BinaryWriter();
2120
+ proto.MayachainSignedTx.serializeBinaryToWriter(this, writer);
2121
+ return writer.getResultBuffer();
2122
+ };
2123
+
2124
+
2125
+ /**
2126
+ * Serializes the given message to binary data (in protobuf wire
2127
+ * format), writing to the given BinaryWriter.
2128
+ * @param {!proto.MayachainSignedTx} message
2129
+ * @param {!jspb.BinaryWriter} writer
2130
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2131
+ */
2132
+ proto.MayachainSignedTx.serializeBinaryToWriter = function(message, writer) {
2133
+ var f = undefined;
2134
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1));
2135
+ if (f != null) {
2136
+ writer.writeBytes(
2137
+ 1,
2138
+ f
2139
+ );
2140
+ }
2141
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
2142
+ if (f != null) {
2143
+ writer.writeBytes(
2144
+ 2,
2145
+ f
2146
+ );
2147
+ }
2148
+ };
2149
+
2150
+
2151
+ /**
2152
+ * optional bytes public_key = 1;
2153
+ * @return {!(string|Uint8Array)}
2154
+ */
2155
+ proto.MayachainSignedTx.prototype.getPublicKey = function() {
2156
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2157
+ };
2158
+
2159
+
2160
+ /**
2161
+ * optional bytes public_key = 1;
2162
+ * This is a type-conversion wrapper around `getPublicKey()`
2163
+ * @return {string}
2164
+ */
2165
+ proto.MayachainSignedTx.prototype.getPublicKey_asB64 = function() {
2166
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
2167
+ this.getPublicKey()));
2168
+ };
2169
+
2170
+
2171
+ /**
2172
+ * optional bytes public_key = 1;
2173
+ * Note that Uint8Array is not supported on all browsers.
2174
+ * @see http://caniuse.com/Uint8Array
2175
+ * This is a type-conversion wrapper around `getPublicKey()`
2176
+ * @return {!Uint8Array}
2177
+ */
2178
+ proto.MayachainSignedTx.prototype.getPublicKey_asU8 = function() {
2179
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2180
+ this.getPublicKey()));
2181
+ };
2182
+
2183
+
2184
+ /**
2185
+ * @param {!(string|Uint8Array)} value
2186
+ * @return {!proto.MayachainSignedTx} returns this
2187
+ */
2188
+ proto.MayachainSignedTx.prototype.setPublicKey = function(value) {
2189
+ return jspb.Message.setField(this, 1, value);
2190
+ };
2191
+
2192
+
2193
+ /**
2194
+ * Clears the field making it undefined.
2195
+ * @return {!proto.MayachainSignedTx} returns this
2196
+ */
2197
+ proto.MayachainSignedTx.prototype.clearPublicKey = function() {
2198
+ return jspb.Message.setField(this, 1, undefined);
2199
+ };
2200
+
2201
+
2202
+ /**
2203
+ * Returns whether this field is set.
2204
+ * @return {boolean}
2205
+ */
2206
+ proto.MayachainSignedTx.prototype.hasPublicKey = function() {
2207
+ return jspb.Message.getField(this, 1) != null;
2208
+ };
2209
+
2210
+
2211
+ /**
2212
+ * optional bytes signature = 2;
2213
+ * @return {!(string|Uint8Array)}
2214
+ */
2215
+ proto.MayachainSignedTx.prototype.getSignature = function() {
2216
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2217
+ };
2218
+
2219
+
2220
+ /**
2221
+ * optional bytes signature = 2;
2222
+ * This is a type-conversion wrapper around `getSignature()`
2223
+ * @return {string}
2224
+ */
2225
+ proto.MayachainSignedTx.prototype.getSignature_asB64 = function() {
2226
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
2227
+ this.getSignature()));
2228
+ };
2229
+
2230
+
2231
+ /**
2232
+ * optional bytes signature = 2;
2233
+ * Note that Uint8Array is not supported on all browsers.
2234
+ * @see http://caniuse.com/Uint8Array
2235
+ * This is a type-conversion wrapper around `getSignature()`
2236
+ * @return {!Uint8Array}
2237
+ */
2238
+ proto.MayachainSignedTx.prototype.getSignature_asU8 = function() {
2239
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2240
+ this.getSignature()));
2241
+ };
2242
+
2243
+
2244
+ /**
2245
+ * @param {!(string|Uint8Array)} value
2246
+ * @return {!proto.MayachainSignedTx} returns this
2247
+ */
2248
+ proto.MayachainSignedTx.prototype.setSignature = function(value) {
2249
+ return jspb.Message.setField(this, 2, value);
2250
+ };
2251
+
2252
+
2253
+ /**
2254
+ * Clears the field making it undefined.
2255
+ * @return {!proto.MayachainSignedTx} returns this
2256
+ */
2257
+ proto.MayachainSignedTx.prototype.clearSignature = function() {
2258
+ return jspb.Message.setField(this, 2, undefined);
2259
+ };
2260
+
2261
+
2262
+ /**
2263
+ * Returns whether this field is set.
2264
+ * @return {boolean}
2265
+ */
2266
+ proto.MayachainSignedTx.prototype.hasSignature = function() {
2267
+ return jspb.Message.getField(this, 2) != null;
2268
+ };
2269
+
2270
+
2271
+ goog.object.extend(exports, proto);