@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,1692 @@
1
+ // source: messages-nano.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
+ goog.exportSymbol('proto.NanoAddress', null, global);
25
+ goog.exportSymbol('proto.NanoGetAddress', null, global);
26
+ goog.exportSymbol('proto.NanoSignTx', null, global);
27
+ goog.exportSymbol('proto.NanoSignTx.ParentBlock', null, global);
28
+ goog.exportSymbol('proto.NanoSignedTx', null, global);
29
+ /**
30
+ * Generated by JsPbCodeGenerator.
31
+ * @param {Array=} opt_data Optional initial data array, typically from a
32
+ * server response, or constructed directly in Javascript. The array is used
33
+ * in place and becomes part of the constructed object. It is not cloned.
34
+ * If no data is provided, the constructed object will be empty, but still
35
+ * valid.
36
+ * @extends {jspb.Message}
37
+ * @constructor
38
+ */
39
+ proto.NanoGetAddress = function(opt_data) {
40
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.NanoGetAddress.repeatedFields_, null);
41
+ };
42
+ goog.inherits(proto.NanoGetAddress, jspb.Message);
43
+ if (goog.DEBUG && !COMPILED) {
44
+ /**
45
+ * @public
46
+ * @override
47
+ */
48
+ proto.NanoGetAddress.displayName = 'proto.NanoGetAddress';
49
+ }
50
+ /**
51
+ * Generated by JsPbCodeGenerator.
52
+ * @param {Array=} opt_data Optional initial data array, typically from a
53
+ * server response, or constructed directly in Javascript. The array is used
54
+ * in place and becomes part of the constructed object. It is not cloned.
55
+ * If no data is provided, the constructed object will be empty, but still
56
+ * valid.
57
+ * @extends {jspb.Message}
58
+ * @constructor
59
+ */
60
+ proto.NanoAddress = function(opt_data) {
61
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
62
+ };
63
+ goog.inherits(proto.NanoAddress, jspb.Message);
64
+ if (goog.DEBUG && !COMPILED) {
65
+ /**
66
+ * @public
67
+ * @override
68
+ */
69
+ proto.NanoAddress.displayName = 'proto.NanoAddress';
70
+ }
71
+ /**
72
+ * Generated by JsPbCodeGenerator.
73
+ * @param {Array=} opt_data Optional initial data array, typically from a
74
+ * server response, or constructed directly in Javascript. The array is used
75
+ * in place and becomes part of the constructed object. It is not cloned.
76
+ * If no data is provided, the constructed object will be empty, but still
77
+ * valid.
78
+ * @extends {jspb.Message}
79
+ * @constructor
80
+ */
81
+ proto.NanoSignTx = function(opt_data) {
82
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.NanoSignTx.repeatedFields_, null);
83
+ };
84
+ goog.inherits(proto.NanoSignTx, jspb.Message);
85
+ if (goog.DEBUG && !COMPILED) {
86
+ /**
87
+ * @public
88
+ * @override
89
+ */
90
+ proto.NanoSignTx.displayName = 'proto.NanoSignTx';
91
+ }
92
+ /**
93
+ * Generated by JsPbCodeGenerator.
94
+ * @param {Array=} opt_data Optional initial data array, typically from a
95
+ * server response, or constructed directly in Javascript. The array is used
96
+ * in place and becomes part of the constructed object. It is not cloned.
97
+ * If no data is provided, the constructed object will be empty, but still
98
+ * valid.
99
+ * @extends {jspb.Message}
100
+ * @constructor
101
+ */
102
+ proto.NanoSignTx.ParentBlock = function(opt_data) {
103
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
104
+ };
105
+ goog.inherits(proto.NanoSignTx.ParentBlock, jspb.Message);
106
+ if (goog.DEBUG && !COMPILED) {
107
+ /**
108
+ * @public
109
+ * @override
110
+ */
111
+ proto.NanoSignTx.ParentBlock.displayName = 'proto.NanoSignTx.ParentBlock';
112
+ }
113
+ /**
114
+ * Generated by JsPbCodeGenerator.
115
+ * @param {Array=} opt_data Optional initial data array, typically from a
116
+ * server response, or constructed directly in Javascript. The array is used
117
+ * in place and becomes part of the constructed object. It is not cloned.
118
+ * If no data is provided, the constructed object will be empty, but still
119
+ * valid.
120
+ * @extends {jspb.Message}
121
+ * @constructor
122
+ */
123
+ proto.NanoSignedTx = function(opt_data) {
124
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
125
+ };
126
+ goog.inherits(proto.NanoSignedTx, jspb.Message);
127
+ if (goog.DEBUG && !COMPILED) {
128
+ /**
129
+ * @public
130
+ * @override
131
+ */
132
+ proto.NanoSignedTx.displayName = 'proto.NanoSignedTx';
133
+ }
134
+
135
+ /**
136
+ * List of repeated fields within this message type.
137
+ * @private {!Array<number>}
138
+ * @const
139
+ */
140
+ proto.NanoGetAddress.repeatedFields_ = [1];
141
+
142
+
143
+
144
+ if (jspb.Message.GENERATE_TO_OBJECT) {
145
+ /**
146
+ * Creates an object representation of this proto.
147
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
148
+ * Optional fields that are not set will be set to undefined.
149
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
150
+ * For the list of reserved names please see:
151
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
152
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
153
+ * JSPB instance for transitional soy proto support:
154
+ * http://goto/soy-param-migration
155
+ * @return {!Object}
156
+ */
157
+ proto.NanoGetAddress.prototype.toObject = function(opt_includeInstance) {
158
+ return proto.NanoGetAddress.toObject(opt_includeInstance, this);
159
+ };
160
+
161
+
162
+ /**
163
+ * Static version of the {@see toObject} method.
164
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
165
+ * the JSPB instance for transitional soy proto support:
166
+ * http://goto/soy-param-migration
167
+ * @param {!proto.NanoGetAddress} msg The msg instance to transform.
168
+ * @return {!Object}
169
+ * @suppress {unusedLocalVariables} f is only used for nested messages
170
+ */
171
+ proto.NanoGetAddress.toObject = function(includeInstance, msg) {
172
+ var f, obj = {
173
+ addressNList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
174
+ coinName: jspb.Message.getFieldWithDefault(msg, 2, "Nano"),
175
+ showDisplay: (f = jspb.Message.getBooleanField(msg, 3)) == null ? undefined : f
176
+ };
177
+
178
+ if (includeInstance) {
179
+ obj.$jspbMessageInstance = msg;
180
+ }
181
+ return obj;
182
+ };
183
+ }
184
+
185
+
186
+ /**
187
+ * Deserializes binary data (in protobuf wire format).
188
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
189
+ * @return {!proto.NanoGetAddress}
190
+ */
191
+ proto.NanoGetAddress.deserializeBinary = function(bytes) {
192
+ var reader = new jspb.BinaryReader(bytes);
193
+ var msg = new proto.NanoGetAddress;
194
+ return proto.NanoGetAddress.deserializeBinaryFromReader(msg, reader);
195
+ };
196
+
197
+
198
+ /**
199
+ * Deserializes binary data (in protobuf wire format) from the
200
+ * given reader into the given message object.
201
+ * @param {!proto.NanoGetAddress} msg The message object to deserialize into.
202
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
203
+ * @return {!proto.NanoGetAddress}
204
+ */
205
+ proto.NanoGetAddress.deserializeBinaryFromReader = function(msg, reader) {
206
+ while (reader.nextField()) {
207
+ if (reader.isEndGroup()) {
208
+ break;
209
+ }
210
+ var field = reader.getFieldNumber();
211
+ switch (field) {
212
+ case 1:
213
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]);
214
+ for (var i = 0; i < values.length; i++) {
215
+ msg.addAddressN(values[i]);
216
+ }
217
+ break;
218
+ case 2:
219
+ var value = /** @type {string} */ (reader.readString());
220
+ msg.setCoinName(value);
221
+ break;
222
+ case 3:
223
+ var value = /** @type {boolean} */ (reader.readBool());
224
+ msg.setShowDisplay(value);
225
+ break;
226
+ default:
227
+ reader.skipField();
228
+ break;
229
+ }
230
+ }
231
+ return msg;
232
+ };
233
+
234
+
235
+ /**
236
+ * Serializes the message to binary data (in protobuf wire format).
237
+ * @return {!Uint8Array}
238
+ */
239
+ proto.NanoGetAddress.prototype.serializeBinary = function() {
240
+ var writer = new jspb.BinaryWriter();
241
+ proto.NanoGetAddress.serializeBinaryToWriter(this, writer);
242
+ return writer.getResultBuffer();
243
+ };
244
+
245
+
246
+ /**
247
+ * Serializes the given message to binary data (in protobuf wire
248
+ * format), writing to the given BinaryWriter.
249
+ * @param {!proto.NanoGetAddress} message
250
+ * @param {!jspb.BinaryWriter} writer
251
+ * @suppress {unusedLocalVariables} f is only used for nested messages
252
+ */
253
+ proto.NanoGetAddress.serializeBinaryToWriter = function(message, writer) {
254
+ var f = undefined;
255
+ f = message.getAddressNList();
256
+ if (f.length > 0) {
257
+ writer.writeRepeatedUint32(
258
+ 1,
259
+ f
260
+ );
261
+ }
262
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
263
+ if (f != null) {
264
+ writer.writeString(
265
+ 2,
266
+ f
267
+ );
268
+ }
269
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 3));
270
+ if (f != null) {
271
+ writer.writeBool(
272
+ 3,
273
+ f
274
+ );
275
+ }
276
+ };
277
+
278
+
279
+ /**
280
+ * repeated uint32 address_n = 1;
281
+ * @return {!Array<number>}
282
+ */
283
+ proto.NanoGetAddress.prototype.getAddressNList = function() {
284
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 1));
285
+ };
286
+
287
+
288
+ /**
289
+ * @param {!Array<number>} value
290
+ * @return {!proto.NanoGetAddress} returns this
291
+ */
292
+ proto.NanoGetAddress.prototype.setAddressNList = function(value) {
293
+ return jspb.Message.setField(this, 1, value || []);
294
+ };
295
+
296
+
297
+ /**
298
+ * @param {number} value
299
+ * @param {number=} opt_index
300
+ * @return {!proto.NanoGetAddress} returns this
301
+ */
302
+ proto.NanoGetAddress.prototype.addAddressN = function(value, opt_index) {
303
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
304
+ };
305
+
306
+
307
+ /**
308
+ * Clears the list making it empty but non-null.
309
+ * @return {!proto.NanoGetAddress} returns this
310
+ */
311
+ proto.NanoGetAddress.prototype.clearAddressNList = function() {
312
+ return this.setAddressNList([]);
313
+ };
314
+
315
+
316
+ /**
317
+ * optional string coin_name = 2;
318
+ * @return {string}
319
+ */
320
+ proto.NanoGetAddress.prototype.getCoinName = function() {
321
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "Nano"));
322
+ };
323
+
324
+
325
+ /**
326
+ * @param {string} value
327
+ * @return {!proto.NanoGetAddress} returns this
328
+ */
329
+ proto.NanoGetAddress.prototype.setCoinName = function(value) {
330
+ return jspb.Message.setField(this, 2, value);
331
+ };
332
+
333
+
334
+ /**
335
+ * Clears the field making it undefined.
336
+ * @return {!proto.NanoGetAddress} returns this
337
+ */
338
+ proto.NanoGetAddress.prototype.clearCoinName = function() {
339
+ return jspb.Message.setField(this, 2, undefined);
340
+ };
341
+
342
+
343
+ /**
344
+ * Returns whether this field is set.
345
+ * @return {boolean}
346
+ */
347
+ proto.NanoGetAddress.prototype.hasCoinName = function() {
348
+ return jspb.Message.getField(this, 2) != null;
349
+ };
350
+
351
+
352
+ /**
353
+ * optional bool show_display = 3;
354
+ * @return {boolean}
355
+ */
356
+ proto.NanoGetAddress.prototype.getShowDisplay = function() {
357
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
358
+ };
359
+
360
+
361
+ /**
362
+ * @param {boolean} value
363
+ * @return {!proto.NanoGetAddress} returns this
364
+ */
365
+ proto.NanoGetAddress.prototype.setShowDisplay = function(value) {
366
+ return jspb.Message.setField(this, 3, value);
367
+ };
368
+
369
+
370
+ /**
371
+ * Clears the field making it undefined.
372
+ * @return {!proto.NanoGetAddress} returns this
373
+ */
374
+ proto.NanoGetAddress.prototype.clearShowDisplay = function() {
375
+ return jspb.Message.setField(this, 3, undefined);
376
+ };
377
+
378
+
379
+ /**
380
+ * Returns whether this field is set.
381
+ * @return {boolean}
382
+ */
383
+ proto.NanoGetAddress.prototype.hasShowDisplay = function() {
384
+ return jspb.Message.getField(this, 3) != null;
385
+ };
386
+
387
+
388
+
389
+
390
+
391
+ if (jspb.Message.GENERATE_TO_OBJECT) {
392
+ /**
393
+ * Creates an object representation of this proto.
394
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
395
+ * Optional fields that are not set will be set to undefined.
396
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
397
+ * For the list of reserved names please see:
398
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
399
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
400
+ * JSPB instance for transitional soy proto support:
401
+ * http://goto/soy-param-migration
402
+ * @return {!Object}
403
+ */
404
+ proto.NanoAddress.prototype.toObject = function(opt_includeInstance) {
405
+ return proto.NanoAddress.toObject(opt_includeInstance, this);
406
+ };
407
+
408
+
409
+ /**
410
+ * Static version of the {@see toObject} method.
411
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
412
+ * the JSPB instance for transitional soy proto support:
413
+ * http://goto/soy-param-migration
414
+ * @param {!proto.NanoAddress} msg The msg instance to transform.
415
+ * @return {!Object}
416
+ * @suppress {unusedLocalVariables} f is only used for nested messages
417
+ */
418
+ proto.NanoAddress.toObject = function(includeInstance, msg) {
419
+ var f, obj = {
420
+ address: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f
421
+ };
422
+
423
+ if (includeInstance) {
424
+ obj.$jspbMessageInstance = msg;
425
+ }
426
+ return obj;
427
+ };
428
+ }
429
+
430
+
431
+ /**
432
+ * Deserializes binary data (in protobuf wire format).
433
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
434
+ * @return {!proto.NanoAddress}
435
+ */
436
+ proto.NanoAddress.deserializeBinary = function(bytes) {
437
+ var reader = new jspb.BinaryReader(bytes);
438
+ var msg = new proto.NanoAddress;
439
+ return proto.NanoAddress.deserializeBinaryFromReader(msg, reader);
440
+ };
441
+
442
+
443
+ /**
444
+ * Deserializes binary data (in protobuf wire format) from the
445
+ * given reader into the given message object.
446
+ * @param {!proto.NanoAddress} msg The message object to deserialize into.
447
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
448
+ * @return {!proto.NanoAddress}
449
+ */
450
+ proto.NanoAddress.deserializeBinaryFromReader = function(msg, reader) {
451
+ while (reader.nextField()) {
452
+ if (reader.isEndGroup()) {
453
+ break;
454
+ }
455
+ var field = reader.getFieldNumber();
456
+ switch (field) {
457
+ case 1:
458
+ var value = /** @type {string} */ (reader.readString());
459
+ msg.setAddress(value);
460
+ break;
461
+ default:
462
+ reader.skipField();
463
+ break;
464
+ }
465
+ }
466
+ return msg;
467
+ };
468
+
469
+
470
+ /**
471
+ * Serializes the message to binary data (in protobuf wire format).
472
+ * @return {!Uint8Array}
473
+ */
474
+ proto.NanoAddress.prototype.serializeBinary = function() {
475
+ var writer = new jspb.BinaryWriter();
476
+ proto.NanoAddress.serializeBinaryToWriter(this, writer);
477
+ return writer.getResultBuffer();
478
+ };
479
+
480
+
481
+ /**
482
+ * Serializes the given message to binary data (in protobuf wire
483
+ * format), writing to the given BinaryWriter.
484
+ * @param {!proto.NanoAddress} message
485
+ * @param {!jspb.BinaryWriter} writer
486
+ * @suppress {unusedLocalVariables} f is only used for nested messages
487
+ */
488
+ proto.NanoAddress.serializeBinaryToWriter = function(message, writer) {
489
+ var f = undefined;
490
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
491
+ if (f != null) {
492
+ writer.writeString(
493
+ 1,
494
+ f
495
+ );
496
+ }
497
+ };
498
+
499
+
500
+ /**
501
+ * optional string address = 1;
502
+ * @return {string}
503
+ */
504
+ proto.NanoAddress.prototype.getAddress = function() {
505
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
506
+ };
507
+
508
+
509
+ /**
510
+ * @param {string} value
511
+ * @return {!proto.NanoAddress} returns this
512
+ */
513
+ proto.NanoAddress.prototype.setAddress = function(value) {
514
+ return jspb.Message.setField(this, 1, value);
515
+ };
516
+
517
+
518
+ /**
519
+ * Clears the field making it undefined.
520
+ * @return {!proto.NanoAddress} returns this
521
+ */
522
+ proto.NanoAddress.prototype.clearAddress = function() {
523
+ return jspb.Message.setField(this, 1, undefined);
524
+ };
525
+
526
+
527
+ /**
528
+ * Returns whether this field is set.
529
+ * @return {boolean}
530
+ */
531
+ proto.NanoAddress.prototype.hasAddress = function() {
532
+ return jspb.Message.getField(this, 1) != null;
533
+ };
534
+
535
+
536
+
537
+ /**
538
+ * List of repeated fields within this message type.
539
+ * @private {!Array<number>}
540
+ * @const
541
+ */
542
+ proto.NanoSignTx.repeatedFields_ = [1,6];
543
+
544
+
545
+
546
+ if (jspb.Message.GENERATE_TO_OBJECT) {
547
+ /**
548
+ * Creates an object representation of this proto.
549
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
550
+ * Optional fields that are not set will be set to undefined.
551
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
552
+ * For the list of reserved names please see:
553
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
554
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
555
+ * JSPB instance for transitional soy proto support:
556
+ * http://goto/soy-param-migration
557
+ * @return {!Object}
558
+ */
559
+ proto.NanoSignTx.prototype.toObject = function(opt_includeInstance) {
560
+ return proto.NanoSignTx.toObject(opt_includeInstance, this);
561
+ };
562
+
563
+
564
+ /**
565
+ * Static version of the {@see toObject} method.
566
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
567
+ * the JSPB instance for transitional soy proto support:
568
+ * http://goto/soy-param-migration
569
+ * @param {!proto.NanoSignTx} msg The msg instance to transform.
570
+ * @return {!Object}
571
+ * @suppress {unusedLocalVariables} f is only used for nested messages
572
+ */
573
+ proto.NanoSignTx.toObject = function(includeInstance, msg) {
574
+ var f, obj = {
575
+ addressNList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
576
+ coinName: jspb.Message.getFieldWithDefault(msg, 2, "Nano"),
577
+ parentBlock: (f = msg.getParentBlock()) && proto.NanoSignTx.ParentBlock.toObject(includeInstance, f),
578
+ linkHash: msg.getLinkHash_asB64(),
579
+ linkRecipient: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
580
+ linkRecipientNList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f,
581
+ representative: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
582
+ balance: msg.getBalance_asB64()
583
+ };
584
+
585
+ if (includeInstance) {
586
+ obj.$jspbMessageInstance = msg;
587
+ }
588
+ return obj;
589
+ };
590
+ }
591
+
592
+
593
+ /**
594
+ * Deserializes binary data (in protobuf wire format).
595
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
596
+ * @return {!proto.NanoSignTx}
597
+ */
598
+ proto.NanoSignTx.deserializeBinary = function(bytes) {
599
+ var reader = new jspb.BinaryReader(bytes);
600
+ var msg = new proto.NanoSignTx;
601
+ return proto.NanoSignTx.deserializeBinaryFromReader(msg, reader);
602
+ };
603
+
604
+
605
+ /**
606
+ * Deserializes binary data (in protobuf wire format) from the
607
+ * given reader into the given message object.
608
+ * @param {!proto.NanoSignTx} msg The message object to deserialize into.
609
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
610
+ * @return {!proto.NanoSignTx}
611
+ */
612
+ proto.NanoSignTx.deserializeBinaryFromReader = function(msg, reader) {
613
+ while (reader.nextField()) {
614
+ if (reader.isEndGroup()) {
615
+ break;
616
+ }
617
+ var field = reader.getFieldNumber();
618
+ switch (field) {
619
+ case 1:
620
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]);
621
+ for (var i = 0; i < values.length; i++) {
622
+ msg.addAddressN(values[i]);
623
+ }
624
+ break;
625
+ case 2:
626
+ var value = /** @type {string} */ (reader.readString());
627
+ msg.setCoinName(value);
628
+ break;
629
+ case 3:
630
+ var value = new proto.NanoSignTx.ParentBlock;
631
+ reader.readMessage(value,proto.NanoSignTx.ParentBlock.deserializeBinaryFromReader);
632
+ msg.setParentBlock(value);
633
+ break;
634
+ case 4:
635
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
636
+ msg.setLinkHash(value);
637
+ break;
638
+ case 5:
639
+ var value = /** @type {string} */ (reader.readString());
640
+ msg.setLinkRecipient(value);
641
+ break;
642
+ case 6:
643
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]);
644
+ for (var i = 0; i < values.length; i++) {
645
+ msg.addLinkRecipientN(values[i]);
646
+ }
647
+ break;
648
+ case 7:
649
+ var value = /** @type {string} */ (reader.readString());
650
+ msg.setRepresentative(value);
651
+ break;
652
+ case 8:
653
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
654
+ msg.setBalance(value);
655
+ break;
656
+ default:
657
+ reader.skipField();
658
+ break;
659
+ }
660
+ }
661
+ return msg;
662
+ };
663
+
664
+
665
+ /**
666
+ * Serializes the message to binary data (in protobuf wire format).
667
+ * @return {!Uint8Array}
668
+ */
669
+ proto.NanoSignTx.prototype.serializeBinary = function() {
670
+ var writer = new jspb.BinaryWriter();
671
+ proto.NanoSignTx.serializeBinaryToWriter(this, writer);
672
+ return writer.getResultBuffer();
673
+ };
674
+
675
+
676
+ /**
677
+ * Serializes the given message to binary data (in protobuf wire
678
+ * format), writing to the given BinaryWriter.
679
+ * @param {!proto.NanoSignTx} message
680
+ * @param {!jspb.BinaryWriter} writer
681
+ * @suppress {unusedLocalVariables} f is only used for nested messages
682
+ */
683
+ proto.NanoSignTx.serializeBinaryToWriter = function(message, writer) {
684
+ var f = undefined;
685
+ f = message.getAddressNList();
686
+ if (f.length > 0) {
687
+ writer.writeRepeatedUint32(
688
+ 1,
689
+ f
690
+ );
691
+ }
692
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
693
+ if (f != null) {
694
+ writer.writeString(
695
+ 2,
696
+ f
697
+ );
698
+ }
699
+ f = message.getParentBlock();
700
+ if (f != null) {
701
+ writer.writeMessage(
702
+ 3,
703
+ f,
704
+ proto.NanoSignTx.ParentBlock.serializeBinaryToWriter
705
+ );
706
+ }
707
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 4));
708
+ if (f != null) {
709
+ writer.writeBytes(
710
+ 4,
711
+ f
712
+ );
713
+ }
714
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
715
+ if (f != null) {
716
+ writer.writeString(
717
+ 5,
718
+ f
719
+ );
720
+ }
721
+ f = message.getLinkRecipientNList();
722
+ if (f.length > 0) {
723
+ writer.writeRepeatedUint32(
724
+ 6,
725
+ f
726
+ );
727
+ }
728
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
729
+ if (f != null) {
730
+ writer.writeString(
731
+ 7,
732
+ f
733
+ );
734
+ }
735
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 8));
736
+ if (f != null) {
737
+ writer.writeBytes(
738
+ 8,
739
+ f
740
+ );
741
+ }
742
+ };
743
+
744
+
745
+
746
+
747
+
748
+ if (jspb.Message.GENERATE_TO_OBJECT) {
749
+ /**
750
+ * Creates an object representation of this proto.
751
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
752
+ * Optional fields that are not set will be set to undefined.
753
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
754
+ * For the list of reserved names please see:
755
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
756
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
757
+ * JSPB instance for transitional soy proto support:
758
+ * http://goto/soy-param-migration
759
+ * @return {!Object}
760
+ */
761
+ proto.NanoSignTx.ParentBlock.prototype.toObject = function(opt_includeInstance) {
762
+ return proto.NanoSignTx.ParentBlock.toObject(opt_includeInstance, this);
763
+ };
764
+
765
+
766
+ /**
767
+ * Static version of the {@see toObject} method.
768
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
769
+ * the JSPB instance for transitional soy proto support:
770
+ * http://goto/soy-param-migration
771
+ * @param {!proto.NanoSignTx.ParentBlock} msg The msg instance to transform.
772
+ * @return {!Object}
773
+ * @suppress {unusedLocalVariables} f is only used for nested messages
774
+ */
775
+ proto.NanoSignTx.ParentBlock.toObject = function(includeInstance, msg) {
776
+ var f, obj = {
777
+ parentHash: msg.getParentHash_asB64(),
778
+ link: msg.getLink_asB64(),
779
+ representative: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
780
+ balance: msg.getBalance_asB64()
781
+ };
782
+
783
+ if (includeInstance) {
784
+ obj.$jspbMessageInstance = msg;
785
+ }
786
+ return obj;
787
+ };
788
+ }
789
+
790
+
791
+ /**
792
+ * Deserializes binary data (in protobuf wire format).
793
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
794
+ * @return {!proto.NanoSignTx.ParentBlock}
795
+ */
796
+ proto.NanoSignTx.ParentBlock.deserializeBinary = function(bytes) {
797
+ var reader = new jspb.BinaryReader(bytes);
798
+ var msg = new proto.NanoSignTx.ParentBlock;
799
+ return proto.NanoSignTx.ParentBlock.deserializeBinaryFromReader(msg, reader);
800
+ };
801
+
802
+
803
+ /**
804
+ * Deserializes binary data (in protobuf wire format) from the
805
+ * given reader into the given message object.
806
+ * @param {!proto.NanoSignTx.ParentBlock} msg The message object to deserialize into.
807
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
808
+ * @return {!proto.NanoSignTx.ParentBlock}
809
+ */
810
+ proto.NanoSignTx.ParentBlock.deserializeBinaryFromReader = function(msg, reader) {
811
+ while (reader.nextField()) {
812
+ if (reader.isEndGroup()) {
813
+ break;
814
+ }
815
+ var field = reader.getFieldNumber();
816
+ switch (field) {
817
+ case 1:
818
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
819
+ msg.setParentHash(value);
820
+ break;
821
+ case 2:
822
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
823
+ msg.setLink(value);
824
+ break;
825
+ case 4:
826
+ var value = /** @type {string} */ (reader.readString());
827
+ msg.setRepresentative(value);
828
+ break;
829
+ case 5:
830
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
831
+ msg.setBalance(value);
832
+ break;
833
+ default:
834
+ reader.skipField();
835
+ break;
836
+ }
837
+ }
838
+ return msg;
839
+ };
840
+
841
+
842
+ /**
843
+ * Serializes the message to binary data (in protobuf wire format).
844
+ * @return {!Uint8Array}
845
+ */
846
+ proto.NanoSignTx.ParentBlock.prototype.serializeBinary = function() {
847
+ var writer = new jspb.BinaryWriter();
848
+ proto.NanoSignTx.ParentBlock.serializeBinaryToWriter(this, writer);
849
+ return writer.getResultBuffer();
850
+ };
851
+
852
+
853
+ /**
854
+ * Serializes the given message to binary data (in protobuf wire
855
+ * format), writing to the given BinaryWriter.
856
+ * @param {!proto.NanoSignTx.ParentBlock} message
857
+ * @param {!jspb.BinaryWriter} writer
858
+ * @suppress {unusedLocalVariables} f is only used for nested messages
859
+ */
860
+ proto.NanoSignTx.ParentBlock.serializeBinaryToWriter = function(message, writer) {
861
+ var f = undefined;
862
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1));
863
+ if (f != null) {
864
+ writer.writeBytes(
865
+ 1,
866
+ f
867
+ );
868
+ }
869
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
870
+ if (f != null) {
871
+ writer.writeBytes(
872
+ 2,
873
+ f
874
+ );
875
+ }
876
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
877
+ if (f != null) {
878
+ writer.writeString(
879
+ 4,
880
+ f
881
+ );
882
+ }
883
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5));
884
+ if (f != null) {
885
+ writer.writeBytes(
886
+ 5,
887
+ f
888
+ );
889
+ }
890
+ };
891
+
892
+
893
+ /**
894
+ * optional bytes parent_hash = 1;
895
+ * @return {!(string|Uint8Array)}
896
+ */
897
+ proto.NanoSignTx.ParentBlock.prototype.getParentHash = function() {
898
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
899
+ };
900
+
901
+
902
+ /**
903
+ * optional bytes parent_hash = 1;
904
+ * This is a type-conversion wrapper around `getParentHash()`
905
+ * @return {string}
906
+ */
907
+ proto.NanoSignTx.ParentBlock.prototype.getParentHash_asB64 = function() {
908
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
909
+ this.getParentHash()));
910
+ };
911
+
912
+
913
+ /**
914
+ * optional bytes parent_hash = 1;
915
+ * Note that Uint8Array is not supported on all browsers.
916
+ * @see http://caniuse.com/Uint8Array
917
+ * This is a type-conversion wrapper around `getParentHash()`
918
+ * @return {!Uint8Array}
919
+ */
920
+ proto.NanoSignTx.ParentBlock.prototype.getParentHash_asU8 = function() {
921
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
922
+ this.getParentHash()));
923
+ };
924
+
925
+
926
+ /**
927
+ * @param {!(string|Uint8Array)} value
928
+ * @return {!proto.NanoSignTx.ParentBlock} returns this
929
+ */
930
+ proto.NanoSignTx.ParentBlock.prototype.setParentHash = function(value) {
931
+ return jspb.Message.setField(this, 1, value);
932
+ };
933
+
934
+
935
+ /**
936
+ * Clears the field making it undefined.
937
+ * @return {!proto.NanoSignTx.ParentBlock} returns this
938
+ */
939
+ proto.NanoSignTx.ParentBlock.prototype.clearParentHash = function() {
940
+ return jspb.Message.setField(this, 1, undefined);
941
+ };
942
+
943
+
944
+ /**
945
+ * Returns whether this field is set.
946
+ * @return {boolean}
947
+ */
948
+ proto.NanoSignTx.ParentBlock.prototype.hasParentHash = function() {
949
+ return jspb.Message.getField(this, 1) != null;
950
+ };
951
+
952
+
953
+ /**
954
+ * optional bytes link = 2;
955
+ * @return {!(string|Uint8Array)}
956
+ */
957
+ proto.NanoSignTx.ParentBlock.prototype.getLink = function() {
958
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
959
+ };
960
+
961
+
962
+ /**
963
+ * optional bytes link = 2;
964
+ * This is a type-conversion wrapper around `getLink()`
965
+ * @return {string}
966
+ */
967
+ proto.NanoSignTx.ParentBlock.prototype.getLink_asB64 = function() {
968
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
969
+ this.getLink()));
970
+ };
971
+
972
+
973
+ /**
974
+ * optional bytes link = 2;
975
+ * Note that Uint8Array is not supported on all browsers.
976
+ * @see http://caniuse.com/Uint8Array
977
+ * This is a type-conversion wrapper around `getLink()`
978
+ * @return {!Uint8Array}
979
+ */
980
+ proto.NanoSignTx.ParentBlock.prototype.getLink_asU8 = function() {
981
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
982
+ this.getLink()));
983
+ };
984
+
985
+
986
+ /**
987
+ * @param {!(string|Uint8Array)} value
988
+ * @return {!proto.NanoSignTx.ParentBlock} returns this
989
+ */
990
+ proto.NanoSignTx.ParentBlock.prototype.setLink = function(value) {
991
+ return jspb.Message.setField(this, 2, value);
992
+ };
993
+
994
+
995
+ /**
996
+ * Clears the field making it undefined.
997
+ * @return {!proto.NanoSignTx.ParentBlock} returns this
998
+ */
999
+ proto.NanoSignTx.ParentBlock.prototype.clearLink = function() {
1000
+ return jspb.Message.setField(this, 2, undefined);
1001
+ };
1002
+
1003
+
1004
+ /**
1005
+ * Returns whether this field is set.
1006
+ * @return {boolean}
1007
+ */
1008
+ proto.NanoSignTx.ParentBlock.prototype.hasLink = function() {
1009
+ return jspb.Message.getField(this, 2) != null;
1010
+ };
1011
+
1012
+
1013
+ /**
1014
+ * optional string representative = 4;
1015
+ * @return {string}
1016
+ */
1017
+ proto.NanoSignTx.ParentBlock.prototype.getRepresentative = function() {
1018
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1019
+ };
1020
+
1021
+
1022
+ /**
1023
+ * @param {string} value
1024
+ * @return {!proto.NanoSignTx.ParentBlock} returns this
1025
+ */
1026
+ proto.NanoSignTx.ParentBlock.prototype.setRepresentative = function(value) {
1027
+ return jspb.Message.setField(this, 4, value);
1028
+ };
1029
+
1030
+
1031
+ /**
1032
+ * Clears the field making it undefined.
1033
+ * @return {!proto.NanoSignTx.ParentBlock} returns this
1034
+ */
1035
+ proto.NanoSignTx.ParentBlock.prototype.clearRepresentative = function() {
1036
+ return jspb.Message.setField(this, 4, undefined);
1037
+ };
1038
+
1039
+
1040
+ /**
1041
+ * Returns whether this field is set.
1042
+ * @return {boolean}
1043
+ */
1044
+ proto.NanoSignTx.ParentBlock.prototype.hasRepresentative = function() {
1045
+ return jspb.Message.getField(this, 4) != null;
1046
+ };
1047
+
1048
+
1049
+ /**
1050
+ * optional bytes balance = 5;
1051
+ * @return {!(string|Uint8Array)}
1052
+ */
1053
+ proto.NanoSignTx.ParentBlock.prototype.getBalance = function() {
1054
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1055
+ };
1056
+
1057
+
1058
+ /**
1059
+ * optional bytes balance = 5;
1060
+ * This is a type-conversion wrapper around `getBalance()`
1061
+ * @return {string}
1062
+ */
1063
+ proto.NanoSignTx.ParentBlock.prototype.getBalance_asB64 = function() {
1064
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1065
+ this.getBalance()));
1066
+ };
1067
+
1068
+
1069
+ /**
1070
+ * optional bytes balance = 5;
1071
+ * Note that Uint8Array is not supported on all browsers.
1072
+ * @see http://caniuse.com/Uint8Array
1073
+ * This is a type-conversion wrapper around `getBalance()`
1074
+ * @return {!Uint8Array}
1075
+ */
1076
+ proto.NanoSignTx.ParentBlock.prototype.getBalance_asU8 = function() {
1077
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1078
+ this.getBalance()));
1079
+ };
1080
+
1081
+
1082
+ /**
1083
+ * @param {!(string|Uint8Array)} value
1084
+ * @return {!proto.NanoSignTx.ParentBlock} returns this
1085
+ */
1086
+ proto.NanoSignTx.ParentBlock.prototype.setBalance = function(value) {
1087
+ return jspb.Message.setField(this, 5, value);
1088
+ };
1089
+
1090
+
1091
+ /**
1092
+ * Clears the field making it undefined.
1093
+ * @return {!proto.NanoSignTx.ParentBlock} returns this
1094
+ */
1095
+ proto.NanoSignTx.ParentBlock.prototype.clearBalance = function() {
1096
+ return jspb.Message.setField(this, 5, undefined);
1097
+ };
1098
+
1099
+
1100
+ /**
1101
+ * Returns whether this field is set.
1102
+ * @return {boolean}
1103
+ */
1104
+ proto.NanoSignTx.ParentBlock.prototype.hasBalance = function() {
1105
+ return jspb.Message.getField(this, 5) != null;
1106
+ };
1107
+
1108
+
1109
+ /**
1110
+ * repeated uint32 address_n = 1;
1111
+ * @return {!Array<number>}
1112
+ */
1113
+ proto.NanoSignTx.prototype.getAddressNList = function() {
1114
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 1));
1115
+ };
1116
+
1117
+
1118
+ /**
1119
+ * @param {!Array<number>} value
1120
+ * @return {!proto.NanoSignTx} returns this
1121
+ */
1122
+ proto.NanoSignTx.prototype.setAddressNList = function(value) {
1123
+ return jspb.Message.setField(this, 1, value || []);
1124
+ };
1125
+
1126
+
1127
+ /**
1128
+ * @param {number} value
1129
+ * @param {number=} opt_index
1130
+ * @return {!proto.NanoSignTx} returns this
1131
+ */
1132
+ proto.NanoSignTx.prototype.addAddressN = function(value, opt_index) {
1133
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1134
+ };
1135
+
1136
+
1137
+ /**
1138
+ * Clears the list making it empty but non-null.
1139
+ * @return {!proto.NanoSignTx} returns this
1140
+ */
1141
+ proto.NanoSignTx.prototype.clearAddressNList = function() {
1142
+ return this.setAddressNList([]);
1143
+ };
1144
+
1145
+
1146
+ /**
1147
+ * optional string coin_name = 2;
1148
+ * @return {string}
1149
+ */
1150
+ proto.NanoSignTx.prototype.getCoinName = function() {
1151
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "Nano"));
1152
+ };
1153
+
1154
+
1155
+ /**
1156
+ * @param {string} value
1157
+ * @return {!proto.NanoSignTx} returns this
1158
+ */
1159
+ proto.NanoSignTx.prototype.setCoinName = function(value) {
1160
+ return jspb.Message.setField(this, 2, value);
1161
+ };
1162
+
1163
+
1164
+ /**
1165
+ * Clears the field making it undefined.
1166
+ * @return {!proto.NanoSignTx} returns this
1167
+ */
1168
+ proto.NanoSignTx.prototype.clearCoinName = function() {
1169
+ return jspb.Message.setField(this, 2, undefined);
1170
+ };
1171
+
1172
+
1173
+ /**
1174
+ * Returns whether this field is set.
1175
+ * @return {boolean}
1176
+ */
1177
+ proto.NanoSignTx.prototype.hasCoinName = function() {
1178
+ return jspb.Message.getField(this, 2) != null;
1179
+ };
1180
+
1181
+
1182
+ /**
1183
+ * optional ParentBlock parent_block = 3;
1184
+ * @return {?proto.NanoSignTx.ParentBlock}
1185
+ */
1186
+ proto.NanoSignTx.prototype.getParentBlock = function() {
1187
+ return /** @type{?proto.NanoSignTx.ParentBlock} */ (
1188
+ jspb.Message.getWrapperField(this, proto.NanoSignTx.ParentBlock, 3));
1189
+ };
1190
+
1191
+
1192
+ /**
1193
+ * @param {?proto.NanoSignTx.ParentBlock|undefined} value
1194
+ * @return {!proto.NanoSignTx} returns this
1195
+ */
1196
+ proto.NanoSignTx.prototype.setParentBlock = function(value) {
1197
+ return jspb.Message.setWrapperField(this, 3, value);
1198
+ };
1199
+
1200
+
1201
+ /**
1202
+ * Clears the message field making it undefined.
1203
+ * @return {!proto.NanoSignTx} returns this
1204
+ */
1205
+ proto.NanoSignTx.prototype.clearParentBlock = function() {
1206
+ return this.setParentBlock(undefined);
1207
+ };
1208
+
1209
+
1210
+ /**
1211
+ * Returns whether this field is set.
1212
+ * @return {boolean}
1213
+ */
1214
+ proto.NanoSignTx.prototype.hasParentBlock = function() {
1215
+ return jspb.Message.getField(this, 3) != null;
1216
+ };
1217
+
1218
+
1219
+ /**
1220
+ * optional bytes link_hash = 4;
1221
+ * @return {!(string|Uint8Array)}
1222
+ */
1223
+ proto.NanoSignTx.prototype.getLinkHash = function() {
1224
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1225
+ };
1226
+
1227
+
1228
+ /**
1229
+ * optional bytes link_hash = 4;
1230
+ * This is a type-conversion wrapper around `getLinkHash()`
1231
+ * @return {string}
1232
+ */
1233
+ proto.NanoSignTx.prototype.getLinkHash_asB64 = function() {
1234
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1235
+ this.getLinkHash()));
1236
+ };
1237
+
1238
+
1239
+ /**
1240
+ * optional bytes link_hash = 4;
1241
+ * Note that Uint8Array is not supported on all browsers.
1242
+ * @see http://caniuse.com/Uint8Array
1243
+ * This is a type-conversion wrapper around `getLinkHash()`
1244
+ * @return {!Uint8Array}
1245
+ */
1246
+ proto.NanoSignTx.prototype.getLinkHash_asU8 = function() {
1247
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1248
+ this.getLinkHash()));
1249
+ };
1250
+
1251
+
1252
+ /**
1253
+ * @param {!(string|Uint8Array)} value
1254
+ * @return {!proto.NanoSignTx} returns this
1255
+ */
1256
+ proto.NanoSignTx.prototype.setLinkHash = function(value) {
1257
+ return jspb.Message.setField(this, 4, value);
1258
+ };
1259
+
1260
+
1261
+ /**
1262
+ * Clears the field making it undefined.
1263
+ * @return {!proto.NanoSignTx} returns this
1264
+ */
1265
+ proto.NanoSignTx.prototype.clearLinkHash = function() {
1266
+ return jspb.Message.setField(this, 4, undefined);
1267
+ };
1268
+
1269
+
1270
+ /**
1271
+ * Returns whether this field is set.
1272
+ * @return {boolean}
1273
+ */
1274
+ proto.NanoSignTx.prototype.hasLinkHash = function() {
1275
+ return jspb.Message.getField(this, 4) != null;
1276
+ };
1277
+
1278
+
1279
+ /**
1280
+ * optional string link_recipient = 5;
1281
+ * @return {string}
1282
+ */
1283
+ proto.NanoSignTx.prototype.getLinkRecipient = function() {
1284
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1285
+ };
1286
+
1287
+
1288
+ /**
1289
+ * @param {string} value
1290
+ * @return {!proto.NanoSignTx} returns this
1291
+ */
1292
+ proto.NanoSignTx.prototype.setLinkRecipient = function(value) {
1293
+ return jspb.Message.setField(this, 5, value);
1294
+ };
1295
+
1296
+
1297
+ /**
1298
+ * Clears the field making it undefined.
1299
+ * @return {!proto.NanoSignTx} returns this
1300
+ */
1301
+ proto.NanoSignTx.prototype.clearLinkRecipient = function() {
1302
+ return jspb.Message.setField(this, 5, undefined);
1303
+ };
1304
+
1305
+
1306
+ /**
1307
+ * Returns whether this field is set.
1308
+ * @return {boolean}
1309
+ */
1310
+ proto.NanoSignTx.prototype.hasLinkRecipient = function() {
1311
+ return jspb.Message.getField(this, 5) != null;
1312
+ };
1313
+
1314
+
1315
+ /**
1316
+ * repeated uint32 link_recipient_n = 6;
1317
+ * @return {!Array<number>}
1318
+ */
1319
+ proto.NanoSignTx.prototype.getLinkRecipientNList = function() {
1320
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 6));
1321
+ };
1322
+
1323
+
1324
+ /**
1325
+ * @param {!Array<number>} value
1326
+ * @return {!proto.NanoSignTx} returns this
1327
+ */
1328
+ proto.NanoSignTx.prototype.setLinkRecipientNList = function(value) {
1329
+ return jspb.Message.setField(this, 6, value || []);
1330
+ };
1331
+
1332
+
1333
+ /**
1334
+ * @param {number} value
1335
+ * @param {number=} opt_index
1336
+ * @return {!proto.NanoSignTx} returns this
1337
+ */
1338
+ proto.NanoSignTx.prototype.addLinkRecipientN = function(value, opt_index) {
1339
+ return jspb.Message.addToRepeatedField(this, 6, value, opt_index);
1340
+ };
1341
+
1342
+
1343
+ /**
1344
+ * Clears the list making it empty but non-null.
1345
+ * @return {!proto.NanoSignTx} returns this
1346
+ */
1347
+ proto.NanoSignTx.prototype.clearLinkRecipientNList = function() {
1348
+ return this.setLinkRecipientNList([]);
1349
+ };
1350
+
1351
+
1352
+ /**
1353
+ * optional string representative = 7;
1354
+ * @return {string}
1355
+ */
1356
+ proto.NanoSignTx.prototype.getRepresentative = function() {
1357
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1358
+ };
1359
+
1360
+
1361
+ /**
1362
+ * @param {string} value
1363
+ * @return {!proto.NanoSignTx} returns this
1364
+ */
1365
+ proto.NanoSignTx.prototype.setRepresentative = function(value) {
1366
+ return jspb.Message.setField(this, 7, value);
1367
+ };
1368
+
1369
+
1370
+ /**
1371
+ * Clears the field making it undefined.
1372
+ * @return {!proto.NanoSignTx} returns this
1373
+ */
1374
+ proto.NanoSignTx.prototype.clearRepresentative = function() {
1375
+ return jspb.Message.setField(this, 7, undefined);
1376
+ };
1377
+
1378
+
1379
+ /**
1380
+ * Returns whether this field is set.
1381
+ * @return {boolean}
1382
+ */
1383
+ proto.NanoSignTx.prototype.hasRepresentative = function() {
1384
+ return jspb.Message.getField(this, 7) != null;
1385
+ };
1386
+
1387
+
1388
+ /**
1389
+ * optional bytes balance = 8;
1390
+ * @return {!(string|Uint8Array)}
1391
+ */
1392
+ proto.NanoSignTx.prototype.getBalance = function() {
1393
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
1394
+ };
1395
+
1396
+
1397
+ /**
1398
+ * optional bytes balance = 8;
1399
+ * This is a type-conversion wrapper around `getBalance()`
1400
+ * @return {string}
1401
+ */
1402
+ proto.NanoSignTx.prototype.getBalance_asB64 = function() {
1403
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1404
+ this.getBalance()));
1405
+ };
1406
+
1407
+
1408
+ /**
1409
+ * optional bytes balance = 8;
1410
+ * Note that Uint8Array is not supported on all browsers.
1411
+ * @see http://caniuse.com/Uint8Array
1412
+ * This is a type-conversion wrapper around `getBalance()`
1413
+ * @return {!Uint8Array}
1414
+ */
1415
+ proto.NanoSignTx.prototype.getBalance_asU8 = function() {
1416
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1417
+ this.getBalance()));
1418
+ };
1419
+
1420
+
1421
+ /**
1422
+ * @param {!(string|Uint8Array)} value
1423
+ * @return {!proto.NanoSignTx} returns this
1424
+ */
1425
+ proto.NanoSignTx.prototype.setBalance = function(value) {
1426
+ return jspb.Message.setField(this, 8, value);
1427
+ };
1428
+
1429
+
1430
+ /**
1431
+ * Clears the field making it undefined.
1432
+ * @return {!proto.NanoSignTx} returns this
1433
+ */
1434
+ proto.NanoSignTx.prototype.clearBalance = function() {
1435
+ return jspb.Message.setField(this, 8, undefined);
1436
+ };
1437
+
1438
+
1439
+ /**
1440
+ * Returns whether this field is set.
1441
+ * @return {boolean}
1442
+ */
1443
+ proto.NanoSignTx.prototype.hasBalance = function() {
1444
+ return jspb.Message.getField(this, 8) != null;
1445
+ };
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1452
+ /**
1453
+ * Creates an object representation of this proto.
1454
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1455
+ * Optional fields that are not set will be set to undefined.
1456
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1457
+ * For the list of reserved names please see:
1458
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1459
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1460
+ * JSPB instance for transitional soy proto support:
1461
+ * http://goto/soy-param-migration
1462
+ * @return {!Object}
1463
+ */
1464
+ proto.NanoSignedTx.prototype.toObject = function(opt_includeInstance) {
1465
+ return proto.NanoSignedTx.toObject(opt_includeInstance, this);
1466
+ };
1467
+
1468
+
1469
+ /**
1470
+ * Static version of the {@see toObject} method.
1471
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1472
+ * the JSPB instance for transitional soy proto support:
1473
+ * http://goto/soy-param-migration
1474
+ * @param {!proto.NanoSignedTx} msg The msg instance to transform.
1475
+ * @return {!Object}
1476
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1477
+ */
1478
+ proto.NanoSignedTx.toObject = function(includeInstance, msg) {
1479
+ var f, obj = {
1480
+ signature: msg.getSignature_asB64(),
1481
+ blockHash: msg.getBlockHash_asB64()
1482
+ };
1483
+
1484
+ if (includeInstance) {
1485
+ obj.$jspbMessageInstance = msg;
1486
+ }
1487
+ return obj;
1488
+ };
1489
+ }
1490
+
1491
+
1492
+ /**
1493
+ * Deserializes binary data (in protobuf wire format).
1494
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1495
+ * @return {!proto.NanoSignedTx}
1496
+ */
1497
+ proto.NanoSignedTx.deserializeBinary = function(bytes) {
1498
+ var reader = new jspb.BinaryReader(bytes);
1499
+ var msg = new proto.NanoSignedTx;
1500
+ return proto.NanoSignedTx.deserializeBinaryFromReader(msg, reader);
1501
+ };
1502
+
1503
+
1504
+ /**
1505
+ * Deserializes binary data (in protobuf wire format) from the
1506
+ * given reader into the given message object.
1507
+ * @param {!proto.NanoSignedTx} msg The message object to deserialize into.
1508
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1509
+ * @return {!proto.NanoSignedTx}
1510
+ */
1511
+ proto.NanoSignedTx.deserializeBinaryFromReader = function(msg, reader) {
1512
+ while (reader.nextField()) {
1513
+ if (reader.isEndGroup()) {
1514
+ break;
1515
+ }
1516
+ var field = reader.getFieldNumber();
1517
+ switch (field) {
1518
+ case 1:
1519
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1520
+ msg.setSignature(value);
1521
+ break;
1522
+ case 2:
1523
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1524
+ msg.setBlockHash(value);
1525
+ break;
1526
+ default:
1527
+ reader.skipField();
1528
+ break;
1529
+ }
1530
+ }
1531
+ return msg;
1532
+ };
1533
+
1534
+
1535
+ /**
1536
+ * Serializes the message to binary data (in protobuf wire format).
1537
+ * @return {!Uint8Array}
1538
+ */
1539
+ proto.NanoSignedTx.prototype.serializeBinary = function() {
1540
+ var writer = new jspb.BinaryWriter();
1541
+ proto.NanoSignedTx.serializeBinaryToWriter(this, writer);
1542
+ return writer.getResultBuffer();
1543
+ };
1544
+
1545
+
1546
+ /**
1547
+ * Serializes the given message to binary data (in protobuf wire
1548
+ * format), writing to the given BinaryWriter.
1549
+ * @param {!proto.NanoSignedTx} message
1550
+ * @param {!jspb.BinaryWriter} writer
1551
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1552
+ */
1553
+ proto.NanoSignedTx.serializeBinaryToWriter = function(message, writer) {
1554
+ var f = undefined;
1555
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1));
1556
+ if (f != null) {
1557
+ writer.writeBytes(
1558
+ 1,
1559
+ f
1560
+ );
1561
+ }
1562
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
1563
+ if (f != null) {
1564
+ writer.writeBytes(
1565
+ 2,
1566
+ f
1567
+ );
1568
+ }
1569
+ };
1570
+
1571
+
1572
+ /**
1573
+ * optional bytes signature = 1;
1574
+ * @return {!(string|Uint8Array)}
1575
+ */
1576
+ proto.NanoSignedTx.prototype.getSignature = function() {
1577
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1578
+ };
1579
+
1580
+
1581
+ /**
1582
+ * optional bytes signature = 1;
1583
+ * This is a type-conversion wrapper around `getSignature()`
1584
+ * @return {string}
1585
+ */
1586
+ proto.NanoSignedTx.prototype.getSignature_asB64 = function() {
1587
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1588
+ this.getSignature()));
1589
+ };
1590
+
1591
+
1592
+ /**
1593
+ * optional bytes signature = 1;
1594
+ * Note that Uint8Array is not supported on all browsers.
1595
+ * @see http://caniuse.com/Uint8Array
1596
+ * This is a type-conversion wrapper around `getSignature()`
1597
+ * @return {!Uint8Array}
1598
+ */
1599
+ proto.NanoSignedTx.prototype.getSignature_asU8 = function() {
1600
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1601
+ this.getSignature()));
1602
+ };
1603
+
1604
+
1605
+ /**
1606
+ * @param {!(string|Uint8Array)} value
1607
+ * @return {!proto.NanoSignedTx} returns this
1608
+ */
1609
+ proto.NanoSignedTx.prototype.setSignature = function(value) {
1610
+ return jspb.Message.setField(this, 1, value);
1611
+ };
1612
+
1613
+
1614
+ /**
1615
+ * Clears the field making it undefined.
1616
+ * @return {!proto.NanoSignedTx} returns this
1617
+ */
1618
+ proto.NanoSignedTx.prototype.clearSignature = function() {
1619
+ return jspb.Message.setField(this, 1, undefined);
1620
+ };
1621
+
1622
+
1623
+ /**
1624
+ * Returns whether this field is set.
1625
+ * @return {boolean}
1626
+ */
1627
+ proto.NanoSignedTx.prototype.hasSignature = function() {
1628
+ return jspb.Message.getField(this, 1) != null;
1629
+ };
1630
+
1631
+
1632
+ /**
1633
+ * optional bytes block_hash = 2;
1634
+ * @return {!(string|Uint8Array)}
1635
+ */
1636
+ proto.NanoSignedTx.prototype.getBlockHash = function() {
1637
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1638
+ };
1639
+
1640
+
1641
+ /**
1642
+ * optional bytes block_hash = 2;
1643
+ * This is a type-conversion wrapper around `getBlockHash()`
1644
+ * @return {string}
1645
+ */
1646
+ proto.NanoSignedTx.prototype.getBlockHash_asB64 = function() {
1647
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1648
+ this.getBlockHash()));
1649
+ };
1650
+
1651
+
1652
+ /**
1653
+ * optional bytes block_hash = 2;
1654
+ * Note that Uint8Array is not supported on all browsers.
1655
+ * @see http://caniuse.com/Uint8Array
1656
+ * This is a type-conversion wrapper around `getBlockHash()`
1657
+ * @return {!Uint8Array}
1658
+ */
1659
+ proto.NanoSignedTx.prototype.getBlockHash_asU8 = function() {
1660
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1661
+ this.getBlockHash()));
1662
+ };
1663
+
1664
+
1665
+ /**
1666
+ * @param {!(string|Uint8Array)} value
1667
+ * @return {!proto.NanoSignedTx} returns this
1668
+ */
1669
+ proto.NanoSignedTx.prototype.setBlockHash = function(value) {
1670
+ return jspb.Message.setField(this, 2, value);
1671
+ };
1672
+
1673
+
1674
+ /**
1675
+ * Clears the field making it undefined.
1676
+ * @return {!proto.NanoSignedTx} returns this
1677
+ */
1678
+ proto.NanoSignedTx.prototype.clearBlockHash = function() {
1679
+ return jspb.Message.setField(this, 2, undefined);
1680
+ };
1681
+
1682
+
1683
+ /**
1684
+ * Returns whether this field is set.
1685
+ * @return {boolean}
1686
+ */
1687
+ proto.NanoSignedTx.prototype.hasBlockHash = function() {
1688
+ return jspb.Message.getField(this, 2) != null;
1689
+ };
1690
+
1691
+
1692
+ goog.object.extend(exports, proto);