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