@bithighlander/device-protocol 6.3.2 → 7.14.0

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