UNPKG

89.9 kBJavaScriptView Raw
1/**
2 * @fileoverview
3 * @enhanceable
4 * @suppress {messageConventions} JS Compiler reports an error if a variable or
5 * field starts with 'MSG_' and isn't a translatable message.
6 * @public
7 */
8// GENERATED CODE -- DO NOT EDIT!
9
10var jspb = require('google-protobuf');
11var goog = jspb;
12var global = Function('return this')();
13
14var core_Tron_pb = require('../core/Tron_pb.js');
15goog.exportSymbol('proto.protocol.AccountCreateContract', null, global);
16goog.exportSymbol('proto.protocol.AssetIssueContract', null, global);
17goog.exportSymbol('proto.protocol.DeployContract', null, global);
18goog.exportSymbol('proto.protocol.ParticipateAssetIssueContract', null, global);
19goog.exportSymbol('proto.protocol.TransferAssetContract', null, global);
20goog.exportSymbol('proto.protocol.TransferContract', null, global);
21goog.exportSymbol('proto.protocol.VoteAssetContract', null, global);
22goog.exportSymbol('proto.protocol.VoteWitnessContract', null, global);
23goog.exportSymbol('proto.protocol.VoteWitnessContract.Vote', null, global);
24goog.exportSymbol('proto.protocol.WitnessCreateContract', null, global);
25goog.exportSymbol('proto.protocol.WitnessUpdateContract', null, global);
26
27/**
28 * Generated by JsPbCodeGenerator.
29 * @param {Array=} opt_data Optional initial data array, typically from a
30 * server response, or constructed directly in Javascript. The array is used
31 * in place and becomes part of the constructed object. It is not cloned.
32 * If no data is provided, the constructed object will be empty, but still
33 * valid.
34 * @extends {jspb.Message}
35 * @constructor
36 */
37proto.protocol.AccountCreateContract = function(opt_data) {
38 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
39};
40goog.inherits(proto.protocol.AccountCreateContract, jspb.Message);
41if (goog.DEBUG && !COMPILED) {
42 proto.protocol.AccountCreateContract.displayName = 'proto.protocol.AccountCreateContract';
43}
44
45
46if (jspb.Message.GENERATE_TO_OBJECT) {
47/**
48 * Creates an object representation of this proto suitable for use in Soy templates.
49 * Field names that are reserved in JavaScript and will be renamed to pb_name.
50 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
51 * For the list of reserved names please see:
52 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
53 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
54 * for transitional soy proto support: http://goto/soy-param-migration
55 * @return {!Object}
56 */
57proto.protocol.AccountCreateContract.prototype.toObject = function(opt_includeInstance) {
58 return proto.protocol.AccountCreateContract.toObject(opt_includeInstance, this);
59};
60
61
62/**
63 * Static version of the {@see toObject} method.
64 * @param {boolean|undefined} includeInstance Whether to include the JSPB
65 * instance for transitional soy proto support:
66 * http://goto/soy-param-migration
67 * @param {!proto.protocol.AccountCreateContract} msg The msg instance to transform.
68 * @return {!Object}
69 * @suppress {unusedLocalVariables} f is only used for nested messages
70 */
71proto.protocol.AccountCreateContract.toObject = function(includeInstance, msg) {
72 var f, obj = {
73 type: jspb.Message.getFieldWithDefault(msg, 1, 0),
74 accountName: msg.getAccountName_asB64(),
75 ownerAddress: msg.getOwnerAddress_asB64()
76 };
77
78 if (includeInstance) {
79 obj.$jspbMessageInstance = msg;
80 }
81 return obj;
82};
83}
84
85
86/**
87 * Deserializes binary data (in protobuf wire format).
88 * @param {jspb.ByteSource} bytes The bytes to deserialize.
89 * @return {!proto.protocol.AccountCreateContract}
90 */
91proto.protocol.AccountCreateContract.deserializeBinary = function(bytes) {
92 var reader = new jspb.BinaryReader(bytes);
93 var msg = new proto.protocol.AccountCreateContract;
94 return proto.protocol.AccountCreateContract.deserializeBinaryFromReader(msg, reader);
95};
96
97
98/**
99 * Deserializes binary data (in protobuf wire format) from the
100 * given reader into the given message object.
101 * @param {!proto.protocol.AccountCreateContract} msg The message object to deserialize into.
102 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
103 * @return {!proto.protocol.AccountCreateContract}
104 */
105proto.protocol.AccountCreateContract.deserializeBinaryFromReader = function(msg, reader) {
106 while (reader.nextField()) {
107 if (reader.isEndGroup()) {
108 break;
109 }
110 var field = reader.getFieldNumber();
111 switch (field) {
112 case 1:
113 var value = /** @type {!proto.protocol.AccountType} */ (reader.readEnum());
114 msg.setType(value);
115 break;
116 case 2:
117 var value = /** @type {!Uint8Array} */ (reader.readBytes());
118 msg.setAccountName(value);
119 break;
120 case 3:
121 var value = /** @type {!Uint8Array} */ (reader.readBytes());
122 msg.setOwnerAddress(value);
123 break;
124 default:
125 reader.skipField();
126 break;
127 }
128 }
129 return msg;
130};
131
132
133/**
134 * Serializes the message to binary data (in protobuf wire format).
135 * @return {!Uint8Array}
136 */
137proto.protocol.AccountCreateContract.prototype.serializeBinary = function() {
138 var writer = new jspb.BinaryWriter();
139 proto.protocol.AccountCreateContract.serializeBinaryToWriter(this, writer);
140 return writer.getResultBuffer();
141};
142
143
144/**
145 * Serializes the given message to binary data (in protobuf wire
146 * format), writing to the given BinaryWriter.
147 * @param {!proto.protocol.AccountCreateContract} message
148 * @param {!jspb.BinaryWriter} writer
149 * @suppress {unusedLocalVariables} f is only used for nested messages
150 */
151proto.protocol.AccountCreateContract.serializeBinaryToWriter = function(message, writer) {
152 var f = undefined;
153 f = message.getType();
154 if (f !== 0.0) {
155 writer.writeEnum(
156 1,
157 f
158 );
159 }
160 f = message.getAccountName_asU8();
161 if (f.length > 0) {
162 writer.writeBytes(
163 2,
164 f
165 );
166 }
167 f = message.getOwnerAddress_asU8();
168 if (f.length > 0) {
169 writer.writeBytes(
170 3,
171 f
172 );
173 }
174};
175
176
177/**
178 * optional AccountType type = 1;
179 * @return {!proto.protocol.AccountType}
180 */
181proto.protocol.AccountCreateContract.prototype.getType = function() {
182 return /** @type {!proto.protocol.AccountType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
183};
184
185
186/** @param {!proto.protocol.AccountType} value */
187proto.protocol.AccountCreateContract.prototype.setType = function(value) {
188 jspb.Message.setProto3EnumField(this, 1, value);
189};
190
191
192/**
193 * optional bytes account_name = 2;
194 * @return {!(string|Uint8Array)}
195 */
196proto.protocol.AccountCreateContract.prototype.getAccountName = function() {
197 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
198};
199
200
201/**
202 * optional bytes account_name = 2;
203 * This is a type-conversion wrapper around `getAccountName()`
204 * @return {string}
205 */
206proto.protocol.AccountCreateContract.prototype.getAccountName_asB64 = function() {
207 return /** @type {string} */ (jspb.Message.bytesAsB64(
208 this.getAccountName()));
209};
210
211
212/**
213 * optional bytes account_name = 2;
214 * Note that Uint8Array is not supported on all browsers.
215 * @see http://caniuse.com/Uint8Array
216 * This is a type-conversion wrapper around `getAccountName()`
217 * @return {!Uint8Array}
218 */
219proto.protocol.AccountCreateContract.prototype.getAccountName_asU8 = function() {
220 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
221 this.getAccountName()));
222};
223
224
225/** @param {!(string|Uint8Array)} value */
226proto.protocol.AccountCreateContract.prototype.setAccountName = function(value) {
227 jspb.Message.setProto3BytesField(this, 2, value);
228};
229
230
231/**
232 * optional bytes owner_address = 3;
233 * @return {!(string|Uint8Array)}
234 */
235proto.protocol.AccountCreateContract.prototype.getOwnerAddress = function() {
236 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
237};
238
239
240/**
241 * optional bytes owner_address = 3;
242 * This is a type-conversion wrapper around `getOwnerAddress()`
243 * @return {string}
244 */
245proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asB64 = function() {
246 return /** @type {string} */ (jspb.Message.bytesAsB64(
247 this.getOwnerAddress()));
248};
249
250
251/**
252 * optional bytes owner_address = 3;
253 * Note that Uint8Array is not supported on all browsers.
254 * @see http://caniuse.com/Uint8Array
255 * This is a type-conversion wrapper around `getOwnerAddress()`
256 * @return {!Uint8Array}
257 */
258proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asU8 = function() {
259 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
260 this.getOwnerAddress()));
261};
262
263
264/** @param {!(string|Uint8Array)} value */
265proto.protocol.AccountCreateContract.prototype.setOwnerAddress = function(value) {
266 jspb.Message.setProto3BytesField(this, 3, value);
267};
268
269
270
271/**
272 * Generated by JsPbCodeGenerator.
273 * @param {Array=} opt_data Optional initial data array, typically from a
274 * server response, or constructed directly in Javascript. The array is used
275 * in place and becomes part of the constructed object. It is not cloned.
276 * If no data is provided, the constructed object will be empty, but still
277 * valid.
278 * @extends {jspb.Message}
279 * @constructor
280 */
281proto.protocol.TransferContract = function(opt_data) {
282 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
283};
284goog.inherits(proto.protocol.TransferContract, jspb.Message);
285if (goog.DEBUG && !COMPILED) {
286 proto.protocol.TransferContract.displayName = 'proto.protocol.TransferContract';
287}
288
289
290if (jspb.Message.GENERATE_TO_OBJECT) {
291/**
292 * Creates an object representation of this proto suitable for use in Soy templates.
293 * Field names that are reserved in JavaScript and will be renamed to pb_name.
294 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
295 * For the list of reserved names please see:
296 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
297 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
298 * for transitional soy proto support: http://goto/soy-param-migration
299 * @return {!Object}
300 */
301proto.protocol.TransferContract.prototype.toObject = function(opt_includeInstance) {
302 return proto.protocol.TransferContract.toObject(opt_includeInstance, this);
303};
304
305
306/**
307 * Static version of the {@see toObject} method.
308 * @param {boolean|undefined} includeInstance Whether to include the JSPB
309 * instance for transitional soy proto support:
310 * http://goto/soy-param-migration
311 * @param {!proto.protocol.TransferContract} msg The msg instance to transform.
312 * @return {!Object}
313 * @suppress {unusedLocalVariables} f is only used for nested messages
314 */
315proto.protocol.TransferContract.toObject = function(includeInstance, msg) {
316 var f, obj = {
317 ownerAddress: msg.getOwnerAddress_asB64(),
318 toAddress: msg.getToAddress_asB64(),
319 amount: jspb.Message.getFieldWithDefault(msg, 3, 0)
320 };
321
322 if (includeInstance) {
323 obj.$jspbMessageInstance = msg;
324 }
325 return obj;
326};
327}
328
329
330/**
331 * Deserializes binary data (in protobuf wire format).
332 * @param {jspb.ByteSource} bytes The bytes to deserialize.
333 * @return {!proto.protocol.TransferContract}
334 */
335proto.protocol.TransferContract.deserializeBinary = function(bytes) {
336 var reader = new jspb.BinaryReader(bytes);
337 var msg = new proto.protocol.TransferContract;
338 return proto.protocol.TransferContract.deserializeBinaryFromReader(msg, reader);
339};
340
341
342/**
343 * Deserializes binary data (in protobuf wire format) from the
344 * given reader into the given message object.
345 * @param {!proto.protocol.TransferContract} msg The message object to deserialize into.
346 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
347 * @return {!proto.protocol.TransferContract}
348 */
349proto.protocol.TransferContract.deserializeBinaryFromReader = function(msg, reader) {
350 while (reader.nextField()) {
351 if (reader.isEndGroup()) {
352 break;
353 }
354 var field = reader.getFieldNumber();
355 switch (field) {
356 case 1:
357 var value = /** @type {!Uint8Array} */ (reader.readBytes());
358 msg.setOwnerAddress(value);
359 break;
360 case 2:
361 var value = /** @type {!Uint8Array} */ (reader.readBytes());
362 msg.setToAddress(value);
363 break;
364 case 3:
365 var value = /** @type {number} */ (reader.readInt64());
366 msg.setAmount(value);
367 break;
368 default:
369 reader.skipField();
370 break;
371 }
372 }
373 return msg;
374};
375
376
377/**
378 * Serializes the message to binary data (in protobuf wire format).
379 * @return {!Uint8Array}
380 */
381proto.protocol.TransferContract.prototype.serializeBinary = function() {
382 var writer = new jspb.BinaryWriter();
383 proto.protocol.TransferContract.serializeBinaryToWriter(this, writer);
384 return writer.getResultBuffer();
385};
386
387
388/**
389 * Serializes the given message to binary data (in protobuf wire
390 * format), writing to the given BinaryWriter.
391 * @param {!proto.protocol.TransferContract} message
392 * @param {!jspb.BinaryWriter} writer
393 * @suppress {unusedLocalVariables} f is only used for nested messages
394 */
395proto.protocol.TransferContract.serializeBinaryToWriter = function(message, writer) {
396 var f = undefined;
397 f = message.getOwnerAddress_asU8();
398 if (f.length > 0) {
399 writer.writeBytes(
400 1,
401 f
402 );
403 }
404 f = message.getToAddress_asU8();
405 if (f.length > 0) {
406 writer.writeBytes(
407 2,
408 f
409 );
410 }
411 f = message.getAmount();
412 if (f !== 0) {
413 writer.writeInt64(
414 3,
415 f
416 );
417 }
418};
419
420
421/**
422 * optional bytes owner_address = 1;
423 * @return {!(string|Uint8Array)}
424 */
425proto.protocol.TransferContract.prototype.getOwnerAddress = function() {
426 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
427};
428
429
430/**
431 * optional bytes owner_address = 1;
432 * This is a type-conversion wrapper around `getOwnerAddress()`
433 * @return {string}
434 */
435proto.protocol.TransferContract.prototype.getOwnerAddress_asB64 = function() {
436 return /** @type {string} */ (jspb.Message.bytesAsB64(
437 this.getOwnerAddress()));
438};
439
440
441/**
442 * optional bytes owner_address = 1;
443 * Note that Uint8Array is not supported on all browsers.
444 * @see http://caniuse.com/Uint8Array
445 * This is a type-conversion wrapper around `getOwnerAddress()`
446 * @return {!Uint8Array}
447 */
448proto.protocol.TransferContract.prototype.getOwnerAddress_asU8 = function() {
449 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
450 this.getOwnerAddress()));
451};
452
453
454/** @param {!(string|Uint8Array)} value */
455proto.protocol.TransferContract.prototype.setOwnerAddress = function(value) {
456 jspb.Message.setProto3BytesField(this, 1, value);
457};
458
459
460/**
461 * optional bytes to_address = 2;
462 * @return {!(string|Uint8Array)}
463 */
464proto.protocol.TransferContract.prototype.getToAddress = function() {
465 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
466};
467
468
469/**
470 * optional bytes to_address = 2;
471 * This is a type-conversion wrapper around `getToAddress()`
472 * @return {string}
473 */
474proto.protocol.TransferContract.prototype.getToAddress_asB64 = function() {
475 return /** @type {string} */ (jspb.Message.bytesAsB64(
476 this.getToAddress()));
477};
478
479
480/**
481 * optional bytes to_address = 2;
482 * Note that Uint8Array is not supported on all browsers.
483 * @see http://caniuse.com/Uint8Array
484 * This is a type-conversion wrapper around `getToAddress()`
485 * @return {!Uint8Array}
486 */
487proto.protocol.TransferContract.prototype.getToAddress_asU8 = function() {
488 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
489 this.getToAddress()));
490};
491
492
493/** @param {!(string|Uint8Array)} value */
494proto.protocol.TransferContract.prototype.setToAddress = function(value) {
495 jspb.Message.setProto3BytesField(this, 2, value);
496};
497
498
499/**
500 * optional int64 amount = 3;
501 * @return {number}
502 */
503proto.protocol.TransferContract.prototype.getAmount = function() {
504 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
505};
506
507
508/** @param {number} value */
509proto.protocol.TransferContract.prototype.setAmount = function(value) {
510 jspb.Message.setProto3IntField(this, 3, value);
511};
512
513
514
515/**
516 * Generated by JsPbCodeGenerator.
517 * @param {Array=} opt_data Optional initial data array, typically from a
518 * server response, or constructed directly in Javascript. The array is used
519 * in place and becomes part of the constructed object. It is not cloned.
520 * If no data is provided, the constructed object will be empty, but still
521 * valid.
522 * @extends {jspb.Message}
523 * @constructor
524 */
525proto.protocol.TransferAssetContract = function(opt_data) {
526 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
527};
528goog.inherits(proto.protocol.TransferAssetContract, jspb.Message);
529if (goog.DEBUG && !COMPILED) {
530 proto.protocol.TransferAssetContract.displayName = 'proto.protocol.TransferAssetContract';
531}
532
533
534if (jspb.Message.GENERATE_TO_OBJECT) {
535/**
536 * Creates an object representation of this proto suitable for use in Soy templates.
537 * Field names that are reserved in JavaScript and will be renamed to pb_name.
538 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
539 * For the list of reserved names please see:
540 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
541 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
542 * for transitional soy proto support: http://goto/soy-param-migration
543 * @return {!Object}
544 */
545proto.protocol.TransferAssetContract.prototype.toObject = function(opt_includeInstance) {
546 return proto.protocol.TransferAssetContract.toObject(opt_includeInstance, this);
547};
548
549
550/**
551 * Static version of the {@see toObject} method.
552 * @param {boolean|undefined} includeInstance Whether to include the JSPB
553 * instance for transitional soy proto support:
554 * http://goto/soy-param-migration
555 * @param {!proto.protocol.TransferAssetContract} msg The msg instance to transform.
556 * @return {!Object}
557 * @suppress {unusedLocalVariables} f is only used for nested messages
558 */
559proto.protocol.TransferAssetContract.toObject = function(includeInstance, msg) {
560 var f, obj = {
561 assetName: msg.getAssetName_asB64(),
562 ownerAddress: msg.getOwnerAddress_asB64(),
563 toAddress: msg.getToAddress_asB64(),
564 amount: jspb.Message.getFieldWithDefault(msg, 4, 0)
565 };
566
567 if (includeInstance) {
568 obj.$jspbMessageInstance = msg;
569 }
570 return obj;
571};
572}
573
574
575/**
576 * Deserializes binary data (in protobuf wire format).
577 * @param {jspb.ByteSource} bytes The bytes to deserialize.
578 * @return {!proto.protocol.TransferAssetContract}
579 */
580proto.protocol.TransferAssetContract.deserializeBinary = function(bytes) {
581 var reader = new jspb.BinaryReader(bytes);
582 var msg = new proto.protocol.TransferAssetContract;
583 return proto.protocol.TransferAssetContract.deserializeBinaryFromReader(msg, reader);
584};
585
586
587/**
588 * Deserializes binary data (in protobuf wire format) from the
589 * given reader into the given message object.
590 * @param {!proto.protocol.TransferAssetContract} msg The message object to deserialize into.
591 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
592 * @return {!proto.protocol.TransferAssetContract}
593 */
594proto.protocol.TransferAssetContract.deserializeBinaryFromReader = function(msg, reader) {
595 while (reader.nextField()) {
596 if (reader.isEndGroup()) {
597 break;
598 }
599 var field = reader.getFieldNumber();
600 switch (field) {
601 case 1:
602 var value = /** @type {!Uint8Array} */ (reader.readBytes());
603 msg.setAssetName(value);
604 break;
605 case 2:
606 var value = /** @type {!Uint8Array} */ (reader.readBytes());
607 msg.setOwnerAddress(value);
608 break;
609 case 3:
610 var value = /** @type {!Uint8Array} */ (reader.readBytes());
611 msg.setToAddress(value);
612 break;
613 case 4:
614 var value = /** @type {number} */ (reader.readInt64());
615 msg.setAmount(value);
616 break;
617 default:
618 reader.skipField();
619 break;
620 }
621 }
622 return msg;
623};
624
625
626/**
627 * Serializes the message to binary data (in protobuf wire format).
628 * @return {!Uint8Array}
629 */
630proto.protocol.TransferAssetContract.prototype.serializeBinary = function() {
631 var writer = new jspb.BinaryWriter();
632 proto.protocol.TransferAssetContract.serializeBinaryToWriter(this, writer);
633 return writer.getResultBuffer();
634};
635
636
637/**
638 * Serializes the given message to binary data (in protobuf wire
639 * format), writing to the given BinaryWriter.
640 * @param {!proto.protocol.TransferAssetContract} message
641 * @param {!jspb.BinaryWriter} writer
642 * @suppress {unusedLocalVariables} f is only used for nested messages
643 */
644proto.protocol.TransferAssetContract.serializeBinaryToWriter = function(message, writer) {
645 var f = undefined;
646 f = message.getAssetName_asU8();
647 if (f.length > 0) {
648 writer.writeBytes(
649 1,
650 f
651 );
652 }
653 f = message.getOwnerAddress_asU8();
654 if (f.length > 0) {
655 writer.writeBytes(
656 2,
657 f
658 );
659 }
660 f = message.getToAddress_asU8();
661 if (f.length > 0) {
662 writer.writeBytes(
663 3,
664 f
665 );
666 }
667 f = message.getAmount();
668 if (f !== 0) {
669 writer.writeInt64(
670 4,
671 f
672 );
673 }
674};
675
676
677/**
678 * optional bytes asset_name = 1;
679 * @return {!(string|Uint8Array)}
680 */
681proto.protocol.TransferAssetContract.prototype.getAssetName = function() {
682 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
683};
684
685
686/**
687 * optional bytes asset_name = 1;
688 * This is a type-conversion wrapper around `getAssetName()`
689 * @return {string}
690 */
691proto.protocol.TransferAssetContract.prototype.getAssetName_asB64 = function() {
692 return /** @type {string} */ (jspb.Message.bytesAsB64(
693 this.getAssetName()));
694};
695
696
697/**
698 * optional bytes asset_name = 1;
699 * Note that Uint8Array is not supported on all browsers.
700 * @see http://caniuse.com/Uint8Array
701 * This is a type-conversion wrapper around `getAssetName()`
702 * @return {!Uint8Array}
703 */
704proto.protocol.TransferAssetContract.prototype.getAssetName_asU8 = function() {
705 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
706 this.getAssetName()));
707};
708
709
710/** @param {!(string|Uint8Array)} value */
711proto.protocol.TransferAssetContract.prototype.setAssetName = function(value) {
712 jspb.Message.setProto3BytesField(this, 1, value);
713};
714
715
716/**
717 * optional bytes owner_address = 2;
718 * @return {!(string|Uint8Array)}
719 */
720proto.protocol.TransferAssetContract.prototype.getOwnerAddress = function() {
721 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
722};
723
724
725/**
726 * optional bytes owner_address = 2;
727 * This is a type-conversion wrapper around `getOwnerAddress()`
728 * @return {string}
729 */
730proto.protocol.TransferAssetContract.prototype.getOwnerAddress_asB64 = function() {
731 return /** @type {string} */ (jspb.Message.bytesAsB64(
732 this.getOwnerAddress()));
733};
734
735
736/**
737 * optional bytes owner_address = 2;
738 * Note that Uint8Array is not supported on all browsers.
739 * @see http://caniuse.com/Uint8Array
740 * This is a type-conversion wrapper around `getOwnerAddress()`
741 * @return {!Uint8Array}
742 */
743proto.protocol.TransferAssetContract.prototype.getOwnerAddress_asU8 = function() {
744 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
745 this.getOwnerAddress()));
746};
747
748
749/** @param {!(string|Uint8Array)} value */
750proto.protocol.TransferAssetContract.prototype.setOwnerAddress = function(value) {
751 jspb.Message.setProto3BytesField(this, 2, value);
752};
753
754
755/**
756 * optional bytes to_address = 3;
757 * @return {!(string|Uint8Array)}
758 */
759proto.protocol.TransferAssetContract.prototype.getToAddress = function() {
760 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
761};
762
763
764/**
765 * optional bytes to_address = 3;
766 * This is a type-conversion wrapper around `getToAddress()`
767 * @return {string}
768 */
769proto.protocol.TransferAssetContract.prototype.getToAddress_asB64 = function() {
770 return /** @type {string} */ (jspb.Message.bytesAsB64(
771 this.getToAddress()));
772};
773
774
775/**
776 * optional bytes to_address = 3;
777 * Note that Uint8Array is not supported on all browsers.
778 * @see http://caniuse.com/Uint8Array
779 * This is a type-conversion wrapper around `getToAddress()`
780 * @return {!Uint8Array}
781 */
782proto.protocol.TransferAssetContract.prototype.getToAddress_asU8 = function() {
783 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
784 this.getToAddress()));
785};
786
787
788/** @param {!(string|Uint8Array)} value */
789proto.protocol.TransferAssetContract.prototype.setToAddress = function(value) {
790 jspb.Message.setProto3BytesField(this, 3, value);
791};
792
793
794/**
795 * optional int64 amount = 4;
796 * @return {number}
797 */
798proto.protocol.TransferAssetContract.prototype.getAmount = function() {
799 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
800};
801
802
803/** @param {number} value */
804proto.protocol.TransferAssetContract.prototype.setAmount = function(value) {
805 jspb.Message.setProto3IntField(this, 4, value);
806};
807
808
809
810/**
811 * Generated by JsPbCodeGenerator.
812 * @param {Array=} opt_data Optional initial data array, typically from a
813 * server response, or constructed directly in Javascript. The array is used
814 * in place and becomes part of the constructed object. It is not cloned.
815 * If no data is provided, the constructed object will be empty, but still
816 * valid.
817 * @extends {jspb.Message}
818 * @constructor
819 */
820proto.protocol.VoteAssetContract = function(opt_data) {
821 jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.VoteAssetContract.repeatedFields_, null);
822};
823goog.inherits(proto.protocol.VoteAssetContract, jspb.Message);
824if (goog.DEBUG && !COMPILED) {
825 proto.protocol.VoteAssetContract.displayName = 'proto.protocol.VoteAssetContract';
826}
827/**
828 * List of repeated fields within this message type.
829 * @private {!Array<number>}
830 * @const
831 */
832proto.protocol.VoteAssetContract.repeatedFields_ = [2];
833
834
835
836if (jspb.Message.GENERATE_TO_OBJECT) {
837/**
838 * Creates an object representation of this proto suitable for use in Soy templates.
839 * Field names that are reserved in JavaScript and will be renamed to pb_name.
840 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
841 * For the list of reserved names please see:
842 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
843 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
844 * for transitional soy proto support: http://goto/soy-param-migration
845 * @return {!Object}
846 */
847proto.protocol.VoteAssetContract.prototype.toObject = function(opt_includeInstance) {
848 return proto.protocol.VoteAssetContract.toObject(opt_includeInstance, this);
849};
850
851
852/**
853 * Static version of the {@see toObject} method.
854 * @param {boolean|undefined} includeInstance Whether to include the JSPB
855 * instance for transitional soy proto support:
856 * http://goto/soy-param-migration
857 * @param {!proto.protocol.VoteAssetContract} msg The msg instance to transform.
858 * @return {!Object}
859 * @suppress {unusedLocalVariables} f is only used for nested messages
860 */
861proto.protocol.VoteAssetContract.toObject = function(includeInstance, msg) {
862 var f, obj = {
863 ownerAddress: msg.getOwnerAddress_asB64(),
864 voteAddressList: msg.getVoteAddressList_asB64(),
865 support: jspb.Message.getFieldWithDefault(msg, 3, false),
866 count: jspb.Message.getFieldWithDefault(msg, 5, 0)
867 };
868
869 if (includeInstance) {
870 obj.$jspbMessageInstance = msg;
871 }
872 return obj;
873};
874}
875
876
877/**
878 * Deserializes binary data (in protobuf wire format).
879 * @param {jspb.ByteSource} bytes The bytes to deserialize.
880 * @return {!proto.protocol.VoteAssetContract}
881 */
882proto.protocol.VoteAssetContract.deserializeBinary = function(bytes) {
883 var reader = new jspb.BinaryReader(bytes);
884 var msg = new proto.protocol.VoteAssetContract;
885 return proto.protocol.VoteAssetContract.deserializeBinaryFromReader(msg, reader);
886};
887
888
889/**
890 * Deserializes binary data (in protobuf wire format) from the
891 * given reader into the given message object.
892 * @param {!proto.protocol.VoteAssetContract} msg The message object to deserialize into.
893 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
894 * @return {!proto.protocol.VoteAssetContract}
895 */
896proto.protocol.VoteAssetContract.deserializeBinaryFromReader = function(msg, reader) {
897 while (reader.nextField()) {
898 if (reader.isEndGroup()) {
899 break;
900 }
901 var field = reader.getFieldNumber();
902 switch (field) {
903 case 1:
904 var value = /** @type {!Uint8Array} */ (reader.readBytes());
905 msg.setOwnerAddress(value);
906 break;
907 case 2:
908 var value = /** @type {!Uint8Array} */ (reader.readBytes());
909 msg.addVoteAddress(value);
910 break;
911 case 3:
912 var value = /** @type {boolean} */ (reader.readBool());
913 msg.setSupport(value);
914 break;
915 case 5:
916 var value = /** @type {number} */ (reader.readInt32());
917 msg.setCount(value);
918 break;
919 default:
920 reader.skipField();
921 break;
922 }
923 }
924 return msg;
925};
926
927
928/**
929 * Serializes the message to binary data (in protobuf wire format).
930 * @return {!Uint8Array}
931 */
932proto.protocol.VoteAssetContract.prototype.serializeBinary = function() {
933 var writer = new jspb.BinaryWriter();
934 proto.protocol.VoteAssetContract.serializeBinaryToWriter(this, writer);
935 return writer.getResultBuffer();
936};
937
938
939/**
940 * Serializes the given message to binary data (in protobuf wire
941 * format), writing to the given BinaryWriter.
942 * @param {!proto.protocol.VoteAssetContract} message
943 * @param {!jspb.BinaryWriter} writer
944 * @suppress {unusedLocalVariables} f is only used for nested messages
945 */
946proto.protocol.VoteAssetContract.serializeBinaryToWriter = function(message, writer) {
947 var f = undefined;
948 f = message.getOwnerAddress_asU8();
949 if (f.length > 0) {
950 writer.writeBytes(
951 1,
952 f
953 );
954 }
955 f = message.getVoteAddressList_asU8();
956 if (f.length > 0) {
957 writer.writeRepeatedBytes(
958 2,
959 f
960 );
961 }
962 f = message.getSupport();
963 if (f) {
964 writer.writeBool(
965 3,
966 f
967 );
968 }
969 f = message.getCount();
970 if (f !== 0) {
971 writer.writeInt32(
972 5,
973 f
974 );
975 }
976};
977
978
979/**
980 * optional bytes owner_address = 1;
981 * @return {!(string|Uint8Array)}
982 */
983proto.protocol.VoteAssetContract.prototype.getOwnerAddress = function() {
984 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
985};
986
987
988/**
989 * optional bytes owner_address = 1;
990 * This is a type-conversion wrapper around `getOwnerAddress()`
991 * @return {string}
992 */
993proto.protocol.VoteAssetContract.prototype.getOwnerAddress_asB64 = function() {
994 return /** @type {string} */ (jspb.Message.bytesAsB64(
995 this.getOwnerAddress()));
996};
997
998
999/**
1000 * optional bytes owner_address = 1;
1001 * Note that Uint8Array is not supported on all browsers.
1002 * @see http://caniuse.com/Uint8Array
1003 * This is a type-conversion wrapper around `getOwnerAddress()`
1004 * @return {!Uint8Array}
1005 */
1006proto.protocol.VoteAssetContract.prototype.getOwnerAddress_asU8 = function() {
1007 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1008 this.getOwnerAddress()));
1009};
1010
1011
1012/** @param {!(string|Uint8Array)} value */
1013proto.protocol.VoteAssetContract.prototype.setOwnerAddress = function(value) {
1014 jspb.Message.setProto3BytesField(this, 1, value);
1015};
1016
1017
1018/**
1019 * repeated bytes vote_address = 2;
1020 * @return {!(Array<!Uint8Array>|Array<string>)}
1021 */
1022proto.protocol.VoteAssetContract.prototype.getVoteAddressList = function() {
1023 return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));
1024};
1025
1026
1027/**
1028 * repeated bytes vote_address = 2;
1029 * This is a type-conversion wrapper around `getVoteAddressList()`
1030 * @return {!Array.<string>}
1031 */
1032proto.protocol.VoteAssetContract.prototype.getVoteAddressList_asB64 = function() {
1033 return /** @type {!Array.<string>} */ (jspb.Message.bytesListAsB64(
1034 this.getVoteAddressList()));
1035};
1036
1037
1038/**
1039 * repeated bytes vote_address = 2;
1040 * Note that Uint8Array is not supported on all browsers.
1041 * @see http://caniuse.com/Uint8Array
1042 * This is a type-conversion wrapper around `getVoteAddressList()`
1043 * @return {!Array.<!Uint8Array>}
1044 */
1045proto.protocol.VoteAssetContract.prototype.getVoteAddressList_asU8 = function() {
1046 return /** @type {!Array.<!Uint8Array>} */ (jspb.Message.bytesListAsU8(
1047 this.getVoteAddressList()));
1048};
1049
1050
1051/** @param {!(Array<!Uint8Array>|Array<string>)} value */
1052proto.protocol.VoteAssetContract.prototype.setVoteAddressList = function(value) {
1053 jspb.Message.setField(this, 2, value || []);
1054};
1055
1056
1057/**
1058 * @param {!(string|Uint8Array)} value
1059 * @param {number=} opt_index
1060 */
1061proto.protocol.VoteAssetContract.prototype.addVoteAddress = function(value, opt_index) {
1062 jspb.Message.addToRepeatedField(this, 2, value, opt_index);
1063};
1064
1065
1066proto.protocol.VoteAssetContract.prototype.clearVoteAddressList = function() {
1067 this.setVoteAddressList([]);
1068};
1069
1070
1071/**
1072 * optional bool support = 3;
1073 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
1074 * You should avoid comparisons like {@code val === true/false} in those cases.
1075 * @return {boolean}
1076 */
1077proto.protocol.VoteAssetContract.prototype.getSupport = function() {
1078 return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false));
1079};
1080
1081
1082/** @param {boolean} value */
1083proto.protocol.VoteAssetContract.prototype.setSupport = function(value) {
1084 jspb.Message.setProto3BooleanField(this, 3, value);
1085};
1086
1087
1088/**
1089 * optional int32 count = 5;
1090 * @return {number}
1091 */
1092proto.protocol.VoteAssetContract.prototype.getCount = function() {
1093 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1094};
1095
1096
1097/** @param {number} value */
1098proto.protocol.VoteAssetContract.prototype.setCount = function(value) {
1099 jspb.Message.setProto3IntField(this, 5, value);
1100};
1101
1102
1103
1104/**
1105 * Generated by JsPbCodeGenerator.
1106 * @param {Array=} opt_data Optional initial data array, typically from a
1107 * server response, or constructed directly in Javascript. The array is used
1108 * in place and becomes part of the constructed object. It is not cloned.
1109 * If no data is provided, the constructed object will be empty, but still
1110 * valid.
1111 * @extends {jspb.Message}
1112 * @constructor
1113 */
1114proto.protocol.VoteWitnessContract = function(opt_data) {
1115 jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.VoteWitnessContract.repeatedFields_, null);
1116};
1117goog.inherits(proto.protocol.VoteWitnessContract, jspb.Message);
1118if (goog.DEBUG && !COMPILED) {
1119 proto.protocol.VoteWitnessContract.displayName = 'proto.protocol.VoteWitnessContract';
1120}
1121/**
1122 * List of repeated fields within this message type.
1123 * @private {!Array<number>}
1124 * @const
1125 */
1126proto.protocol.VoteWitnessContract.repeatedFields_ = [2];
1127
1128
1129
1130if (jspb.Message.GENERATE_TO_OBJECT) {
1131/**
1132 * Creates an object representation of this proto suitable for use in Soy templates.
1133 * Field names that are reserved in JavaScript and will be renamed to pb_name.
1134 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1135 * For the list of reserved names please see:
1136 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
1137 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
1138 * for transitional soy proto support: http://goto/soy-param-migration
1139 * @return {!Object}
1140 */
1141proto.protocol.VoteWitnessContract.prototype.toObject = function(opt_includeInstance) {
1142 return proto.protocol.VoteWitnessContract.toObject(opt_includeInstance, this);
1143};
1144
1145
1146/**
1147 * Static version of the {@see toObject} method.
1148 * @param {boolean|undefined} includeInstance Whether to include the JSPB
1149 * instance for transitional soy proto support:
1150 * http://goto/soy-param-migration
1151 * @param {!proto.protocol.VoteWitnessContract} msg The msg instance to transform.
1152 * @return {!Object}
1153 * @suppress {unusedLocalVariables} f is only used for nested messages
1154 */
1155proto.protocol.VoteWitnessContract.toObject = function(includeInstance, msg) {
1156 var f, obj = {
1157 ownerAddress: msg.getOwnerAddress_asB64(),
1158 votesList: jspb.Message.toObjectList(msg.getVotesList(),
1159 proto.protocol.VoteWitnessContract.Vote.toObject, includeInstance),
1160 support: jspb.Message.getFieldWithDefault(msg, 3, false)
1161 };
1162
1163 if (includeInstance) {
1164 obj.$jspbMessageInstance = msg;
1165 }
1166 return obj;
1167};
1168}
1169
1170
1171/**
1172 * Deserializes binary data (in protobuf wire format).
1173 * @param {jspb.ByteSource} bytes The bytes to deserialize.
1174 * @return {!proto.protocol.VoteWitnessContract}
1175 */
1176proto.protocol.VoteWitnessContract.deserializeBinary = function(bytes) {
1177 var reader = new jspb.BinaryReader(bytes);
1178 var msg = new proto.protocol.VoteWitnessContract;
1179 return proto.protocol.VoteWitnessContract.deserializeBinaryFromReader(msg, reader);
1180};
1181
1182
1183/**
1184 * Deserializes binary data (in protobuf wire format) from the
1185 * given reader into the given message object.
1186 * @param {!proto.protocol.VoteWitnessContract} msg The message object to deserialize into.
1187 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1188 * @return {!proto.protocol.VoteWitnessContract}
1189 */
1190proto.protocol.VoteWitnessContract.deserializeBinaryFromReader = function(msg, reader) {
1191 while (reader.nextField()) {
1192 if (reader.isEndGroup()) {
1193 break;
1194 }
1195 var field = reader.getFieldNumber();
1196 switch (field) {
1197 case 1:
1198 var value = /** @type {!Uint8Array} */ (reader.readBytes());
1199 msg.setOwnerAddress(value);
1200 break;
1201 case 2:
1202 var value = new proto.protocol.VoteWitnessContract.Vote;
1203 reader.readMessage(value,proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader);
1204 msg.addVotes(value);
1205 break;
1206 case 3:
1207 var value = /** @type {boolean} */ (reader.readBool());
1208 msg.setSupport(value);
1209 break;
1210 default:
1211 reader.skipField();
1212 break;
1213 }
1214 }
1215 return msg;
1216};
1217
1218
1219/**
1220 * Serializes the message to binary data (in protobuf wire format).
1221 * @return {!Uint8Array}
1222 */
1223proto.protocol.VoteWitnessContract.prototype.serializeBinary = function() {
1224 var writer = new jspb.BinaryWriter();
1225 proto.protocol.VoteWitnessContract.serializeBinaryToWriter(this, writer);
1226 return writer.getResultBuffer();
1227};
1228
1229
1230/**
1231 * Serializes the given message to binary data (in protobuf wire
1232 * format), writing to the given BinaryWriter.
1233 * @param {!proto.protocol.VoteWitnessContract} message
1234 * @param {!jspb.BinaryWriter} writer
1235 * @suppress {unusedLocalVariables} f is only used for nested messages
1236 */
1237proto.protocol.VoteWitnessContract.serializeBinaryToWriter = function(message, writer) {
1238 var f = undefined;
1239 f = message.getOwnerAddress_asU8();
1240 if (f.length > 0) {
1241 writer.writeBytes(
1242 1,
1243 f
1244 );
1245 }
1246 f = message.getVotesList();
1247 if (f.length > 0) {
1248 writer.writeRepeatedMessage(
1249 2,
1250 f,
1251 proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter
1252 );
1253 }
1254 f = message.getSupport();
1255 if (f) {
1256 writer.writeBool(
1257 3,
1258 f
1259 );
1260 }
1261};
1262
1263
1264
1265/**
1266 * Generated by JsPbCodeGenerator.
1267 * @param {Array=} opt_data Optional initial data array, typically from a
1268 * server response, or constructed directly in Javascript. The array is used
1269 * in place and becomes part of the constructed object. It is not cloned.
1270 * If no data is provided, the constructed object will be empty, but still
1271 * valid.
1272 * @extends {jspb.Message}
1273 * @constructor
1274 */
1275proto.protocol.VoteWitnessContract.Vote = function(opt_data) {
1276 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1277};
1278goog.inherits(proto.protocol.VoteWitnessContract.Vote, jspb.Message);
1279if (goog.DEBUG && !COMPILED) {
1280 proto.protocol.VoteWitnessContract.Vote.displayName = 'proto.protocol.VoteWitnessContract.Vote';
1281}
1282
1283
1284if (jspb.Message.GENERATE_TO_OBJECT) {
1285/**
1286 * Creates an object representation of this proto suitable for use in Soy templates.
1287 * Field names that are reserved in JavaScript and will be renamed to pb_name.
1288 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1289 * For the list of reserved names please see:
1290 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
1291 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
1292 * for transitional soy proto support: http://goto/soy-param-migration
1293 * @return {!Object}
1294 */
1295proto.protocol.VoteWitnessContract.Vote.prototype.toObject = function(opt_includeInstance) {
1296 return proto.protocol.VoteWitnessContract.Vote.toObject(opt_includeInstance, this);
1297};
1298
1299
1300/**
1301 * Static version of the {@see toObject} method.
1302 * @param {boolean|undefined} includeInstance Whether to include the JSPB
1303 * instance for transitional soy proto support:
1304 * http://goto/soy-param-migration
1305 * @param {!proto.protocol.VoteWitnessContract.Vote} msg The msg instance to transform.
1306 * @return {!Object}
1307 * @suppress {unusedLocalVariables} f is only used for nested messages
1308 */
1309proto.protocol.VoteWitnessContract.Vote.toObject = function(includeInstance, msg) {
1310 var f, obj = {
1311 voteAddress: msg.getVoteAddress_asB64(),
1312 voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0)
1313 };
1314
1315 if (includeInstance) {
1316 obj.$jspbMessageInstance = msg;
1317 }
1318 return obj;
1319};
1320}
1321
1322
1323/**
1324 * Deserializes binary data (in protobuf wire format).
1325 * @param {jspb.ByteSource} bytes The bytes to deserialize.
1326 * @return {!proto.protocol.VoteWitnessContract.Vote}
1327 */
1328proto.protocol.VoteWitnessContract.Vote.deserializeBinary = function(bytes) {
1329 var reader = new jspb.BinaryReader(bytes);
1330 var msg = new proto.protocol.VoteWitnessContract.Vote;
1331 return proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader(msg, reader);
1332};
1333
1334
1335/**
1336 * Deserializes binary data (in protobuf wire format) from the
1337 * given reader into the given message object.
1338 * @param {!proto.protocol.VoteWitnessContract.Vote} msg The message object to deserialize into.
1339 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1340 * @return {!proto.protocol.VoteWitnessContract.Vote}
1341 */
1342proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader = function(msg, reader) {
1343 while (reader.nextField()) {
1344 if (reader.isEndGroup()) {
1345 break;
1346 }
1347 var field = reader.getFieldNumber();
1348 switch (field) {
1349 case 1:
1350 var value = /** @type {!Uint8Array} */ (reader.readBytes());
1351 msg.setVoteAddress(value);
1352 break;
1353 case 2:
1354 var value = /** @type {number} */ (reader.readInt64());
1355 msg.setVoteCount(value);
1356 break;
1357 default:
1358 reader.skipField();
1359 break;
1360 }
1361 }
1362 return msg;
1363};
1364
1365
1366/**
1367 * Serializes the message to binary data (in protobuf wire format).
1368 * @return {!Uint8Array}
1369 */
1370proto.protocol.VoteWitnessContract.Vote.prototype.serializeBinary = function() {
1371 var writer = new jspb.BinaryWriter();
1372 proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter(this, writer);
1373 return writer.getResultBuffer();
1374};
1375
1376
1377/**
1378 * Serializes the given message to binary data (in protobuf wire
1379 * format), writing to the given BinaryWriter.
1380 * @param {!proto.protocol.VoteWitnessContract.Vote} message
1381 * @param {!jspb.BinaryWriter} writer
1382 * @suppress {unusedLocalVariables} f is only used for nested messages
1383 */
1384proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter = function(message, writer) {
1385 var f = undefined;
1386 f = message.getVoteAddress_asU8();
1387 if (f.length > 0) {
1388 writer.writeBytes(
1389 1,
1390 f
1391 );
1392 }
1393 f = message.getVoteCount();
1394 if (f !== 0) {
1395 writer.writeInt64(
1396 2,
1397 f
1398 );
1399 }
1400};
1401
1402
1403/**
1404 * optional bytes vote_address = 1;
1405 * @return {!(string|Uint8Array)}
1406 */
1407proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress = function() {
1408 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1409};
1410
1411
1412/**
1413 * optional bytes vote_address = 1;
1414 * This is a type-conversion wrapper around `getVoteAddress()`
1415 * @return {string}
1416 */
1417proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64 = function() {
1418 return /** @type {string} */ (jspb.Message.bytesAsB64(
1419 this.getVoteAddress()));
1420};
1421
1422
1423/**
1424 * optional bytes vote_address = 1;
1425 * Note that Uint8Array is not supported on all browsers.
1426 * @see http://caniuse.com/Uint8Array
1427 * This is a type-conversion wrapper around `getVoteAddress()`
1428 * @return {!Uint8Array}
1429 */
1430proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8 = function() {
1431 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1432 this.getVoteAddress()));
1433};
1434
1435
1436/** @param {!(string|Uint8Array)} value */
1437proto.protocol.VoteWitnessContract.Vote.prototype.setVoteAddress = function(value) {
1438 jspb.Message.setProto3BytesField(this, 1, value);
1439};
1440
1441
1442/**
1443 * optional int64 vote_count = 2;
1444 * @return {number}
1445 */
1446proto.protocol.VoteWitnessContract.Vote.prototype.getVoteCount = function() {
1447 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1448};
1449
1450
1451/** @param {number} value */
1452proto.protocol.VoteWitnessContract.Vote.prototype.setVoteCount = function(value) {
1453 jspb.Message.setProto3IntField(this, 2, value);
1454};
1455
1456
1457/**
1458 * optional bytes owner_address = 1;
1459 * @return {!(string|Uint8Array)}
1460 */
1461proto.protocol.VoteWitnessContract.prototype.getOwnerAddress = function() {
1462 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1463};
1464
1465
1466/**
1467 * optional bytes owner_address = 1;
1468 * This is a type-conversion wrapper around `getOwnerAddress()`
1469 * @return {string}
1470 */
1471proto.protocol.VoteWitnessContract.prototype.getOwnerAddress_asB64 = function() {
1472 return /** @type {string} */ (jspb.Message.bytesAsB64(
1473 this.getOwnerAddress()));
1474};
1475
1476
1477/**
1478 * optional bytes owner_address = 1;
1479 * Note that Uint8Array is not supported on all browsers.
1480 * @see http://caniuse.com/Uint8Array
1481 * This is a type-conversion wrapper around `getOwnerAddress()`
1482 * @return {!Uint8Array}
1483 */
1484proto.protocol.VoteWitnessContract.prototype.getOwnerAddress_asU8 = function() {
1485 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1486 this.getOwnerAddress()));
1487};
1488
1489
1490/** @param {!(string|Uint8Array)} value */
1491proto.protocol.VoteWitnessContract.prototype.setOwnerAddress = function(value) {
1492 jspb.Message.setProto3BytesField(this, 1, value);
1493};
1494
1495
1496/**
1497 * repeated Vote votes = 2;
1498 * @return {!Array.<!proto.protocol.VoteWitnessContract.Vote>}
1499 */
1500proto.protocol.VoteWitnessContract.prototype.getVotesList = function() {
1501 return /** @type{!Array.<!proto.protocol.VoteWitnessContract.Vote>} */ (
1502 jspb.Message.getRepeatedWrapperField(this, proto.protocol.VoteWitnessContract.Vote, 2));
1503};
1504
1505
1506/** @param {!Array.<!proto.protocol.VoteWitnessContract.Vote>} value */
1507proto.protocol.VoteWitnessContract.prototype.setVotesList = function(value) {
1508 jspb.Message.setRepeatedWrapperField(this, 2, value);
1509};
1510
1511
1512/**
1513 * @param {!proto.protocol.VoteWitnessContract.Vote=} opt_value
1514 * @param {number=} opt_index
1515 * @return {!proto.protocol.VoteWitnessContract.Vote}
1516 */
1517proto.protocol.VoteWitnessContract.prototype.addVotes = function(opt_value, opt_index) {
1518 return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.VoteWitnessContract.Vote, opt_index);
1519};
1520
1521
1522proto.protocol.VoteWitnessContract.prototype.clearVotesList = function() {
1523 this.setVotesList([]);
1524};
1525
1526
1527/**
1528 * optional bool support = 3;
1529 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
1530 * You should avoid comparisons like {@code val === true/false} in those cases.
1531 * @return {boolean}
1532 */
1533proto.protocol.VoteWitnessContract.prototype.getSupport = function() {
1534 return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false));
1535};
1536
1537
1538/** @param {boolean} value */
1539proto.protocol.VoteWitnessContract.prototype.setSupport = function(value) {
1540 jspb.Message.setProto3BooleanField(this, 3, value);
1541};
1542
1543
1544
1545/**
1546 * Generated by JsPbCodeGenerator.
1547 * @param {Array=} opt_data Optional initial data array, typically from a
1548 * server response, or constructed directly in Javascript. The array is used
1549 * in place and becomes part of the constructed object. It is not cloned.
1550 * If no data is provided, the constructed object will be empty, but still
1551 * valid.
1552 * @extends {jspb.Message}
1553 * @constructor
1554 */
1555proto.protocol.WitnessCreateContract = function(opt_data) {
1556 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1557};
1558goog.inherits(proto.protocol.WitnessCreateContract, jspb.Message);
1559if (goog.DEBUG && !COMPILED) {
1560 proto.protocol.WitnessCreateContract.displayName = 'proto.protocol.WitnessCreateContract';
1561}
1562
1563
1564if (jspb.Message.GENERATE_TO_OBJECT) {
1565/**
1566 * Creates an object representation of this proto suitable for use in Soy templates.
1567 * Field names that are reserved in JavaScript and will be renamed to pb_name.
1568 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1569 * For the list of reserved names please see:
1570 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
1571 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
1572 * for transitional soy proto support: http://goto/soy-param-migration
1573 * @return {!Object}
1574 */
1575proto.protocol.WitnessCreateContract.prototype.toObject = function(opt_includeInstance) {
1576 return proto.protocol.WitnessCreateContract.toObject(opt_includeInstance, this);
1577};
1578
1579
1580/**
1581 * Static version of the {@see toObject} method.
1582 * @param {boolean|undefined} includeInstance Whether to include the JSPB
1583 * instance for transitional soy proto support:
1584 * http://goto/soy-param-migration
1585 * @param {!proto.protocol.WitnessCreateContract} msg The msg instance to transform.
1586 * @return {!Object}
1587 * @suppress {unusedLocalVariables} f is only used for nested messages
1588 */
1589proto.protocol.WitnessCreateContract.toObject = function(includeInstance, msg) {
1590 var f, obj = {
1591 ownerAddress: msg.getOwnerAddress_asB64(),
1592 url: msg.getUrl_asB64()
1593 };
1594
1595 if (includeInstance) {
1596 obj.$jspbMessageInstance = msg;
1597 }
1598 return obj;
1599};
1600}
1601
1602
1603/**
1604 * Deserializes binary data (in protobuf wire format).
1605 * @param {jspb.ByteSource} bytes The bytes to deserialize.
1606 * @return {!proto.protocol.WitnessCreateContract}
1607 */
1608proto.protocol.WitnessCreateContract.deserializeBinary = function(bytes) {
1609 var reader = new jspb.BinaryReader(bytes);
1610 var msg = new proto.protocol.WitnessCreateContract;
1611 return proto.protocol.WitnessCreateContract.deserializeBinaryFromReader(msg, reader);
1612};
1613
1614
1615/**
1616 * Deserializes binary data (in protobuf wire format) from the
1617 * given reader into the given message object.
1618 * @param {!proto.protocol.WitnessCreateContract} msg The message object to deserialize into.
1619 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1620 * @return {!proto.protocol.WitnessCreateContract}
1621 */
1622proto.protocol.WitnessCreateContract.deserializeBinaryFromReader = function(msg, reader) {
1623 while (reader.nextField()) {
1624 if (reader.isEndGroup()) {
1625 break;
1626 }
1627 var field = reader.getFieldNumber();
1628 switch (field) {
1629 case 1:
1630 var value = /** @type {!Uint8Array} */ (reader.readBytes());
1631 msg.setOwnerAddress(value);
1632 break;
1633 case 2:
1634 var value = /** @type {!Uint8Array} */ (reader.readBytes());
1635 msg.setUrl(value);
1636 break;
1637 default:
1638 reader.skipField();
1639 break;
1640 }
1641 }
1642 return msg;
1643};
1644
1645
1646/**
1647 * Serializes the message to binary data (in protobuf wire format).
1648 * @return {!Uint8Array}
1649 */
1650proto.protocol.WitnessCreateContract.prototype.serializeBinary = function() {
1651 var writer = new jspb.BinaryWriter();
1652 proto.protocol.WitnessCreateContract.serializeBinaryToWriter(this, writer);
1653 return writer.getResultBuffer();
1654};
1655
1656
1657/**
1658 * Serializes the given message to binary data (in protobuf wire
1659 * format), writing to the given BinaryWriter.
1660 * @param {!proto.protocol.WitnessCreateContract} message
1661 * @param {!jspb.BinaryWriter} writer
1662 * @suppress {unusedLocalVariables} f is only used for nested messages
1663 */
1664proto.protocol.WitnessCreateContract.serializeBinaryToWriter = function(message, writer) {
1665 var f = undefined;
1666 f = message.getOwnerAddress_asU8();
1667 if (f.length > 0) {
1668 writer.writeBytes(
1669 1,
1670 f
1671 );
1672 }
1673 f = message.getUrl_asU8();
1674 if (f.length > 0) {
1675 writer.writeBytes(
1676 2,
1677 f
1678 );
1679 }
1680};
1681
1682
1683/**
1684 * optional bytes owner_address = 1;
1685 * @return {!(string|Uint8Array)}
1686 */
1687proto.protocol.WitnessCreateContract.prototype.getOwnerAddress = function() {
1688 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1689};
1690
1691
1692/**
1693 * optional bytes owner_address = 1;
1694 * This is a type-conversion wrapper around `getOwnerAddress()`
1695 * @return {string}
1696 */
1697proto.protocol.WitnessCreateContract.prototype.getOwnerAddress_asB64 = function() {
1698 return /** @type {string} */ (jspb.Message.bytesAsB64(
1699 this.getOwnerAddress()));
1700};
1701
1702
1703/**
1704 * optional bytes owner_address = 1;
1705 * Note that Uint8Array is not supported on all browsers.
1706 * @see http://caniuse.com/Uint8Array
1707 * This is a type-conversion wrapper around `getOwnerAddress()`
1708 * @return {!Uint8Array}
1709 */
1710proto.protocol.WitnessCreateContract.prototype.getOwnerAddress_asU8 = function() {
1711 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1712 this.getOwnerAddress()));
1713};
1714
1715
1716/** @param {!(string|Uint8Array)} value */
1717proto.protocol.WitnessCreateContract.prototype.setOwnerAddress = function(value) {
1718 jspb.Message.setProto3BytesField(this, 1, value);
1719};
1720
1721
1722/**
1723 * optional bytes url = 2;
1724 * @return {!(string|Uint8Array)}
1725 */
1726proto.protocol.WitnessCreateContract.prototype.getUrl = function() {
1727 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1728};
1729
1730
1731/**
1732 * optional bytes url = 2;
1733 * This is a type-conversion wrapper around `getUrl()`
1734 * @return {string}
1735 */
1736proto.protocol.WitnessCreateContract.prototype.getUrl_asB64 = function() {
1737 return /** @type {string} */ (jspb.Message.bytesAsB64(
1738 this.getUrl()));
1739};
1740
1741
1742/**
1743 * optional bytes url = 2;
1744 * Note that Uint8Array is not supported on all browsers.
1745 * @see http://caniuse.com/Uint8Array
1746 * This is a type-conversion wrapper around `getUrl()`
1747 * @return {!Uint8Array}
1748 */
1749proto.protocol.WitnessCreateContract.prototype.getUrl_asU8 = function() {
1750 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1751 this.getUrl()));
1752};
1753
1754
1755/** @param {!(string|Uint8Array)} value */
1756proto.protocol.WitnessCreateContract.prototype.setUrl = function(value) {
1757 jspb.Message.setProto3BytesField(this, 2, value);
1758};
1759
1760
1761
1762/**
1763 * Generated by JsPbCodeGenerator.
1764 * @param {Array=} opt_data Optional initial data array, typically from a
1765 * server response, or constructed directly in Javascript. The array is used
1766 * in place and becomes part of the constructed object. It is not cloned.
1767 * If no data is provided, the constructed object will be empty, but still
1768 * valid.
1769 * @extends {jspb.Message}
1770 * @constructor
1771 */
1772proto.protocol.WitnessUpdateContract = function(opt_data) {
1773 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1774};
1775goog.inherits(proto.protocol.WitnessUpdateContract, jspb.Message);
1776if (goog.DEBUG && !COMPILED) {
1777 proto.protocol.WitnessUpdateContract.displayName = 'proto.protocol.WitnessUpdateContract';
1778}
1779
1780
1781if (jspb.Message.GENERATE_TO_OBJECT) {
1782/**
1783 * Creates an object representation of this proto suitable for use in Soy templates.
1784 * Field names that are reserved in JavaScript and will be renamed to pb_name.
1785 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1786 * For the list of reserved names please see:
1787 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
1788 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
1789 * for transitional soy proto support: http://goto/soy-param-migration
1790 * @return {!Object}
1791 */
1792proto.protocol.WitnessUpdateContract.prototype.toObject = function(opt_includeInstance) {
1793 return proto.protocol.WitnessUpdateContract.toObject(opt_includeInstance, this);
1794};
1795
1796
1797/**
1798 * Static version of the {@see toObject} method.
1799 * @param {boolean|undefined} includeInstance Whether to include the JSPB
1800 * instance for transitional soy proto support:
1801 * http://goto/soy-param-migration
1802 * @param {!proto.protocol.WitnessUpdateContract} msg The msg instance to transform.
1803 * @return {!Object}
1804 * @suppress {unusedLocalVariables} f is only used for nested messages
1805 */
1806proto.protocol.WitnessUpdateContract.toObject = function(includeInstance, msg) {
1807 var f, obj = {
1808 ownerAddress: msg.getOwnerAddress_asB64(),
1809 updateUrl: msg.getUpdateUrl_asB64()
1810 };
1811
1812 if (includeInstance) {
1813 obj.$jspbMessageInstance = msg;
1814 }
1815 return obj;
1816};
1817}
1818
1819
1820/**
1821 * Deserializes binary data (in protobuf wire format).
1822 * @param {jspb.ByteSource} bytes The bytes to deserialize.
1823 * @return {!proto.protocol.WitnessUpdateContract}
1824 */
1825proto.protocol.WitnessUpdateContract.deserializeBinary = function(bytes) {
1826 var reader = new jspb.BinaryReader(bytes);
1827 var msg = new proto.protocol.WitnessUpdateContract;
1828 return proto.protocol.WitnessUpdateContract.deserializeBinaryFromReader(msg, reader);
1829};
1830
1831
1832/**
1833 * Deserializes binary data (in protobuf wire format) from the
1834 * given reader into the given message object.
1835 * @param {!proto.protocol.WitnessUpdateContract} msg The message object to deserialize into.
1836 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1837 * @return {!proto.protocol.WitnessUpdateContract}
1838 */
1839proto.protocol.WitnessUpdateContract.deserializeBinaryFromReader = function(msg, reader) {
1840 while (reader.nextField()) {
1841 if (reader.isEndGroup()) {
1842 break;
1843 }
1844 var field = reader.getFieldNumber();
1845 switch (field) {
1846 case 1:
1847 var value = /** @type {!Uint8Array} */ (reader.readBytes());
1848 msg.setOwnerAddress(value);
1849 break;
1850 case 12:
1851 var value = /** @type {!Uint8Array} */ (reader.readBytes());
1852 msg.setUpdateUrl(value);
1853 break;
1854 default:
1855 reader.skipField();
1856 break;
1857 }
1858 }
1859 return msg;
1860};
1861
1862
1863/**
1864 * Serializes the message to binary data (in protobuf wire format).
1865 * @return {!Uint8Array}
1866 */
1867proto.protocol.WitnessUpdateContract.prototype.serializeBinary = function() {
1868 var writer = new jspb.BinaryWriter();
1869 proto.protocol.WitnessUpdateContract.serializeBinaryToWriter(this, writer);
1870 return writer.getResultBuffer();
1871};
1872
1873
1874/**
1875 * Serializes the given message to binary data (in protobuf wire
1876 * format), writing to the given BinaryWriter.
1877 * @param {!proto.protocol.WitnessUpdateContract} message
1878 * @param {!jspb.BinaryWriter} writer
1879 * @suppress {unusedLocalVariables} f is only used for nested messages
1880 */
1881proto.protocol.WitnessUpdateContract.serializeBinaryToWriter = function(message, writer) {
1882 var f = undefined;
1883 f = message.getOwnerAddress_asU8();
1884 if (f.length > 0) {
1885 writer.writeBytes(
1886 1,
1887 f
1888 );
1889 }
1890 f = message.getUpdateUrl_asU8();
1891 if (f.length > 0) {
1892 writer.writeBytes(
1893 12,
1894 f
1895 );
1896 }
1897};
1898
1899
1900/**
1901 * optional bytes owner_address = 1;
1902 * @return {!(string|Uint8Array)}
1903 */
1904proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress = function() {
1905 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1906};
1907
1908
1909/**
1910 * optional bytes owner_address = 1;
1911 * This is a type-conversion wrapper around `getOwnerAddress()`
1912 * @return {string}
1913 */
1914proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress_asB64 = function() {
1915 return /** @type {string} */ (jspb.Message.bytesAsB64(
1916 this.getOwnerAddress()));
1917};
1918
1919
1920/**
1921 * optional bytes owner_address = 1;
1922 * Note that Uint8Array is not supported on all browsers.
1923 * @see http://caniuse.com/Uint8Array
1924 * This is a type-conversion wrapper around `getOwnerAddress()`
1925 * @return {!Uint8Array}
1926 */
1927proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress_asU8 = function() {
1928 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1929 this.getOwnerAddress()));
1930};
1931
1932
1933/** @param {!(string|Uint8Array)} value */
1934proto.protocol.WitnessUpdateContract.prototype.setOwnerAddress = function(value) {
1935 jspb.Message.setProto3BytesField(this, 1, value);
1936};
1937
1938
1939/**
1940 * optional bytes update_url = 12;
1941 * @return {!(string|Uint8Array)}
1942 */
1943proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl = function() {
1944 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
1945};
1946
1947
1948/**
1949 * optional bytes update_url = 12;
1950 * This is a type-conversion wrapper around `getUpdateUrl()`
1951 * @return {string}
1952 */
1953proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asB64 = function() {
1954 return /** @type {string} */ (jspb.Message.bytesAsB64(
1955 this.getUpdateUrl()));
1956};
1957
1958
1959/**
1960 * optional bytes update_url = 12;
1961 * Note that Uint8Array is not supported on all browsers.
1962 * @see http://caniuse.com/Uint8Array
1963 * This is a type-conversion wrapper around `getUpdateUrl()`
1964 * @return {!Uint8Array}
1965 */
1966proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asU8 = function() {
1967 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1968 this.getUpdateUrl()));
1969};
1970
1971
1972/** @param {!(string|Uint8Array)} value */
1973proto.protocol.WitnessUpdateContract.prototype.setUpdateUrl = function(value) {
1974 jspb.Message.setProto3BytesField(this, 12, value);
1975};
1976
1977
1978
1979/**
1980 * Generated by JsPbCodeGenerator.
1981 * @param {Array=} opt_data Optional initial data array, typically from a
1982 * server response, or constructed directly in Javascript. The array is used
1983 * in place and becomes part of the constructed object. It is not cloned.
1984 * If no data is provided, the constructed object will be empty, but still
1985 * valid.
1986 * @extends {jspb.Message}
1987 * @constructor
1988 */
1989proto.protocol.AssetIssueContract = function(opt_data) {
1990 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1991};
1992goog.inherits(proto.protocol.AssetIssueContract, jspb.Message);
1993if (goog.DEBUG && !COMPILED) {
1994 proto.protocol.AssetIssueContract.displayName = 'proto.protocol.AssetIssueContract';
1995}
1996
1997
1998if (jspb.Message.GENERATE_TO_OBJECT) {
1999/**
2000 * Creates an object representation of this proto suitable for use in Soy templates.
2001 * Field names that are reserved in JavaScript and will be renamed to pb_name.
2002 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2003 * For the list of reserved names please see:
2004 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
2005 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
2006 * for transitional soy proto support: http://goto/soy-param-migration
2007 * @return {!Object}
2008 */
2009proto.protocol.AssetIssueContract.prototype.toObject = function(opt_includeInstance) {
2010 return proto.protocol.AssetIssueContract.toObject(opt_includeInstance, this);
2011};
2012
2013
2014/**
2015 * Static version of the {@see toObject} method.
2016 * @param {boolean|undefined} includeInstance Whether to include the JSPB
2017 * instance for transitional soy proto support:
2018 * http://goto/soy-param-migration
2019 * @param {!proto.protocol.AssetIssueContract} msg The msg instance to transform.
2020 * @return {!Object}
2021 * @suppress {unusedLocalVariables} f is only used for nested messages
2022 */
2023proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) {
2024 var f, obj = {
2025 ownerAddress: msg.getOwnerAddress_asB64(),
2026 name: msg.getName_asB64(),
2027 totalSupply: jspb.Message.getFieldWithDefault(msg, 4, 0),
2028 trxNum: jspb.Message.getFieldWithDefault(msg, 6, 0),
2029 num: jspb.Message.getFieldWithDefault(msg, 8, 0),
2030 startTime: jspb.Message.getFieldWithDefault(msg, 9, 0),
2031 endTime: jspb.Message.getFieldWithDefault(msg, 10, 0),
2032 decayRatio: jspb.Message.getFieldWithDefault(msg, 15, 0),
2033 voteScore: jspb.Message.getFieldWithDefault(msg, 16, 0),
2034 description: msg.getDescription_asB64(),
2035 url: msg.getUrl_asB64()
2036 };
2037
2038 if (includeInstance) {
2039 obj.$jspbMessageInstance = msg;
2040 }
2041 return obj;
2042};
2043}
2044
2045
2046/**
2047 * Deserializes binary data (in protobuf wire format).
2048 * @param {jspb.ByteSource} bytes The bytes to deserialize.
2049 * @return {!proto.protocol.AssetIssueContract}
2050 */
2051proto.protocol.AssetIssueContract.deserializeBinary = function(bytes) {
2052 var reader = new jspb.BinaryReader(bytes);
2053 var msg = new proto.protocol.AssetIssueContract;
2054 return proto.protocol.AssetIssueContract.deserializeBinaryFromReader(msg, reader);
2055};
2056
2057
2058/**
2059 * Deserializes binary data (in protobuf wire format) from the
2060 * given reader into the given message object.
2061 * @param {!proto.protocol.AssetIssueContract} msg The message object to deserialize into.
2062 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2063 * @return {!proto.protocol.AssetIssueContract}
2064 */
2065proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, reader) {
2066 while (reader.nextField()) {
2067 if (reader.isEndGroup()) {
2068 break;
2069 }
2070 var field = reader.getFieldNumber();
2071 switch (field) {
2072 case 1:
2073 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2074 msg.setOwnerAddress(value);
2075 break;
2076 case 2:
2077 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2078 msg.setName(value);
2079 break;
2080 case 4:
2081 var value = /** @type {number} */ (reader.readInt64());
2082 msg.setTotalSupply(value);
2083 break;
2084 case 6:
2085 var value = /** @type {number} */ (reader.readInt32());
2086 msg.setTrxNum(value);
2087 break;
2088 case 8:
2089 var value = /** @type {number} */ (reader.readInt32());
2090 msg.setNum(value);
2091 break;
2092 case 9:
2093 var value = /** @type {number} */ (reader.readInt64());
2094 msg.setStartTime(value);
2095 break;
2096 case 10:
2097 var value = /** @type {number} */ (reader.readInt64());
2098 msg.setEndTime(value);
2099 break;
2100 case 15:
2101 var value = /** @type {number} */ (reader.readInt32());
2102 msg.setDecayRatio(value);
2103 break;
2104 case 16:
2105 var value = /** @type {number} */ (reader.readInt32());
2106 msg.setVoteScore(value);
2107 break;
2108 case 20:
2109 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2110 msg.setDescription(value);
2111 break;
2112 case 21:
2113 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2114 msg.setUrl(value);
2115 break;
2116 default:
2117 reader.skipField();
2118 break;
2119 }
2120 }
2121 return msg;
2122};
2123
2124
2125/**
2126 * Serializes the message to binary data (in protobuf wire format).
2127 * @return {!Uint8Array}
2128 */
2129proto.protocol.AssetIssueContract.prototype.serializeBinary = function() {
2130 var writer = new jspb.BinaryWriter();
2131 proto.protocol.AssetIssueContract.serializeBinaryToWriter(this, writer);
2132 return writer.getResultBuffer();
2133};
2134
2135
2136/**
2137 * Serializes the given message to binary data (in protobuf wire
2138 * format), writing to the given BinaryWriter.
2139 * @param {!proto.protocol.AssetIssueContract} message
2140 * @param {!jspb.BinaryWriter} writer
2141 * @suppress {unusedLocalVariables} f is only used for nested messages
2142 */
2143proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, writer) {
2144 var f = undefined;
2145 f = message.getOwnerAddress_asU8();
2146 if (f.length > 0) {
2147 writer.writeBytes(
2148 1,
2149 f
2150 );
2151 }
2152 f = message.getName_asU8();
2153 if (f.length > 0) {
2154 writer.writeBytes(
2155 2,
2156 f
2157 );
2158 }
2159 f = message.getTotalSupply();
2160 if (f !== 0) {
2161 writer.writeInt64(
2162 4,
2163 f
2164 );
2165 }
2166 f = message.getTrxNum();
2167 if (f !== 0) {
2168 writer.writeInt32(
2169 6,
2170 f
2171 );
2172 }
2173 f = message.getNum();
2174 if (f !== 0) {
2175 writer.writeInt32(
2176 8,
2177 f
2178 );
2179 }
2180 f = message.getStartTime();
2181 if (f !== 0) {
2182 writer.writeInt64(
2183 9,
2184 f
2185 );
2186 }
2187 f = message.getEndTime();
2188 if (f !== 0) {
2189 writer.writeInt64(
2190 10,
2191 f
2192 );
2193 }
2194 f = message.getDecayRatio();
2195 if (f !== 0) {
2196 writer.writeInt32(
2197 15,
2198 f
2199 );
2200 }
2201 f = message.getVoteScore();
2202 if (f !== 0) {
2203 writer.writeInt32(
2204 16,
2205 f
2206 );
2207 }
2208 f = message.getDescription_asU8();
2209 if (f.length > 0) {
2210 writer.writeBytes(
2211 20,
2212 f
2213 );
2214 }
2215 f = message.getUrl_asU8();
2216 if (f.length > 0) {
2217 writer.writeBytes(
2218 21,
2219 f
2220 );
2221 }
2222};
2223
2224
2225/**
2226 * optional bytes owner_address = 1;
2227 * @return {!(string|Uint8Array)}
2228 */
2229proto.protocol.AssetIssueContract.prototype.getOwnerAddress = function() {
2230 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2231};
2232
2233
2234/**
2235 * optional bytes owner_address = 1;
2236 * This is a type-conversion wrapper around `getOwnerAddress()`
2237 * @return {string}
2238 */
2239proto.protocol.AssetIssueContract.prototype.getOwnerAddress_asB64 = function() {
2240 return /** @type {string} */ (jspb.Message.bytesAsB64(
2241 this.getOwnerAddress()));
2242};
2243
2244
2245/**
2246 * optional bytes owner_address = 1;
2247 * Note that Uint8Array is not supported on all browsers.
2248 * @see http://caniuse.com/Uint8Array
2249 * This is a type-conversion wrapper around `getOwnerAddress()`
2250 * @return {!Uint8Array}
2251 */
2252proto.protocol.AssetIssueContract.prototype.getOwnerAddress_asU8 = function() {
2253 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2254 this.getOwnerAddress()));
2255};
2256
2257
2258/** @param {!(string|Uint8Array)} value */
2259proto.protocol.AssetIssueContract.prototype.setOwnerAddress = function(value) {
2260 jspb.Message.setProto3BytesField(this, 1, value);
2261};
2262
2263
2264/**
2265 * optional bytes name = 2;
2266 * @return {!(string|Uint8Array)}
2267 */
2268proto.protocol.AssetIssueContract.prototype.getName = function() {
2269 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2270};
2271
2272
2273/**
2274 * optional bytes name = 2;
2275 * This is a type-conversion wrapper around `getName()`
2276 * @return {string}
2277 */
2278proto.protocol.AssetIssueContract.prototype.getName_asB64 = function() {
2279 return /** @type {string} */ (jspb.Message.bytesAsB64(
2280 this.getName()));
2281};
2282
2283
2284/**
2285 * optional bytes name = 2;
2286 * Note that Uint8Array is not supported on all browsers.
2287 * @see http://caniuse.com/Uint8Array
2288 * This is a type-conversion wrapper around `getName()`
2289 * @return {!Uint8Array}
2290 */
2291proto.protocol.AssetIssueContract.prototype.getName_asU8 = function() {
2292 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2293 this.getName()));
2294};
2295
2296
2297/** @param {!(string|Uint8Array)} value */
2298proto.protocol.AssetIssueContract.prototype.setName = function(value) {
2299 jspb.Message.setProto3BytesField(this, 2, value);
2300};
2301
2302
2303/**
2304 * optional int64 total_supply = 4;
2305 * @return {number}
2306 */
2307proto.protocol.AssetIssueContract.prototype.getTotalSupply = function() {
2308 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
2309};
2310
2311
2312/** @param {number} value */
2313proto.protocol.AssetIssueContract.prototype.setTotalSupply = function(value) {
2314 jspb.Message.setProto3IntField(this, 4, value);
2315};
2316
2317
2318/**
2319 * optional int32 trx_num = 6;
2320 * @return {number}
2321 */
2322proto.protocol.AssetIssueContract.prototype.getTrxNum = function() {
2323 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
2324};
2325
2326
2327/** @param {number} value */
2328proto.protocol.AssetIssueContract.prototype.setTrxNum = function(value) {
2329 jspb.Message.setProto3IntField(this, 6, value);
2330};
2331
2332
2333/**
2334 * optional int32 num = 8;
2335 * @return {number}
2336 */
2337proto.protocol.AssetIssueContract.prototype.getNum = function() {
2338 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
2339};
2340
2341
2342/** @param {number} value */
2343proto.protocol.AssetIssueContract.prototype.setNum = function(value) {
2344 jspb.Message.setProto3IntField(this, 8, value);
2345};
2346
2347
2348/**
2349 * optional int64 start_time = 9;
2350 * @return {number}
2351 */
2352proto.protocol.AssetIssueContract.prototype.getStartTime = function() {
2353 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
2354};
2355
2356
2357/** @param {number} value */
2358proto.protocol.AssetIssueContract.prototype.setStartTime = function(value) {
2359 jspb.Message.setProto3IntField(this, 9, value);
2360};
2361
2362
2363/**
2364 * optional int64 end_time = 10;
2365 * @return {number}
2366 */
2367proto.protocol.AssetIssueContract.prototype.getEndTime = function() {
2368 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
2369};
2370
2371
2372/** @param {number} value */
2373proto.protocol.AssetIssueContract.prototype.setEndTime = function(value) {
2374 jspb.Message.setProto3IntField(this, 10, value);
2375};
2376
2377
2378/**
2379 * optional int32 decay_ratio = 15;
2380 * @return {number}
2381 */
2382proto.protocol.AssetIssueContract.prototype.getDecayRatio = function() {
2383 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0));
2384};
2385
2386
2387/** @param {number} value */
2388proto.protocol.AssetIssueContract.prototype.setDecayRatio = function(value) {
2389 jspb.Message.setProto3IntField(this, 15, value);
2390};
2391
2392
2393/**
2394 * optional int32 vote_score = 16;
2395 * @return {number}
2396 */
2397proto.protocol.AssetIssueContract.prototype.getVoteScore = function() {
2398 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
2399};
2400
2401
2402/** @param {number} value */
2403proto.protocol.AssetIssueContract.prototype.setVoteScore = function(value) {
2404 jspb.Message.setProto3IntField(this, 16, value);
2405};
2406
2407
2408/**
2409 * optional bytes description = 20;
2410 * @return {!(string|Uint8Array)}
2411 */
2412proto.protocol.AssetIssueContract.prototype.getDescription = function() {
2413 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 20, ""));
2414};
2415
2416
2417/**
2418 * optional bytes description = 20;
2419 * This is a type-conversion wrapper around `getDescription()`
2420 * @return {string}
2421 */
2422proto.protocol.AssetIssueContract.prototype.getDescription_asB64 = function() {
2423 return /** @type {string} */ (jspb.Message.bytesAsB64(
2424 this.getDescription()));
2425};
2426
2427
2428/**
2429 * optional bytes description = 20;
2430 * Note that Uint8Array is not supported on all browsers.
2431 * @see http://caniuse.com/Uint8Array
2432 * This is a type-conversion wrapper around `getDescription()`
2433 * @return {!Uint8Array}
2434 */
2435proto.protocol.AssetIssueContract.prototype.getDescription_asU8 = function() {
2436 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2437 this.getDescription()));
2438};
2439
2440
2441/** @param {!(string|Uint8Array)} value */
2442proto.protocol.AssetIssueContract.prototype.setDescription = function(value) {
2443 jspb.Message.setProto3BytesField(this, 20, value);
2444};
2445
2446
2447/**
2448 * optional bytes url = 21;
2449 * @return {!(string|Uint8Array)}
2450 */
2451proto.protocol.AssetIssueContract.prototype.getUrl = function() {
2452 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 21, ""));
2453};
2454
2455
2456/**
2457 * optional bytes url = 21;
2458 * This is a type-conversion wrapper around `getUrl()`
2459 * @return {string}
2460 */
2461proto.protocol.AssetIssueContract.prototype.getUrl_asB64 = function() {
2462 return /** @type {string} */ (jspb.Message.bytesAsB64(
2463 this.getUrl()));
2464};
2465
2466
2467/**
2468 * optional bytes url = 21;
2469 * Note that Uint8Array is not supported on all browsers.
2470 * @see http://caniuse.com/Uint8Array
2471 * This is a type-conversion wrapper around `getUrl()`
2472 * @return {!Uint8Array}
2473 */
2474proto.protocol.AssetIssueContract.prototype.getUrl_asU8 = function() {
2475 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2476 this.getUrl()));
2477};
2478
2479
2480/** @param {!(string|Uint8Array)} value */
2481proto.protocol.AssetIssueContract.prototype.setUrl = function(value) {
2482 jspb.Message.setProto3BytesField(this, 21, value);
2483};
2484
2485
2486
2487/**
2488 * Generated by JsPbCodeGenerator.
2489 * @param {Array=} opt_data Optional initial data array, typically from a
2490 * server response, or constructed directly in Javascript. The array is used
2491 * in place and becomes part of the constructed object. It is not cloned.
2492 * If no data is provided, the constructed object will be empty, but still
2493 * valid.
2494 * @extends {jspb.Message}
2495 * @constructor
2496 */
2497proto.protocol.ParticipateAssetIssueContract = function(opt_data) {
2498 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
2499};
2500goog.inherits(proto.protocol.ParticipateAssetIssueContract, jspb.Message);
2501if (goog.DEBUG && !COMPILED) {
2502 proto.protocol.ParticipateAssetIssueContract.displayName = 'proto.protocol.ParticipateAssetIssueContract';
2503}
2504
2505
2506if (jspb.Message.GENERATE_TO_OBJECT) {
2507/**
2508 * Creates an object representation of this proto suitable for use in Soy templates.
2509 * Field names that are reserved in JavaScript and will be renamed to pb_name.
2510 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2511 * For the list of reserved names please see:
2512 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
2513 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
2514 * for transitional soy proto support: http://goto/soy-param-migration
2515 * @return {!Object}
2516 */
2517proto.protocol.ParticipateAssetIssueContract.prototype.toObject = function(opt_includeInstance) {
2518 return proto.protocol.ParticipateAssetIssueContract.toObject(opt_includeInstance, this);
2519};
2520
2521
2522/**
2523 * Static version of the {@see toObject} method.
2524 * @param {boolean|undefined} includeInstance Whether to include the JSPB
2525 * instance for transitional soy proto support:
2526 * http://goto/soy-param-migration
2527 * @param {!proto.protocol.ParticipateAssetIssueContract} msg The msg instance to transform.
2528 * @return {!Object}
2529 * @suppress {unusedLocalVariables} f is only used for nested messages
2530 */
2531proto.protocol.ParticipateAssetIssueContract.toObject = function(includeInstance, msg) {
2532 var f, obj = {
2533 ownerAddress: msg.getOwnerAddress_asB64(),
2534 toAddress: msg.getToAddress_asB64(),
2535 assetName: msg.getAssetName_asB64(),
2536 amount: jspb.Message.getFieldWithDefault(msg, 4, 0)
2537 };
2538
2539 if (includeInstance) {
2540 obj.$jspbMessageInstance = msg;
2541 }
2542 return obj;
2543};
2544}
2545
2546
2547/**
2548 * Deserializes binary data (in protobuf wire format).
2549 * @param {jspb.ByteSource} bytes The bytes to deserialize.
2550 * @return {!proto.protocol.ParticipateAssetIssueContract}
2551 */
2552proto.protocol.ParticipateAssetIssueContract.deserializeBinary = function(bytes) {
2553 var reader = new jspb.BinaryReader(bytes);
2554 var msg = new proto.protocol.ParticipateAssetIssueContract;
2555 return proto.protocol.ParticipateAssetIssueContract.deserializeBinaryFromReader(msg, reader);
2556};
2557
2558
2559/**
2560 * Deserializes binary data (in protobuf wire format) from the
2561 * given reader into the given message object.
2562 * @param {!proto.protocol.ParticipateAssetIssueContract} msg The message object to deserialize into.
2563 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2564 * @return {!proto.protocol.ParticipateAssetIssueContract}
2565 */
2566proto.protocol.ParticipateAssetIssueContract.deserializeBinaryFromReader = function(msg, reader) {
2567 while (reader.nextField()) {
2568 if (reader.isEndGroup()) {
2569 break;
2570 }
2571 var field = reader.getFieldNumber();
2572 switch (field) {
2573 case 1:
2574 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2575 msg.setOwnerAddress(value);
2576 break;
2577 case 2:
2578 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2579 msg.setToAddress(value);
2580 break;
2581 case 3:
2582 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2583 msg.setAssetName(value);
2584 break;
2585 case 4:
2586 var value = /** @type {number} */ (reader.readInt64());
2587 msg.setAmount(value);
2588 break;
2589 default:
2590 reader.skipField();
2591 break;
2592 }
2593 }
2594 return msg;
2595};
2596
2597
2598/**
2599 * Serializes the message to binary data (in protobuf wire format).
2600 * @return {!Uint8Array}
2601 */
2602proto.protocol.ParticipateAssetIssueContract.prototype.serializeBinary = function() {
2603 var writer = new jspb.BinaryWriter();
2604 proto.protocol.ParticipateAssetIssueContract.serializeBinaryToWriter(this, writer);
2605 return writer.getResultBuffer();
2606};
2607
2608
2609/**
2610 * Serializes the given message to binary data (in protobuf wire
2611 * format), writing to the given BinaryWriter.
2612 * @param {!proto.protocol.ParticipateAssetIssueContract} message
2613 * @param {!jspb.BinaryWriter} writer
2614 * @suppress {unusedLocalVariables} f is only used for nested messages
2615 */
2616proto.protocol.ParticipateAssetIssueContract.serializeBinaryToWriter = function(message, writer) {
2617 var f = undefined;
2618 f = message.getOwnerAddress_asU8();
2619 if (f.length > 0) {
2620 writer.writeBytes(
2621 1,
2622 f
2623 );
2624 }
2625 f = message.getToAddress_asU8();
2626 if (f.length > 0) {
2627 writer.writeBytes(
2628 2,
2629 f
2630 );
2631 }
2632 f = message.getAssetName_asU8();
2633 if (f.length > 0) {
2634 writer.writeBytes(
2635 3,
2636 f
2637 );
2638 }
2639 f = message.getAmount();
2640 if (f !== 0) {
2641 writer.writeInt64(
2642 4,
2643 f
2644 );
2645 }
2646};
2647
2648
2649/**
2650 * optional bytes owner_address = 1;
2651 * @return {!(string|Uint8Array)}
2652 */
2653proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress = function() {
2654 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2655};
2656
2657
2658/**
2659 * optional bytes owner_address = 1;
2660 * This is a type-conversion wrapper around `getOwnerAddress()`
2661 * @return {string}
2662 */
2663proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64 = function() {
2664 return /** @type {string} */ (jspb.Message.bytesAsB64(
2665 this.getOwnerAddress()));
2666};
2667
2668
2669/**
2670 * optional bytes owner_address = 1;
2671 * Note that Uint8Array is not supported on all browsers.
2672 * @see http://caniuse.com/Uint8Array
2673 * This is a type-conversion wrapper around `getOwnerAddress()`
2674 * @return {!Uint8Array}
2675 */
2676proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8 = function() {
2677 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2678 this.getOwnerAddress()));
2679};
2680
2681
2682/** @param {!(string|Uint8Array)} value */
2683proto.protocol.ParticipateAssetIssueContract.prototype.setOwnerAddress = function(value) {
2684 jspb.Message.setProto3BytesField(this, 1, value);
2685};
2686
2687
2688/**
2689 * optional bytes to_address = 2;
2690 * @return {!(string|Uint8Array)}
2691 */
2692proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress = function() {
2693 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2694};
2695
2696
2697/**
2698 * optional bytes to_address = 2;
2699 * This is a type-conversion wrapper around `getToAddress()`
2700 * @return {string}
2701 */
2702proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress_asB64 = function() {
2703 return /** @type {string} */ (jspb.Message.bytesAsB64(
2704 this.getToAddress()));
2705};
2706
2707
2708/**
2709 * optional bytes to_address = 2;
2710 * Note that Uint8Array is not supported on all browsers.
2711 * @see http://caniuse.com/Uint8Array
2712 * This is a type-conversion wrapper around `getToAddress()`
2713 * @return {!Uint8Array}
2714 */
2715proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress_asU8 = function() {
2716 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2717 this.getToAddress()));
2718};
2719
2720
2721/** @param {!(string|Uint8Array)} value */
2722proto.protocol.ParticipateAssetIssueContract.prototype.setToAddress = function(value) {
2723 jspb.Message.setProto3BytesField(this, 2, value);
2724};
2725
2726
2727/**
2728 * optional bytes asset_name = 3;
2729 * @return {!(string|Uint8Array)}
2730 */
2731proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName = function() {
2732 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2733};
2734
2735
2736/**
2737 * optional bytes asset_name = 3;
2738 * This is a type-conversion wrapper around `getAssetName()`
2739 * @return {string}
2740 */
2741proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asB64 = function() {
2742 return /** @type {string} */ (jspb.Message.bytesAsB64(
2743 this.getAssetName()));
2744};
2745
2746
2747/**
2748 * optional bytes asset_name = 3;
2749 * Note that Uint8Array is not supported on all browsers.
2750 * @see http://caniuse.com/Uint8Array
2751 * This is a type-conversion wrapper around `getAssetName()`
2752 * @return {!Uint8Array}
2753 */
2754proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asU8 = function() {
2755 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2756 this.getAssetName()));
2757};
2758
2759
2760/** @param {!(string|Uint8Array)} value */
2761proto.protocol.ParticipateAssetIssueContract.prototype.setAssetName = function(value) {
2762 jspb.Message.setProto3BytesField(this, 3, value);
2763};
2764
2765
2766/**
2767 * optional int64 amount = 4;
2768 * @return {number}
2769 */
2770proto.protocol.ParticipateAssetIssueContract.prototype.getAmount = function() {
2771 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
2772};
2773
2774
2775/** @param {number} value */
2776proto.protocol.ParticipateAssetIssueContract.prototype.setAmount = function(value) {
2777 jspb.Message.setProto3IntField(this, 4, value);
2778};
2779
2780
2781
2782/**
2783 * Generated by JsPbCodeGenerator.
2784 * @param {Array=} opt_data Optional initial data array, typically from a
2785 * server response, or constructed directly in Javascript. The array is used
2786 * in place and becomes part of the constructed object. It is not cloned.
2787 * If no data is provided, the constructed object will be empty, but still
2788 * valid.
2789 * @extends {jspb.Message}
2790 * @constructor
2791 */
2792proto.protocol.DeployContract = function(opt_data) {
2793 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
2794};
2795goog.inherits(proto.protocol.DeployContract, jspb.Message);
2796if (goog.DEBUG && !COMPILED) {
2797 proto.protocol.DeployContract.displayName = 'proto.protocol.DeployContract';
2798}
2799
2800
2801if (jspb.Message.GENERATE_TO_OBJECT) {
2802/**
2803 * Creates an object representation of this proto suitable for use in Soy templates.
2804 * Field names that are reserved in JavaScript and will be renamed to pb_name.
2805 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2806 * For the list of reserved names please see:
2807 * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
2808 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
2809 * for transitional soy proto support: http://goto/soy-param-migration
2810 * @return {!Object}
2811 */
2812proto.protocol.DeployContract.prototype.toObject = function(opt_includeInstance) {
2813 return proto.protocol.DeployContract.toObject(opt_includeInstance, this);
2814};
2815
2816
2817/**
2818 * Static version of the {@see toObject} method.
2819 * @param {boolean|undefined} includeInstance Whether to include the JSPB
2820 * instance for transitional soy proto support:
2821 * http://goto/soy-param-migration
2822 * @param {!proto.protocol.DeployContract} msg The msg instance to transform.
2823 * @return {!Object}
2824 * @suppress {unusedLocalVariables} f is only used for nested messages
2825 */
2826proto.protocol.DeployContract.toObject = function(includeInstance, msg) {
2827 var f, obj = {
2828 ownerAddress: msg.getOwnerAddress_asB64(),
2829 script: msg.getScript_asB64()
2830 };
2831
2832 if (includeInstance) {
2833 obj.$jspbMessageInstance = msg;
2834 }
2835 return obj;
2836};
2837}
2838
2839
2840/**
2841 * Deserializes binary data (in protobuf wire format).
2842 * @param {jspb.ByteSource} bytes The bytes to deserialize.
2843 * @return {!proto.protocol.DeployContract}
2844 */
2845proto.protocol.DeployContract.deserializeBinary = function(bytes) {
2846 var reader = new jspb.BinaryReader(bytes);
2847 var msg = new proto.protocol.DeployContract;
2848 return proto.protocol.DeployContract.deserializeBinaryFromReader(msg, reader);
2849};
2850
2851
2852/**
2853 * Deserializes binary data (in protobuf wire format) from the
2854 * given reader into the given message object.
2855 * @param {!proto.protocol.DeployContract} msg The message object to deserialize into.
2856 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2857 * @return {!proto.protocol.DeployContract}
2858 */
2859proto.protocol.DeployContract.deserializeBinaryFromReader = function(msg, reader) {
2860 while (reader.nextField()) {
2861 if (reader.isEndGroup()) {
2862 break;
2863 }
2864 var field = reader.getFieldNumber();
2865 switch (field) {
2866 case 1:
2867 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2868 msg.setOwnerAddress(value);
2869 break;
2870 case 2:
2871 var value = /** @type {!Uint8Array} */ (reader.readBytes());
2872 msg.setScript(value);
2873 break;
2874 default:
2875 reader.skipField();
2876 break;
2877 }
2878 }
2879 return msg;
2880};
2881
2882
2883/**
2884 * Serializes the message to binary data (in protobuf wire format).
2885 * @return {!Uint8Array}
2886 */
2887proto.protocol.DeployContract.prototype.serializeBinary = function() {
2888 var writer = new jspb.BinaryWriter();
2889 proto.protocol.DeployContract.serializeBinaryToWriter(this, writer);
2890 return writer.getResultBuffer();
2891};
2892
2893
2894/**
2895 * Serializes the given message to binary data (in protobuf wire
2896 * format), writing to the given BinaryWriter.
2897 * @param {!proto.protocol.DeployContract} message
2898 * @param {!jspb.BinaryWriter} writer
2899 * @suppress {unusedLocalVariables} f is only used for nested messages
2900 */
2901proto.protocol.DeployContract.serializeBinaryToWriter = function(message, writer) {
2902 var f = undefined;
2903 f = message.getOwnerAddress_asU8();
2904 if (f.length > 0) {
2905 writer.writeBytes(
2906 1,
2907 f
2908 );
2909 }
2910 f = message.getScript_asU8();
2911 if (f.length > 0) {
2912 writer.writeBytes(
2913 2,
2914 f
2915 );
2916 }
2917};
2918
2919
2920/**
2921 * optional bytes owner_address = 1;
2922 * @return {!(string|Uint8Array)}
2923 */
2924proto.protocol.DeployContract.prototype.getOwnerAddress = function() {
2925 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2926};
2927
2928
2929/**
2930 * optional bytes owner_address = 1;
2931 * This is a type-conversion wrapper around `getOwnerAddress()`
2932 * @return {string}
2933 */
2934proto.protocol.DeployContract.prototype.getOwnerAddress_asB64 = function() {
2935 return /** @type {string} */ (jspb.Message.bytesAsB64(
2936 this.getOwnerAddress()));
2937};
2938
2939
2940/**
2941 * optional bytes owner_address = 1;
2942 * Note that Uint8Array is not supported on all browsers.
2943 * @see http://caniuse.com/Uint8Array
2944 * This is a type-conversion wrapper around `getOwnerAddress()`
2945 * @return {!Uint8Array}
2946 */
2947proto.protocol.DeployContract.prototype.getOwnerAddress_asU8 = function() {
2948 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2949 this.getOwnerAddress()));
2950};
2951
2952
2953/** @param {!(string|Uint8Array)} value */
2954proto.protocol.DeployContract.prototype.setOwnerAddress = function(value) {
2955 jspb.Message.setProto3BytesField(this, 1, value);
2956};
2957
2958
2959/**
2960 * optional bytes script = 2;
2961 * @return {!(string|Uint8Array)}
2962 */
2963proto.protocol.DeployContract.prototype.getScript = function() {
2964 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2965};
2966
2967
2968/**
2969 * optional bytes script = 2;
2970 * This is a type-conversion wrapper around `getScript()`
2971 * @return {string}
2972 */
2973proto.protocol.DeployContract.prototype.getScript_asB64 = function() {
2974 return /** @type {string} */ (jspb.Message.bytesAsB64(
2975 this.getScript()));
2976};
2977
2978
2979/**
2980 * optional bytes script = 2;
2981 * Note that Uint8Array is not supported on all browsers.
2982 * @see http://caniuse.com/Uint8Array
2983 * This is a type-conversion wrapper around `getScript()`
2984 * @return {!Uint8Array}
2985 */
2986proto.protocol.DeployContract.prototype.getScript_asU8 = function() {
2987 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2988 this.getScript()));
2989};
2990
2991
2992/** @param {!(string|Uint8Array)} value */
2993proto.protocol.DeployContract.prototype.setScript = function(value) {
2994 jspb.Message.setProto3BytesField(this, 2, value);
2995};
2996
2997
2998goog.object.extend(exports, proto.protocol);