@bithighlander/device-protocol 6.3.1 → 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 -230
  43. package/lib/messages_pb.js +6718 -5570
  44. package/lib/messages_pb.js-e +18219 -0
  45. package/lib/proto.json +2932 -731
  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,2277 @@
1
+ // source: messages-thorchain.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.ThorchainAddress', null, global);
27
+ goog.exportSymbol('proto.ThorchainGetAddress', null, global);
28
+ goog.exportSymbol('proto.ThorchainMsgAck', null, global);
29
+ goog.exportSymbol('proto.ThorchainMsgDeposit', null, global);
30
+ goog.exportSymbol('proto.ThorchainMsgRequest', null, global);
31
+ goog.exportSymbol('proto.ThorchainMsgSend', null, global);
32
+ goog.exportSymbol('proto.ThorchainSignTx', null, global);
33
+ goog.exportSymbol('proto.ThorchainSignedTx', 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.ThorchainGetAddress = function(opt_data) {
45
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.ThorchainGetAddress.repeatedFields_, null);
46
+ };
47
+ goog.inherits(proto.ThorchainGetAddress, jspb.Message);
48
+ if (goog.DEBUG && !COMPILED) {
49
+ /**
50
+ * @public
51
+ * @override
52
+ */
53
+ proto.ThorchainGetAddress.displayName = 'proto.ThorchainGetAddress';
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.ThorchainAddress = function(opt_data) {
66
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
67
+ };
68
+ goog.inherits(proto.ThorchainAddress, jspb.Message);
69
+ if (goog.DEBUG && !COMPILED) {
70
+ /**
71
+ * @public
72
+ * @override
73
+ */
74
+ proto.ThorchainAddress.displayName = 'proto.ThorchainAddress';
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.ThorchainSignTx = function(opt_data) {
87
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.ThorchainSignTx.repeatedFields_, null);
88
+ };
89
+ goog.inherits(proto.ThorchainSignTx, jspb.Message);
90
+ if (goog.DEBUG && !COMPILED) {
91
+ /**
92
+ * @public
93
+ * @override
94
+ */
95
+ proto.ThorchainSignTx.displayName = 'proto.ThorchainSignTx';
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.ThorchainMsgRequest = function(opt_data) {
108
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
109
+ };
110
+ goog.inherits(proto.ThorchainMsgRequest, jspb.Message);
111
+ if (goog.DEBUG && !COMPILED) {
112
+ /**
113
+ * @public
114
+ * @override
115
+ */
116
+ proto.ThorchainMsgRequest.displayName = 'proto.ThorchainMsgRequest';
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.ThorchainMsgAck = function(opt_data) {
129
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
130
+ };
131
+ goog.inherits(proto.ThorchainMsgAck, jspb.Message);
132
+ if (goog.DEBUG && !COMPILED) {
133
+ /**
134
+ * @public
135
+ * @override
136
+ */
137
+ proto.ThorchainMsgAck.displayName = 'proto.ThorchainMsgAck';
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.ThorchainMsgSend = function(opt_data) {
150
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
151
+ };
152
+ goog.inherits(proto.ThorchainMsgSend, jspb.Message);
153
+ if (goog.DEBUG && !COMPILED) {
154
+ /**
155
+ * @public
156
+ * @override
157
+ */
158
+ proto.ThorchainMsgSend.displayName = 'proto.ThorchainMsgSend';
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.ThorchainMsgDeposit = function(opt_data) {
171
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
172
+ };
173
+ goog.inherits(proto.ThorchainMsgDeposit, jspb.Message);
174
+ if (goog.DEBUG && !COMPILED) {
175
+ /**
176
+ * @public
177
+ * @override
178
+ */
179
+ proto.ThorchainMsgDeposit.displayName = 'proto.ThorchainMsgDeposit';
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.ThorchainSignedTx = function(opt_data) {
192
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
193
+ };
194
+ goog.inherits(proto.ThorchainSignedTx, jspb.Message);
195
+ if (goog.DEBUG && !COMPILED) {
196
+ /**
197
+ * @public
198
+ * @override
199
+ */
200
+ proto.ThorchainSignedTx.displayName = 'proto.ThorchainSignedTx';
201
+ }
202
+
203
+ /**
204
+ * List of repeated fields within this message type.
205
+ * @private {!Array<number>}
206
+ * @const
207
+ */
208
+ proto.ThorchainGetAddress.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.ThorchainGetAddress.prototype.toObject = function(opt_includeInstance) {
226
+ return proto.ThorchainGetAddress.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.ThorchainGetAddress} msg The msg instance to transform.
236
+ * @return {!Object}
237
+ * @suppress {unusedLocalVariables} f is only used for nested messages
238
+ */
239
+ proto.ThorchainGetAddress.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.ThorchainGetAddress}
258
+ */
259
+ proto.ThorchainGetAddress.deserializeBinary = function(bytes) {
260
+ var reader = new jspb.BinaryReader(bytes);
261
+ var msg = new proto.ThorchainGetAddress;
262
+ return proto.ThorchainGetAddress.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.ThorchainGetAddress} msg The message object to deserialize into.
270
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
271
+ * @return {!proto.ThorchainGetAddress}
272
+ */
273
+ proto.ThorchainGetAddress.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.ThorchainGetAddress.prototype.serializeBinary = function() {
308
+ var writer = new jspb.BinaryWriter();
309
+ proto.ThorchainGetAddress.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.ThorchainGetAddress} message
318
+ * @param {!jspb.BinaryWriter} writer
319
+ * @suppress {unusedLocalVariables} f is only used for nested messages
320
+ */
321
+ proto.ThorchainGetAddress.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.ThorchainGetAddress.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.ThorchainGetAddress} returns this
359
+ */
360
+ proto.ThorchainGetAddress.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.ThorchainGetAddress} returns this
369
+ */
370
+ proto.ThorchainGetAddress.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.ThorchainGetAddress} returns this
378
+ */
379
+ proto.ThorchainGetAddress.prototype.clearAddressNList = function() {
380
+ return this.setAddressNList([]);
381
+ };
382
+
383
+
384
+ /**
385
+ * optional bool show_display = 2;
386
+ * @return {boolean}
387
+ */
388
+ proto.ThorchainGetAddress.prototype.getShowDisplay = function() {
389
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
390
+ };
391
+
392
+
393
+ /**
394
+ * @param {boolean} value
395
+ * @return {!proto.ThorchainGetAddress} returns this
396
+ */
397
+ proto.ThorchainGetAddress.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.ThorchainGetAddress} returns this
405
+ */
406
+ proto.ThorchainGetAddress.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.ThorchainGetAddress.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.ThorchainGetAddress.prototype.getTestnet = function() {
425
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
426
+ };
427
+
428
+
429
+ /**
430
+ * @param {boolean} value
431
+ * @return {!proto.ThorchainGetAddress} returns this
432
+ */
433
+ proto.ThorchainGetAddress.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.ThorchainGetAddress} returns this
441
+ */
442
+ proto.ThorchainGetAddress.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.ThorchainGetAddress.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.ThorchainAddress.prototype.toObject = function(opt_includeInstance) {
473
+ return proto.ThorchainAddress.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.ThorchainAddress} msg The msg instance to transform.
483
+ * @return {!Object}
484
+ * @suppress {unusedLocalVariables} f is only used for nested messages
485
+ */
486
+ proto.ThorchainAddress.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.ThorchainAddress}
503
+ */
504
+ proto.ThorchainAddress.deserializeBinary = function(bytes) {
505
+ var reader = new jspb.BinaryReader(bytes);
506
+ var msg = new proto.ThorchainAddress;
507
+ return proto.ThorchainAddress.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.ThorchainAddress} msg The message object to deserialize into.
515
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
516
+ * @return {!proto.ThorchainAddress}
517
+ */
518
+ proto.ThorchainAddress.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.ThorchainAddress.prototype.serializeBinary = function() {
543
+ var writer = new jspb.BinaryWriter();
544
+ proto.ThorchainAddress.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.ThorchainAddress} message
553
+ * @param {!jspb.BinaryWriter} writer
554
+ * @suppress {unusedLocalVariables} f is only used for nested messages
555
+ */
556
+ proto.ThorchainAddress.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.ThorchainAddress.prototype.getAddress = function() {
573
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
574
+ };
575
+
576
+
577
+ /**
578
+ * @param {string} value
579
+ * @return {!proto.ThorchainAddress} returns this
580
+ */
581
+ proto.ThorchainAddress.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.ThorchainAddress} returns this
589
+ */
590
+ proto.ThorchainAddress.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.ThorchainAddress.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.ThorchainSignTx.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.ThorchainSignTx.prototype.toObject = function(opt_includeInstance) {
628
+ return proto.ThorchainSignTx.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.ThorchainSignTx} msg The msg instance to transform.
638
+ * @return {!Object}
639
+ * @suppress {unusedLocalVariables} f is only used for nested messages
640
+ */
641
+ proto.ThorchainSignTx.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.ThorchainSignTx}
666
+ */
667
+ proto.ThorchainSignTx.deserializeBinary = function(bytes) {
668
+ var reader = new jspb.BinaryReader(bytes);
669
+ var msg = new proto.ThorchainSignTx;
670
+ return proto.ThorchainSignTx.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.ThorchainSignTx} msg The message object to deserialize into.
678
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
679
+ * @return {!proto.ThorchainSignTx}
680
+ */
681
+ proto.ThorchainSignTx.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.ThorchainSignTx.prototype.serializeBinary = function() {
740
+ var writer = new jspb.BinaryWriter();
741
+ proto.ThorchainSignTx.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.ThorchainSignTx} message
750
+ * @param {!jspb.BinaryWriter} writer
751
+ * @suppress {unusedLocalVariables} f is only used for nested messages
752
+ */
753
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainSignTx} returns this
833
+ */
834
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
843
+ */
844
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
852
+ */
853
+ proto.ThorchainSignTx.prototype.clearAddressNList = function() {
854
+ return this.setAddressNList([]);
855
+ };
856
+
857
+
858
+ /**
859
+ * optional uint64 account_number = 2;
860
+ * @return {string}
861
+ */
862
+ proto.ThorchainSignTx.prototype.getAccountNumber = function() {
863
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0"));
864
+ };
865
+
866
+
867
+ /**
868
+ * @param {string} value
869
+ * @return {!proto.ThorchainSignTx} returns this
870
+ */
871
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
879
+ */
880
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainSignTx.prototype.getChainId = function() {
899
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
900
+ };
901
+
902
+
903
+ /**
904
+ * @param {string} value
905
+ * @return {!proto.ThorchainSignTx} returns this
906
+ */
907
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
915
+ */
916
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainSignTx.prototype.getFeeAmount = function() {
935
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
936
+ };
937
+
938
+
939
+ /**
940
+ * @param {number} value
941
+ * @return {!proto.ThorchainSignTx} returns this
942
+ */
943
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
951
+ */
952
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainSignTx.prototype.getGas = function() {
971
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
972
+ };
973
+
974
+
975
+ /**
976
+ * @param {number} value
977
+ * @return {!proto.ThorchainSignTx} returns this
978
+ */
979
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
987
+ */
988
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainSignTx.prototype.getMemo = function() {
1007
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1008
+ };
1009
+
1010
+
1011
+ /**
1012
+ * @param {string} value
1013
+ * @return {!proto.ThorchainSignTx} returns this
1014
+ */
1015
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
1023
+ */
1024
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainSignTx.prototype.getSequence = function() {
1043
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0"));
1044
+ };
1045
+
1046
+
1047
+ /**
1048
+ * @param {string} value
1049
+ * @return {!proto.ThorchainSignTx} returns this
1050
+ */
1051
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
1059
+ */
1060
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainSignTx.prototype.getMsgCount = function() {
1079
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1080
+ };
1081
+
1082
+
1083
+ /**
1084
+ * @param {number} value
1085
+ * @return {!proto.ThorchainSignTx} returns this
1086
+ */
1087
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
1095
+ */
1096
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainSignTx.prototype.getTestnet = function() {
1115
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
1116
+ };
1117
+
1118
+
1119
+ /**
1120
+ * @param {boolean} value
1121
+ * @return {!proto.ThorchainSignTx} returns this
1122
+ */
1123
+ proto.ThorchainSignTx.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.ThorchainSignTx} returns this
1131
+ */
1132
+ proto.ThorchainSignTx.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.ThorchainSignTx.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.ThorchainMsgRequest.prototype.toObject = function(opt_includeInstance) {
1163
+ return proto.ThorchainMsgRequest.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.ThorchainMsgRequest} msg The msg instance to transform.
1173
+ * @return {!Object}
1174
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1175
+ */
1176
+ proto.ThorchainMsgRequest.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.ThorchainMsgRequest}
1193
+ */
1194
+ proto.ThorchainMsgRequest.deserializeBinary = function(bytes) {
1195
+ var reader = new jspb.BinaryReader(bytes);
1196
+ var msg = new proto.ThorchainMsgRequest;
1197
+ return proto.ThorchainMsgRequest.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.ThorchainMsgRequest} msg The message object to deserialize into.
1205
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1206
+ * @return {!proto.ThorchainMsgRequest}
1207
+ */
1208
+ proto.ThorchainMsgRequest.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.ThorchainMsgRequest.prototype.serializeBinary = function() {
1229
+ var writer = new jspb.BinaryWriter();
1230
+ proto.ThorchainMsgRequest.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.ThorchainMsgRequest} message
1239
+ * @param {!jspb.BinaryWriter} writer
1240
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1241
+ */
1242
+ proto.ThorchainMsgRequest.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.ThorchainMsgAck.prototype.toObject = function(opt_includeInstance) {
1264
+ return proto.ThorchainMsgAck.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.ThorchainMsgAck} msg The msg instance to transform.
1274
+ * @return {!Object}
1275
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1276
+ */
1277
+ proto.ThorchainMsgAck.toObject = function(includeInstance, msg) {
1278
+ var f, obj = {
1279
+ send: (f = msg.getSend()) && proto.ThorchainMsgSend.toObject(includeInstance, f),
1280
+ deposit: (f = msg.getDeposit()) && proto.ThorchainMsgDeposit.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.ThorchainMsgAck}
1295
+ */
1296
+ proto.ThorchainMsgAck.deserializeBinary = function(bytes) {
1297
+ var reader = new jspb.BinaryReader(bytes);
1298
+ var msg = new proto.ThorchainMsgAck;
1299
+ return proto.ThorchainMsgAck.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.ThorchainMsgAck} msg The message object to deserialize into.
1307
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1308
+ * @return {!proto.ThorchainMsgAck}
1309
+ */
1310
+ proto.ThorchainMsgAck.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.ThorchainMsgSend;
1319
+ reader.readMessage(value,proto.ThorchainMsgSend.deserializeBinaryFromReader);
1320
+ msg.setSend(value);
1321
+ break;
1322
+ case 2:
1323
+ var value = new proto.ThorchainMsgDeposit;
1324
+ reader.readMessage(value,proto.ThorchainMsgDeposit.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.ThorchainMsgAck.prototype.serializeBinary = function() {
1341
+ var writer = new jspb.BinaryWriter();
1342
+ proto.ThorchainMsgAck.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.ThorchainMsgAck} message
1351
+ * @param {!jspb.BinaryWriter} writer
1352
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1353
+ */
1354
+ proto.ThorchainMsgAck.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.ThorchainMsgSend.serializeBinaryToWriter
1362
+ );
1363
+ }
1364
+ f = message.getDeposit();
1365
+ if (f != null) {
1366
+ writer.writeMessage(
1367
+ 2,
1368
+ f,
1369
+ proto.ThorchainMsgDeposit.serializeBinaryToWriter
1370
+ );
1371
+ }
1372
+ };
1373
+
1374
+
1375
+ /**
1376
+ * optional ThorchainMsgSend send = 1;
1377
+ * @return {?proto.ThorchainMsgSend}
1378
+ */
1379
+ proto.ThorchainMsgAck.prototype.getSend = function() {
1380
+ return /** @type{?proto.ThorchainMsgSend} */ (
1381
+ jspb.Message.getWrapperField(this, proto.ThorchainMsgSend, 1));
1382
+ };
1383
+
1384
+
1385
+ /**
1386
+ * @param {?proto.ThorchainMsgSend|undefined} value
1387
+ * @return {!proto.ThorchainMsgAck} returns this
1388
+ */
1389
+ proto.ThorchainMsgAck.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.ThorchainMsgAck} returns this
1397
+ */
1398
+ proto.ThorchainMsgAck.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.ThorchainMsgAck.prototype.hasSend = function() {
1408
+ return jspb.Message.getField(this, 1) != null;
1409
+ };
1410
+
1411
+
1412
+ /**
1413
+ * optional ThorchainMsgDeposit deposit = 2;
1414
+ * @return {?proto.ThorchainMsgDeposit}
1415
+ */
1416
+ proto.ThorchainMsgAck.prototype.getDeposit = function() {
1417
+ return /** @type{?proto.ThorchainMsgDeposit} */ (
1418
+ jspb.Message.getWrapperField(this, proto.ThorchainMsgDeposit, 2));
1419
+ };
1420
+
1421
+
1422
+ /**
1423
+ * @param {?proto.ThorchainMsgDeposit|undefined} value
1424
+ * @return {!proto.ThorchainMsgAck} returns this
1425
+ */
1426
+ proto.ThorchainMsgAck.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.ThorchainMsgAck} returns this
1434
+ */
1435
+ proto.ThorchainMsgAck.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.ThorchainMsgAck.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.ThorchainMsgSend.prototype.toObject = function(opt_includeInstance) {
1466
+ return proto.ThorchainMsgSend.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.ThorchainMsgSend} msg The msg instance to transform.
1476
+ * @return {!Object}
1477
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1478
+ */
1479
+ proto.ThorchainMsgSend.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
+ };
1486
+
1487
+ if (includeInstance) {
1488
+ obj.$jspbMessageInstance = msg;
1489
+ }
1490
+ return obj;
1491
+ };
1492
+ }
1493
+
1494
+
1495
+ /**
1496
+ * Deserializes binary data (in protobuf wire format).
1497
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1498
+ * @return {!proto.ThorchainMsgSend}
1499
+ */
1500
+ proto.ThorchainMsgSend.deserializeBinary = function(bytes) {
1501
+ var reader = new jspb.BinaryReader(bytes);
1502
+ var msg = new proto.ThorchainMsgSend;
1503
+ return proto.ThorchainMsgSend.deserializeBinaryFromReader(msg, reader);
1504
+ };
1505
+
1506
+
1507
+ /**
1508
+ * Deserializes binary data (in protobuf wire format) from the
1509
+ * given reader into the given message object.
1510
+ * @param {!proto.ThorchainMsgSend} msg The message object to deserialize into.
1511
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1512
+ * @return {!proto.ThorchainMsgSend}
1513
+ */
1514
+ proto.ThorchainMsgSend.deserializeBinaryFromReader = function(msg, reader) {
1515
+ while (reader.nextField()) {
1516
+ if (reader.isEndGroup()) {
1517
+ break;
1518
+ }
1519
+ var field = reader.getFieldNumber();
1520
+ switch (field) {
1521
+ case 6:
1522
+ var value = /** @type {string} */ (reader.readString());
1523
+ msg.setFromAddress(value);
1524
+ break;
1525
+ case 7:
1526
+ var value = /** @type {string} */ (reader.readString());
1527
+ msg.setToAddress(value);
1528
+ break;
1529
+ case 8:
1530
+ var value = /** @type {string} */ (reader.readUint64String());
1531
+ msg.setAmount(value);
1532
+ break;
1533
+ case 9:
1534
+ var value = /** @type {!proto.OutputAddressType} */ (reader.readEnum());
1535
+ msg.setAddressType(value);
1536
+ break;
1537
+ default:
1538
+ reader.skipField();
1539
+ break;
1540
+ }
1541
+ }
1542
+ return msg;
1543
+ };
1544
+
1545
+
1546
+ /**
1547
+ * Serializes the message to binary data (in protobuf wire format).
1548
+ * @return {!Uint8Array}
1549
+ */
1550
+ proto.ThorchainMsgSend.prototype.serializeBinary = function() {
1551
+ var writer = new jspb.BinaryWriter();
1552
+ proto.ThorchainMsgSend.serializeBinaryToWriter(this, writer);
1553
+ return writer.getResultBuffer();
1554
+ };
1555
+
1556
+
1557
+ /**
1558
+ * Serializes the given message to binary data (in protobuf wire
1559
+ * format), writing to the given BinaryWriter.
1560
+ * @param {!proto.ThorchainMsgSend} message
1561
+ * @param {!jspb.BinaryWriter} writer
1562
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1563
+ */
1564
+ proto.ThorchainMsgSend.serializeBinaryToWriter = function(message, writer) {
1565
+ var f = undefined;
1566
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
1567
+ if (f != null) {
1568
+ writer.writeString(
1569
+ 6,
1570
+ f
1571
+ );
1572
+ }
1573
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
1574
+ if (f != null) {
1575
+ writer.writeString(
1576
+ 7,
1577
+ f
1578
+ );
1579
+ }
1580
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
1581
+ if (f != null) {
1582
+ writer.writeUint64String(
1583
+ 8,
1584
+ f
1585
+ );
1586
+ }
1587
+ f = /** @type {!proto.OutputAddressType} */ (jspb.Message.getField(message, 9));
1588
+ if (f != null) {
1589
+ writer.writeEnum(
1590
+ 9,
1591
+ f
1592
+ );
1593
+ }
1594
+ };
1595
+
1596
+
1597
+ /**
1598
+ * optional string from_address = 6;
1599
+ * @return {string}
1600
+ */
1601
+ proto.ThorchainMsgSend.prototype.getFromAddress = function() {
1602
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1603
+ };
1604
+
1605
+
1606
+ /**
1607
+ * @param {string} value
1608
+ * @return {!proto.ThorchainMsgSend} returns this
1609
+ */
1610
+ proto.ThorchainMsgSend.prototype.setFromAddress = function(value) {
1611
+ return jspb.Message.setField(this, 6, value);
1612
+ };
1613
+
1614
+
1615
+ /**
1616
+ * Clears the field making it undefined.
1617
+ * @return {!proto.ThorchainMsgSend} returns this
1618
+ */
1619
+ proto.ThorchainMsgSend.prototype.clearFromAddress = function() {
1620
+ return jspb.Message.setField(this, 6, undefined);
1621
+ };
1622
+
1623
+
1624
+ /**
1625
+ * Returns whether this field is set.
1626
+ * @return {boolean}
1627
+ */
1628
+ proto.ThorchainMsgSend.prototype.hasFromAddress = function() {
1629
+ return jspb.Message.getField(this, 6) != null;
1630
+ };
1631
+
1632
+
1633
+ /**
1634
+ * optional string to_address = 7;
1635
+ * @return {string}
1636
+ */
1637
+ proto.ThorchainMsgSend.prototype.getToAddress = function() {
1638
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1639
+ };
1640
+
1641
+
1642
+ /**
1643
+ * @param {string} value
1644
+ * @return {!proto.ThorchainMsgSend} returns this
1645
+ */
1646
+ proto.ThorchainMsgSend.prototype.setToAddress = function(value) {
1647
+ return jspb.Message.setField(this, 7, value);
1648
+ };
1649
+
1650
+
1651
+ /**
1652
+ * Clears the field making it undefined.
1653
+ * @return {!proto.ThorchainMsgSend} returns this
1654
+ */
1655
+ proto.ThorchainMsgSend.prototype.clearToAddress = function() {
1656
+ return jspb.Message.setField(this, 7, undefined);
1657
+ };
1658
+
1659
+
1660
+ /**
1661
+ * Returns whether this field is set.
1662
+ * @return {boolean}
1663
+ */
1664
+ proto.ThorchainMsgSend.prototype.hasToAddress = function() {
1665
+ return jspb.Message.getField(this, 7) != null;
1666
+ };
1667
+
1668
+
1669
+ /**
1670
+ * optional uint64 amount = 8;
1671
+ * @return {string}
1672
+ */
1673
+ proto.ThorchainMsgSend.prototype.getAmount = function() {
1674
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0"));
1675
+ };
1676
+
1677
+
1678
+ /**
1679
+ * @param {string} value
1680
+ * @return {!proto.ThorchainMsgSend} returns this
1681
+ */
1682
+ proto.ThorchainMsgSend.prototype.setAmount = function(value) {
1683
+ return jspb.Message.setField(this, 8, value);
1684
+ };
1685
+
1686
+
1687
+ /**
1688
+ * Clears the field making it undefined.
1689
+ * @return {!proto.ThorchainMsgSend} returns this
1690
+ */
1691
+ proto.ThorchainMsgSend.prototype.clearAmount = function() {
1692
+ return jspb.Message.setField(this, 8, undefined);
1693
+ };
1694
+
1695
+
1696
+ /**
1697
+ * Returns whether this field is set.
1698
+ * @return {boolean}
1699
+ */
1700
+ proto.ThorchainMsgSend.prototype.hasAmount = function() {
1701
+ return jspb.Message.getField(this, 8) != null;
1702
+ };
1703
+
1704
+
1705
+ /**
1706
+ * optional OutputAddressType address_type = 9;
1707
+ * @return {!proto.OutputAddressType}
1708
+ */
1709
+ proto.ThorchainMsgSend.prototype.getAddressType = function() {
1710
+ return /** @type {!proto.OutputAddressType} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
1711
+ };
1712
+
1713
+
1714
+ /**
1715
+ * @param {!proto.OutputAddressType} value
1716
+ * @return {!proto.ThorchainMsgSend} returns this
1717
+ */
1718
+ proto.ThorchainMsgSend.prototype.setAddressType = function(value) {
1719
+ return jspb.Message.setField(this, 9, value);
1720
+ };
1721
+
1722
+
1723
+ /**
1724
+ * Clears the field making it undefined.
1725
+ * @return {!proto.ThorchainMsgSend} returns this
1726
+ */
1727
+ proto.ThorchainMsgSend.prototype.clearAddressType = function() {
1728
+ return jspb.Message.setField(this, 9, undefined);
1729
+ };
1730
+
1731
+
1732
+ /**
1733
+ * Returns whether this field is set.
1734
+ * @return {boolean}
1735
+ */
1736
+ proto.ThorchainMsgSend.prototype.hasAddressType = function() {
1737
+ return jspb.Message.getField(this, 9) != null;
1738
+ };
1739
+
1740
+
1741
+
1742
+
1743
+
1744
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1745
+ /**
1746
+ * Creates an object representation of this proto.
1747
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1748
+ * Optional fields that are not set will be set to undefined.
1749
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1750
+ * For the list of reserved names please see:
1751
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1752
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1753
+ * JSPB instance for transitional soy proto support:
1754
+ * http://goto/soy-param-migration
1755
+ * @return {!Object}
1756
+ */
1757
+ proto.ThorchainMsgDeposit.prototype.toObject = function(opt_includeInstance) {
1758
+ return proto.ThorchainMsgDeposit.toObject(opt_includeInstance, this);
1759
+ };
1760
+
1761
+
1762
+ /**
1763
+ * Static version of the {@see toObject} method.
1764
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1765
+ * the JSPB instance for transitional soy proto support:
1766
+ * http://goto/soy-param-migration
1767
+ * @param {!proto.ThorchainMsgDeposit} msg The msg instance to transform.
1768
+ * @return {!Object}
1769
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1770
+ */
1771
+ proto.ThorchainMsgDeposit.toObject = function(includeInstance, msg) {
1772
+ var f, obj = {
1773
+ asset: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
1774
+ amount: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
1775
+ memo: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
1776
+ signer: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f
1777
+ };
1778
+
1779
+ if (includeInstance) {
1780
+ obj.$jspbMessageInstance = msg;
1781
+ }
1782
+ return obj;
1783
+ };
1784
+ }
1785
+
1786
+
1787
+ /**
1788
+ * Deserializes binary data (in protobuf wire format).
1789
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1790
+ * @return {!proto.ThorchainMsgDeposit}
1791
+ */
1792
+ proto.ThorchainMsgDeposit.deserializeBinary = function(bytes) {
1793
+ var reader = new jspb.BinaryReader(bytes);
1794
+ var msg = new proto.ThorchainMsgDeposit;
1795
+ return proto.ThorchainMsgDeposit.deserializeBinaryFromReader(msg, reader);
1796
+ };
1797
+
1798
+
1799
+ /**
1800
+ * Deserializes binary data (in protobuf wire format) from the
1801
+ * given reader into the given message object.
1802
+ * @param {!proto.ThorchainMsgDeposit} msg The message object to deserialize into.
1803
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1804
+ * @return {!proto.ThorchainMsgDeposit}
1805
+ */
1806
+ proto.ThorchainMsgDeposit.deserializeBinaryFromReader = function(msg, reader) {
1807
+ while (reader.nextField()) {
1808
+ if (reader.isEndGroup()) {
1809
+ break;
1810
+ }
1811
+ var field = reader.getFieldNumber();
1812
+ switch (field) {
1813
+ case 1:
1814
+ var value = /** @type {string} */ (reader.readString());
1815
+ msg.setAsset(value);
1816
+ break;
1817
+ case 2:
1818
+ var value = /** @type {string} */ (reader.readUint64String());
1819
+ msg.setAmount(value);
1820
+ break;
1821
+ case 3:
1822
+ var value = /** @type {string} */ (reader.readString());
1823
+ msg.setMemo(value);
1824
+ break;
1825
+ case 4:
1826
+ var value = /** @type {string} */ (reader.readString());
1827
+ msg.setSigner(value);
1828
+ break;
1829
+ default:
1830
+ reader.skipField();
1831
+ break;
1832
+ }
1833
+ }
1834
+ return msg;
1835
+ };
1836
+
1837
+
1838
+ /**
1839
+ * Serializes the message to binary data (in protobuf wire format).
1840
+ * @return {!Uint8Array}
1841
+ */
1842
+ proto.ThorchainMsgDeposit.prototype.serializeBinary = function() {
1843
+ var writer = new jspb.BinaryWriter();
1844
+ proto.ThorchainMsgDeposit.serializeBinaryToWriter(this, writer);
1845
+ return writer.getResultBuffer();
1846
+ };
1847
+
1848
+
1849
+ /**
1850
+ * Serializes the given message to binary data (in protobuf wire
1851
+ * format), writing to the given BinaryWriter.
1852
+ * @param {!proto.ThorchainMsgDeposit} message
1853
+ * @param {!jspb.BinaryWriter} writer
1854
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1855
+ */
1856
+ proto.ThorchainMsgDeposit.serializeBinaryToWriter = function(message, writer) {
1857
+ var f = undefined;
1858
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1859
+ if (f != null) {
1860
+ writer.writeString(
1861
+ 1,
1862
+ f
1863
+ );
1864
+ }
1865
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1866
+ if (f != null) {
1867
+ writer.writeUint64String(
1868
+ 2,
1869
+ f
1870
+ );
1871
+ }
1872
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1873
+ if (f != null) {
1874
+ writer.writeString(
1875
+ 3,
1876
+ f
1877
+ );
1878
+ }
1879
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1880
+ if (f != null) {
1881
+ writer.writeString(
1882
+ 4,
1883
+ f
1884
+ );
1885
+ }
1886
+ };
1887
+
1888
+
1889
+ /**
1890
+ * optional string asset = 1;
1891
+ * @return {string}
1892
+ */
1893
+ proto.ThorchainMsgDeposit.prototype.getAsset = function() {
1894
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1895
+ };
1896
+
1897
+
1898
+ /**
1899
+ * @param {string} value
1900
+ * @return {!proto.ThorchainMsgDeposit} returns this
1901
+ */
1902
+ proto.ThorchainMsgDeposit.prototype.setAsset = function(value) {
1903
+ return jspb.Message.setField(this, 1, value);
1904
+ };
1905
+
1906
+
1907
+ /**
1908
+ * Clears the field making it undefined.
1909
+ * @return {!proto.ThorchainMsgDeposit} returns this
1910
+ */
1911
+ proto.ThorchainMsgDeposit.prototype.clearAsset = function() {
1912
+ return jspb.Message.setField(this, 1, undefined);
1913
+ };
1914
+
1915
+
1916
+ /**
1917
+ * Returns whether this field is set.
1918
+ * @return {boolean}
1919
+ */
1920
+ proto.ThorchainMsgDeposit.prototype.hasAsset = function() {
1921
+ return jspb.Message.getField(this, 1) != null;
1922
+ };
1923
+
1924
+
1925
+ /**
1926
+ * optional uint64 amount = 2;
1927
+ * @return {string}
1928
+ */
1929
+ proto.ThorchainMsgDeposit.prototype.getAmount = function() {
1930
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0"));
1931
+ };
1932
+
1933
+
1934
+ /**
1935
+ * @param {string} value
1936
+ * @return {!proto.ThorchainMsgDeposit} returns this
1937
+ */
1938
+ proto.ThorchainMsgDeposit.prototype.setAmount = function(value) {
1939
+ return jspb.Message.setField(this, 2, value);
1940
+ };
1941
+
1942
+
1943
+ /**
1944
+ * Clears the field making it undefined.
1945
+ * @return {!proto.ThorchainMsgDeposit} returns this
1946
+ */
1947
+ proto.ThorchainMsgDeposit.prototype.clearAmount = function() {
1948
+ return jspb.Message.setField(this, 2, undefined);
1949
+ };
1950
+
1951
+
1952
+ /**
1953
+ * Returns whether this field is set.
1954
+ * @return {boolean}
1955
+ */
1956
+ proto.ThorchainMsgDeposit.prototype.hasAmount = function() {
1957
+ return jspb.Message.getField(this, 2) != null;
1958
+ };
1959
+
1960
+
1961
+ /**
1962
+ * optional string memo = 3;
1963
+ * @return {string}
1964
+ */
1965
+ proto.ThorchainMsgDeposit.prototype.getMemo = function() {
1966
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1967
+ };
1968
+
1969
+
1970
+ /**
1971
+ * @param {string} value
1972
+ * @return {!proto.ThorchainMsgDeposit} returns this
1973
+ */
1974
+ proto.ThorchainMsgDeposit.prototype.setMemo = function(value) {
1975
+ return jspb.Message.setField(this, 3, value);
1976
+ };
1977
+
1978
+
1979
+ /**
1980
+ * Clears the field making it undefined.
1981
+ * @return {!proto.ThorchainMsgDeposit} returns this
1982
+ */
1983
+ proto.ThorchainMsgDeposit.prototype.clearMemo = function() {
1984
+ return jspb.Message.setField(this, 3, undefined);
1985
+ };
1986
+
1987
+
1988
+ /**
1989
+ * Returns whether this field is set.
1990
+ * @return {boolean}
1991
+ */
1992
+ proto.ThorchainMsgDeposit.prototype.hasMemo = function() {
1993
+ return jspb.Message.getField(this, 3) != null;
1994
+ };
1995
+
1996
+
1997
+ /**
1998
+ * optional string signer = 4;
1999
+ * @return {string}
2000
+ */
2001
+ proto.ThorchainMsgDeposit.prototype.getSigner = function() {
2002
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2003
+ };
2004
+
2005
+
2006
+ /**
2007
+ * @param {string} value
2008
+ * @return {!proto.ThorchainMsgDeposit} returns this
2009
+ */
2010
+ proto.ThorchainMsgDeposit.prototype.setSigner = function(value) {
2011
+ return jspb.Message.setField(this, 4, value);
2012
+ };
2013
+
2014
+
2015
+ /**
2016
+ * Clears the field making it undefined.
2017
+ * @return {!proto.ThorchainMsgDeposit} returns this
2018
+ */
2019
+ proto.ThorchainMsgDeposit.prototype.clearSigner = function() {
2020
+ return jspb.Message.setField(this, 4, undefined);
2021
+ };
2022
+
2023
+
2024
+ /**
2025
+ * Returns whether this field is set.
2026
+ * @return {boolean}
2027
+ */
2028
+ proto.ThorchainMsgDeposit.prototype.hasSigner = function() {
2029
+ return jspb.Message.getField(this, 4) != null;
2030
+ };
2031
+
2032
+
2033
+
2034
+
2035
+
2036
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2037
+ /**
2038
+ * Creates an object representation of this proto.
2039
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2040
+ * Optional fields that are not set will be set to undefined.
2041
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2042
+ * For the list of reserved names please see:
2043
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2044
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2045
+ * JSPB instance for transitional soy proto support:
2046
+ * http://goto/soy-param-migration
2047
+ * @return {!Object}
2048
+ */
2049
+ proto.ThorchainSignedTx.prototype.toObject = function(opt_includeInstance) {
2050
+ return proto.ThorchainSignedTx.toObject(opt_includeInstance, this);
2051
+ };
2052
+
2053
+
2054
+ /**
2055
+ * Static version of the {@see toObject} method.
2056
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2057
+ * the JSPB instance for transitional soy proto support:
2058
+ * http://goto/soy-param-migration
2059
+ * @param {!proto.ThorchainSignedTx} msg The msg instance to transform.
2060
+ * @return {!Object}
2061
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2062
+ */
2063
+ proto.ThorchainSignedTx.toObject = function(includeInstance, msg) {
2064
+ var f, obj = {
2065
+ publicKey: msg.getPublicKey_asB64(),
2066
+ signature: msg.getSignature_asB64()
2067
+ };
2068
+
2069
+ if (includeInstance) {
2070
+ obj.$jspbMessageInstance = msg;
2071
+ }
2072
+ return obj;
2073
+ };
2074
+ }
2075
+
2076
+
2077
+ /**
2078
+ * Deserializes binary data (in protobuf wire format).
2079
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2080
+ * @return {!proto.ThorchainSignedTx}
2081
+ */
2082
+ proto.ThorchainSignedTx.deserializeBinary = function(bytes) {
2083
+ var reader = new jspb.BinaryReader(bytes);
2084
+ var msg = new proto.ThorchainSignedTx;
2085
+ return proto.ThorchainSignedTx.deserializeBinaryFromReader(msg, reader);
2086
+ };
2087
+
2088
+
2089
+ /**
2090
+ * Deserializes binary data (in protobuf wire format) from the
2091
+ * given reader into the given message object.
2092
+ * @param {!proto.ThorchainSignedTx} msg The message object to deserialize into.
2093
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2094
+ * @return {!proto.ThorchainSignedTx}
2095
+ */
2096
+ proto.ThorchainSignedTx.deserializeBinaryFromReader = function(msg, reader) {
2097
+ while (reader.nextField()) {
2098
+ if (reader.isEndGroup()) {
2099
+ break;
2100
+ }
2101
+ var field = reader.getFieldNumber();
2102
+ switch (field) {
2103
+ case 1:
2104
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2105
+ msg.setPublicKey(value);
2106
+ break;
2107
+ case 2:
2108
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2109
+ msg.setSignature(value);
2110
+ break;
2111
+ default:
2112
+ reader.skipField();
2113
+ break;
2114
+ }
2115
+ }
2116
+ return msg;
2117
+ };
2118
+
2119
+
2120
+ /**
2121
+ * Serializes the message to binary data (in protobuf wire format).
2122
+ * @return {!Uint8Array}
2123
+ */
2124
+ proto.ThorchainSignedTx.prototype.serializeBinary = function() {
2125
+ var writer = new jspb.BinaryWriter();
2126
+ proto.ThorchainSignedTx.serializeBinaryToWriter(this, writer);
2127
+ return writer.getResultBuffer();
2128
+ };
2129
+
2130
+
2131
+ /**
2132
+ * Serializes the given message to binary data (in protobuf wire
2133
+ * format), writing to the given BinaryWriter.
2134
+ * @param {!proto.ThorchainSignedTx} message
2135
+ * @param {!jspb.BinaryWriter} writer
2136
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2137
+ */
2138
+ proto.ThorchainSignedTx.serializeBinaryToWriter = function(message, writer) {
2139
+ var f = undefined;
2140
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1));
2141
+ if (f != null) {
2142
+ writer.writeBytes(
2143
+ 1,
2144
+ f
2145
+ );
2146
+ }
2147
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
2148
+ if (f != null) {
2149
+ writer.writeBytes(
2150
+ 2,
2151
+ f
2152
+ );
2153
+ }
2154
+ };
2155
+
2156
+
2157
+ /**
2158
+ * optional bytes public_key = 1;
2159
+ * @return {!(string|Uint8Array)}
2160
+ */
2161
+ proto.ThorchainSignedTx.prototype.getPublicKey = function() {
2162
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2163
+ };
2164
+
2165
+
2166
+ /**
2167
+ * optional bytes public_key = 1;
2168
+ * This is a type-conversion wrapper around `getPublicKey()`
2169
+ * @return {string}
2170
+ */
2171
+ proto.ThorchainSignedTx.prototype.getPublicKey_asB64 = function() {
2172
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
2173
+ this.getPublicKey()));
2174
+ };
2175
+
2176
+
2177
+ /**
2178
+ * optional bytes public_key = 1;
2179
+ * Note that Uint8Array is not supported on all browsers.
2180
+ * @see http://caniuse.com/Uint8Array
2181
+ * This is a type-conversion wrapper around `getPublicKey()`
2182
+ * @return {!Uint8Array}
2183
+ */
2184
+ proto.ThorchainSignedTx.prototype.getPublicKey_asU8 = function() {
2185
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2186
+ this.getPublicKey()));
2187
+ };
2188
+
2189
+
2190
+ /**
2191
+ * @param {!(string|Uint8Array)} value
2192
+ * @return {!proto.ThorchainSignedTx} returns this
2193
+ */
2194
+ proto.ThorchainSignedTx.prototype.setPublicKey = function(value) {
2195
+ return jspb.Message.setField(this, 1, value);
2196
+ };
2197
+
2198
+
2199
+ /**
2200
+ * Clears the field making it undefined.
2201
+ * @return {!proto.ThorchainSignedTx} returns this
2202
+ */
2203
+ proto.ThorchainSignedTx.prototype.clearPublicKey = function() {
2204
+ return jspb.Message.setField(this, 1, undefined);
2205
+ };
2206
+
2207
+
2208
+ /**
2209
+ * Returns whether this field is set.
2210
+ * @return {boolean}
2211
+ */
2212
+ proto.ThorchainSignedTx.prototype.hasPublicKey = function() {
2213
+ return jspb.Message.getField(this, 1) != null;
2214
+ };
2215
+
2216
+
2217
+ /**
2218
+ * optional bytes signature = 2;
2219
+ * @return {!(string|Uint8Array)}
2220
+ */
2221
+ proto.ThorchainSignedTx.prototype.getSignature = function() {
2222
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2223
+ };
2224
+
2225
+
2226
+ /**
2227
+ * optional bytes signature = 2;
2228
+ * This is a type-conversion wrapper around `getSignature()`
2229
+ * @return {string}
2230
+ */
2231
+ proto.ThorchainSignedTx.prototype.getSignature_asB64 = function() {
2232
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
2233
+ this.getSignature()));
2234
+ };
2235
+
2236
+
2237
+ /**
2238
+ * optional bytes signature = 2;
2239
+ * Note that Uint8Array is not supported on all browsers.
2240
+ * @see http://caniuse.com/Uint8Array
2241
+ * This is a type-conversion wrapper around `getSignature()`
2242
+ * @return {!Uint8Array}
2243
+ */
2244
+ proto.ThorchainSignedTx.prototype.getSignature_asU8 = function() {
2245
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2246
+ this.getSignature()));
2247
+ };
2248
+
2249
+
2250
+ /**
2251
+ * @param {!(string|Uint8Array)} value
2252
+ * @return {!proto.ThorchainSignedTx} returns this
2253
+ */
2254
+ proto.ThorchainSignedTx.prototype.setSignature = function(value) {
2255
+ return jspb.Message.setField(this, 2, value);
2256
+ };
2257
+
2258
+
2259
+ /**
2260
+ * Clears the field making it undefined.
2261
+ * @return {!proto.ThorchainSignedTx} returns this
2262
+ */
2263
+ proto.ThorchainSignedTx.prototype.clearSignature = function() {
2264
+ return jspb.Message.setField(this, 2, undefined);
2265
+ };
2266
+
2267
+
2268
+ /**
2269
+ * Returns whether this field is set.
2270
+ * @return {boolean}
2271
+ */
2272
+ proto.ThorchainSignedTx.prototype.hasSignature = function() {
2273
+ return jspb.Message.getField(this, 2) != null;
2274
+ };
2275
+
2276
+
2277
+ goog.object.extend(exports, proto);