UNPKG

@tronscan/client

Version:
1,561 lines (1,340 loc) 250 kB
/** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var core_Tron_pb = require('../core/Tron_pb.js'); var core_Contract_pb = require('../core/Contract_pb.js'); var google_api_annotations_pb = require('../google/api/annotations_pb.js'); goog.exportSymbol('proto.protocol.AccountNetMessage', null, global); goog.exportSymbol('proto.protocol.AccountPaginated', null, global); goog.exportSymbol('proto.protocol.AccountResourceMessage', null, global); goog.exportSymbol('proto.protocol.Address', null, global); goog.exportSymbol('proto.protocol.AddressPrKeyPairMessage', null, global); goog.exportSymbol('proto.protocol.AssetIssueList', null, global); goog.exportSymbol('proto.protocol.BlockExtention', null, global); goog.exportSymbol('proto.protocol.BlockLimit', null, global); goog.exportSymbol('proto.protocol.BlockList', null, global); goog.exportSymbol('proto.protocol.BlockListExtention', null, global); goog.exportSymbol('proto.protocol.BlockReference', null, global); goog.exportSymbol('proto.protocol.BytesMessage', null, global); goog.exportSymbol('proto.protocol.DelegatedResourceList', null, global); goog.exportSymbol('proto.protocol.DelegatedResourceMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferAssetByPrivateMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferAssetMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferByPrivateMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferMessage', null, global); goog.exportSymbol('proto.protocol.EasyTransferResponse', null, global); goog.exportSymbol('proto.protocol.EmptyMessage', null, global); goog.exportSymbol('proto.protocol.ExchangeList', null, global); goog.exportSymbol('proto.protocol.Node', null, global); goog.exportSymbol('proto.protocol.NodeList', null, global); goog.exportSymbol('proto.protocol.NumberMessage', null, global); goog.exportSymbol('proto.protocol.PaginatedMessage', null, global); goog.exportSymbol('proto.protocol.ProposalList', null, global); goog.exportSymbol('proto.protocol.Return', null, global); goog.exportSymbol('proto.protocol.Return.response_code', null, global); goog.exportSymbol('proto.protocol.TimeMessage', null, global); goog.exportSymbol('proto.protocol.TimePaginatedMessage', null, global); goog.exportSymbol('proto.protocol.TransactionApprovedList', null, global); goog.exportSymbol('proto.protocol.TransactionApprovedList.Result', null, global); goog.exportSymbol('proto.protocol.TransactionApprovedList.Result.response_code', null, global); goog.exportSymbol('proto.protocol.TransactionExtention', null, global); goog.exportSymbol('proto.protocol.TransactionLimit', null, global); goog.exportSymbol('proto.protocol.TransactionList', null, global); goog.exportSymbol('proto.protocol.TransactionListExtention', null, global); goog.exportSymbol('proto.protocol.TransactionSignWeight', null, global); goog.exportSymbol('proto.protocol.TransactionSignWeight.Result', null, global); goog.exportSymbol('proto.protocol.TransactionSignWeight.Result.response_code', null, global); goog.exportSymbol('proto.protocol.WitnessList', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.Return = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.Return, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.Return.displayName = 'proto.protocol.Return'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.Return.prototype.toObject = function(opt_includeInstance) { return proto.protocol.Return.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.Return} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.Return.toObject = function(includeInstance, msg) { var f, obj = { result: jspb.Message.getFieldWithDefault(msg, 1, false), code: jspb.Message.getFieldWithDefault(msg, 2, 0), message: msg.getMessage_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.Return} */ proto.protocol.Return.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.Return; return proto.protocol.Return.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.Return} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.Return} */ proto.protocol.Return.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); msg.setResult(value); break; case 2: var value = /** @type {!proto.protocol.Return.response_code} */ (reader.readEnum()); msg.setCode(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setMessage(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.Return.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.protocol.Return.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.protocol.Return} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.Return.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getResult(); if (f) { writer.writeBool( 1, f ); } f = message.getCode(); if (f !== 0.0) { writer.writeEnum( 2, f ); } f = message.getMessage_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } }; /** * @enum {number} */ proto.protocol.Return.response_code = { SUCCESS: 0, SIGERROR: 1, CONTRACT_VALIDATE_ERROR: 2, CONTRACT_EXE_ERROR: 3, BANDWITH_ERROR: 4, DUP_TRANSACTION_ERROR: 5, TAPOS_ERROR: 6, TOO_BIG_TRANSACTION_ERROR: 7, TRANSACTION_EXPIRATION_ERROR: 8, SERVER_BUSY: 9, NO_CONNECTION: 10, NOT_ENOUGH_EFFECTIVE_CONNECTION: 11, OTHER_ERROR: 20 }; /** * optional bool result = 1; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.protocol.Return.prototype.getResult = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; /** @param {boolean} value */ proto.protocol.Return.prototype.setResult = function(value) { jspb.Message.setProto3BooleanField(this, 1, value); }; /** * optional response_code code = 2; * @return {!proto.protocol.Return.response_code} */ proto.protocol.Return.prototype.getCode = function() { return /** @type {!proto.protocol.Return.response_code} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {!proto.protocol.Return.response_code} value */ proto.protocol.Return.prototype.setCode = function(value) { jspb.Message.setProto3EnumField(this, 2, value); }; /** * optional bytes message = 3; * @return {!(string|Uint8Array)} */ proto.protocol.Return.prototype.getMessage = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * optional bytes message = 3; * This is a type-conversion wrapper around `getMessage()` * @return {string} */ proto.protocol.Return.prototype.getMessage_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getMessage())); }; /** * optional bytes message = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getMessage()` * @return {!Uint8Array} */ proto.protocol.Return.prototype.getMessage_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getMessage())); }; /** @param {!(string|Uint8Array)} value */ proto.protocol.Return.prototype.setMessage = function(value) { jspb.Message.setProto3BytesField(this, 3, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.BlockReference = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.BlockReference, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.BlockReference.displayName = 'proto.protocol.BlockReference'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.BlockReference.prototype.toObject = function(opt_includeInstance) { return proto.protocol.BlockReference.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.BlockReference} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.BlockReference.toObject = function(includeInstance, msg) { var f, obj = { blockNum: jspb.Message.getFieldWithDefault(msg, 1, 0), blockHash: msg.getBlockHash_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.BlockReference} */ proto.protocol.BlockReference.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.BlockReference; return proto.protocol.BlockReference.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.BlockReference} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.BlockReference} */ proto.protocol.BlockReference.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setBlockNum(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setBlockHash(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.BlockReference.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.protocol.BlockReference.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.protocol.BlockReference} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.BlockReference.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBlockNum(); if (f !== 0) { writer.writeInt64( 1, f ); } f = message.getBlockHash_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * optional int64 block_num = 1; * @return {number} */ proto.protocol.BlockReference.prototype.getBlockNum = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.protocol.BlockReference.prototype.setBlockNum = function(value) { jspb.Message.setProto3IntField(this, 1, value); }; /** * optional bytes block_hash = 2; * @return {!(string|Uint8Array)} */ proto.protocol.BlockReference.prototype.getBlockHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes block_hash = 2; * This is a type-conversion wrapper around `getBlockHash()` * @return {string} */ proto.protocol.BlockReference.prototype.getBlockHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getBlockHash())); }; /** * optional bytes block_hash = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getBlockHash()` * @return {!Uint8Array} */ proto.protocol.BlockReference.prototype.getBlockHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getBlockHash())); }; /** @param {!(string|Uint8Array)} value */ proto.protocol.BlockReference.prototype.setBlockHash = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.WitnessList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.WitnessList.repeatedFields_, null); }; goog.inherits(proto.protocol.WitnessList, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.WitnessList.displayName = 'proto.protocol.WitnessList'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.WitnessList.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.WitnessList.prototype.toObject = function(opt_includeInstance) { return proto.protocol.WitnessList.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.WitnessList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.WitnessList.toObject = function(includeInstance, msg) { var f, obj = { witnessesList: jspb.Message.toObjectList(msg.getWitnessesList(), core_Tron_pb.Witness.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.WitnessList} */ proto.protocol.WitnessList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.WitnessList; return proto.protocol.WitnessList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.WitnessList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.WitnessList} */ proto.protocol.WitnessList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new core_Tron_pb.Witness; reader.readMessage(value,core_Tron_pb.Witness.deserializeBinaryFromReader); msg.addWitnesses(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.WitnessList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.protocol.WitnessList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.protocol.WitnessList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.WitnessList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getWitnessesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, core_Tron_pb.Witness.serializeBinaryToWriter ); } }; /** * repeated Witness witnesses = 1; * @return {!Array.<!proto.protocol.Witness>} */ proto.protocol.WitnessList.prototype.getWitnessesList = function() { return /** @type{!Array.<!proto.protocol.Witness>} */ ( jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Witness, 1)); }; /** @param {!Array.<!proto.protocol.Witness>} value */ proto.protocol.WitnessList.prototype.setWitnessesList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.protocol.Witness=} opt_value * @param {number=} opt_index * @return {!proto.protocol.Witness} */ proto.protocol.WitnessList.prototype.addWitnesses = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Witness, opt_index); }; proto.protocol.WitnessList.prototype.clearWitnessesList = function() { this.setWitnessesList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.ProposalList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ProposalList.repeatedFields_, null); }; goog.inherits(proto.protocol.ProposalList, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.ProposalList.displayName = 'proto.protocol.ProposalList'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.ProposalList.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.ProposalList.prototype.toObject = function(opt_includeInstance) { return proto.protocol.ProposalList.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.ProposalList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.ProposalList.toObject = function(includeInstance, msg) { var f, obj = { proposalsList: jspb.Message.toObjectList(msg.getProposalsList(), core_Tron_pb.Proposal.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.ProposalList} */ proto.protocol.ProposalList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.ProposalList; return proto.protocol.ProposalList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.ProposalList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.ProposalList} */ proto.protocol.ProposalList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new core_Tron_pb.Proposal; reader.readMessage(value,core_Tron_pb.Proposal.deserializeBinaryFromReader); msg.addProposals(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.ProposalList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.protocol.ProposalList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.protocol.ProposalList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.ProposalList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getProposalsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, core_Tron_pb.Proposal.serializeBinaryToWriter ); } }; /** * repeated Proposal proposals = 1; * @return {!Array.<!proto.protocol.Proposal>} */ proto.protocol.ProposalList.prototype.getProposalsList = function() { return /** @type{!Array.<!proto.protocol.Proposal>} */ ( jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Proposal, 1)); }; /** @param {!Array.<!proto.protocol.Proposal>} value */ proto.protocol.ProposalList.prototype.setProposalsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.protocol.Proposal=} opt_value * @param {number=} opt_index * @return {!proto.protocol.Proposal} */ proto.protocol.ProposalList.prototype.addProposals = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Proposal, opt_index); }; proto.protocol.ProposalList.prototype.clearProposalsList = function() { this.setProposalsList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.ExchangeList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ExchangeList.repeatedFields_, null); }; goog.inherits(proto.protocol.ExchangeList, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.ExchangeList.displayName = 'proto.protocol.ExchangeList'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.ExchangeList.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.ExchangeList.prototype.toObject = function(opt_includeInstance) { return proto.protocol.ExchangeList.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.ExchangeList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.ExchangeList.toObject = function(includeInstance, msg) { var f, obj = { exchangesList: jspb.Message.toObjectList(msg.getExchangesList(), core_Tron_pb.Exchange.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.ExchangeList} */ proto.protocol.ExchangeList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.ExchangeList; return proto.protocol.ExchangeList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.ExchangeList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.ExchangeList} */ proto.protocol.ExchangeList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new core_Tron_pb.Exchange; reader.readMessage(value,core_Tron_pb.Exchange.deserializeBinaryFromReader); msg.addExchanges(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.ExchangeList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.protocol.ExchangeList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.protocol.ExchangeList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.ExchangeList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExchangesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, core_Tron_pb.Exchange.serializeBinaryToWriter ); } }; /** * repeated Exchange exchanges = 1; * @return {!Array.<!proto.protocol.Exchange>} */ proto.protocol.ExchangeList.prototype.getExchangesList = function() { return /** @type{!Array.<!proto.protocol.Exchange>} */ ( jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Exchange, 1)); }; /** @param {!Array.<!proto.protocol.Exchange>} value */ proto.protocol.ExchangeList.prototype.setExchangesList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.protocol.Exchange=} opt_value * @param {number=} opt_index * @return {!proto.protocol.Exchange} */ proto.protocol.ExchangeList.prototype.addExchanges = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Exchange, opt_index); }; proto.protocol.ExchangeList.prototype.clearExchangesList = function() { this.setExchangesList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.AssetIssueList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AssetIssueList.repeatedFields_, null); }; goog.inherits(proto.protocol.AssetIssueList, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.AssetIssueList.displayName = 'proto.protocol.AssetIssueList'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.AssetIssueList.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.AssetIssueList.prototype.toObject = function(opt_includeInstance) { return proto.protocol.AssetIssueList.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.AssetIssueList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.AssetIssueList.toObject = function(includeInstance, msg) { var f, obj = { assetissueList: jspb.Message.toObjectList(msg.getAssetissueList(), core_Contract_pb.AssetIssueContract.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.AssetIssueList} */ proto.protocol.AssetIssueList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.AssetIssueList; return proto.protocol.AssetIssueList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.AssetIssueList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.AssetIssueList} */ proto.protocol.AssetIssueList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new core_Contract_pb.AssetIssueContract; reader.readMessage(value,core_Contract_pb.AssetIssueContract.deserializeBinaryFromReader); msg.addAssetissue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.AssetIssueList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.protocol.AssetIssueList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.protocol.AssetIssueList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.AssetIssueList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAssetissueList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, core_Contract_pb.AssetIssueContract.serializeBinaryToWriter ); } }; /** * repeated AssetIssueContract assetIssue = 1; * @return {!Array.<!proto.protocol.AssetIssueContract>} */ proto.protocol.AssetIssueList.prototype.getAssetissueList = function() { return /** @type{!Array.<!proto.protocol.AssetIssueContract>} */ ( jspb.Message.getRepeatedWrapperField(this, core_Contract_pb.AssetIssueContract, 1)); }; /** @param {!Array.<!proto.protocol.AssetIssueContract>} value */ proto.protocol.AssetIssueList.prototype.setAssetissueList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.protocol.AssetIssueContract=} opt_value * @param {number=} opt_index * @return {!proto.protocol.AssetIssueContract} */ proto.protocol.AssetIssueList.prototype.addAssetissue = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.AssetIssueContract, opt_index); }; proto.protocol.AssetIssueList.prototype.clearAssetissueList = function() { this.setAssetissueList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.BlockList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockList.repeatedFields_, null); }; goog.inherits(proto.protocol.BlockList, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.BlockList.displayName = 'proto.protocol.BlockList'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.BlockList.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.BlockList.prototype.toObject = function(opt_includeInstance) { return proto.protocol.BlockList.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.BlockList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.BlockList.toObject = function(includeInstance, msg) { var f, obj = { blockList: jspb.Message.toObjectList(msg.getBlockList(), core_Tron_pb.Block.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.BlockList} */ proto.protocol.BlockList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.BlockList; return proto.protocol.BlockList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.BlockList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.BlockList} */ proto.protocol.BlockList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new core_Tron_pb.Block; reader.readMessage(value,core_Tron_pb.Block.deserializeBinaryFromReader); msg.addBlock(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.BlockList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.protocol.BlockList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.protocol.BlockList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.BlockList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBlockList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, core_Tron_pb.Block.serializeBinaryToWriter ); } }; /** * repeated Block block = 1; * @return {!Array.<!proto.protocol.Block>} */ proto.protocol.BlockList.prototype.getBlockList = function() { return /** @type{!Array.<!proto.protocol.Block>} */ ( jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Block, 1)); }; /** @param {!Array.<!proto.protocol.Block>} value */ proto.protocol.BlockList.prototype.setBlockList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.protocol.Block=} opt_value * @param {number=} opt_index * @return {!proto.protocol.Block} */ proto.protocol.BlockList.prototype.addBlock = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Block, opt_index); }; proto.protocol.BlockList.prototype.clearBlockList = function() { this.setBlockList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.TransactionList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionList.repeatedFields_, null); }; goog.inherits(proto.protocol.TransactionList, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.TransactionList.displayName = 'proto.protocol.TransactionList'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.TransactionList.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.TransactionList.prototype.toObject = function(opt_includeInstance) { return proto.protocol.TransactionList.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.TransactionList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.TransactionList.toObject = function(includeInstance, msg) { var f, obj = { transactionList: jspb.Message.toObjectList(msg.getTransactionList(), core_Tron_pb.Transaction.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.TransactionList} */ proto.protocol.TransactionList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.TransactionList; return proto.protocol.TransactionList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.TransactionList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.TransactionList} */ proto.protocol.TransactionList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new core_Tron_pb.Transaction; reader.readMessage(value,core_Tron_pb.Transaction.deserializeBinaryFromReader); msg.addTransaction(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.TransactionList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.protocol.TransactionList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.protocol.TransactionList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.TransactionList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTransactionList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, core_Tron_pb.Transaction.serializeBinaryToWriter ); } }; /** * repeated Transaction transaction = 1; * @return {!Array.<!proto.protocol.Transaction>} */ proto.protocol.TransactionList.prototype.getTransactionList = function() { return /** @type{!Array.<!proto.protocol.Transaction>} */ ( jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Transaction, 1)); }; /** @param {!Array.<!proto.protocol.Transaction>} value */ proto.protocol.TransactionList.prototype.setTransactionList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.protocol.Transaction=} opt_value * @param {number=} opt_index * @return {!proto.protocol.Transaction} */ proto.protocol.TransactionList.prototype.addTransaction = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Transaction, opt_index); }; proto.protocol.TransactionList.prototype.clearTransactionList = function() { this.setTransactionList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.DelegatedResourceMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.DelegatedResourceMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.DelegatedResourceMessage.displayName = 'proto.protocol.DelegatedResourceMessage'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.DelegatedResourceMessage.prototype.toObject = function(opt_includeInstance) { return proto.protocol.DelegatedResourceMessage.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.DelegatedResourceMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.protocol.DelegatedResourceMessage.toObject = function(includeInstance, msg) { var f, obj = { fromaddress: msg.getFromaddress_asB64(), toaddress: msg.getToaddress_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @