UNPKG

tronweb

Version:

JavaScript SDK that encapsulates the TRON HTTP API

1,373 lines (1,296 loc) 138 kB
// source: core/contract/balance_contract.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @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! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = (typeof globalThis !== 'undefined' && globalThis) || (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || (typeof self !== 'undefined' && self) || function () { return this; }.call(null) || Function('return this')(); var core_contract_common_pb = require('../../core/contract/common_pb.cjs'); goog.object.extend(proto, core_contract_common_pb); goog.exportSymbol('TronWebProto.AccountBalanceRequest', null, global); goog.exportSymbol('TronWebProto.AccountBalanceResponse', null, global); goog.exportSymbol('TronWebProto.AccountIdentifier', null, global); goog.exportSymbol('TronWebProto.AccountTrace', null, global); goog.exportSymbol('TronWebProto.BlockBalanceTrace', null, global); goog.exportSymbol('TronWebProto.BlockBalanceTrace.BlockIdentifier', null, global); goog.exportSymbol('TronWebProto.CancelAllUnfreezeV2Contract', null, global); goog.exportSymbol('TronWebProto.DelegateResourceContract', null, global); goog.exportSymbol('TronWebProto.FreezeBalanceContract', null, global); goog.exportSymbol('TronWebProto.FreezeBalanceV2Contract', null, global); goog.exportSymbol('TronWebProto.TransactionBalanceTrace', null, global); goog.exportSymbol('TronWebProto.TransactionBalanceTrace.Operation', null, global); goog.exportSymbol('TronWebProto.TransferContract', null, global); goog.exportSymbol('TronWebProto.UnDelegateResourceContract', null, global); goog.exportSymbol('TronWebProto.UnfreezeBalanceContract', null, global); goog.exportSymbol('TronWebProto.UnfreezeBalanceV2Contract', null, global); goog.exportSymbol('TronWebProto.WithdrawBalanceContract', null, global); goog.exportSymbol('TronWebProto.WithdrawExpireUnfreezeContract', 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 */ TronWebProto.FreezeBalanceContract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.FreezeBalanceContract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.FreezeBalanceContract.displayName = 'TronWebProto.FreezeBalanceContract'; } /** * 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 */ TronWebProto.UnfreezeBalanceContract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.UnfreezeBalanceContract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.UnfreezeBalanceContract.displayName = 'TronWebProto.UnfreezeBalanceContract'; } /** * 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 */ TronWebProto.WithdrawBalanceContract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.WithdrawBalanceContract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.WithdrawBalanceContract.displayName = 'TronWebProto.WithdrawBalanceContract'; } /** * 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 */ TronWebProto.TransferContract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.TransferContract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.TransferContract.displayName = 'TronWebProto.TransferContract'; } /** * 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 */ TronWebProto.TransactionBalanceTrace = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, TronWebProto.TransactionBalanceTrace.repeatedFields_, null); }; goog.inherits(TronWebProto.TransactionBalanceTrace, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.TransactionBalanceTrace.displayName = 'TronWebProto.TransactionBalanceTrace'; } /** * 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 */ TronWebProto.TransactionBalanceTrace.Operation = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.TransactionBalanceTrace.Operation, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.TransactionBalanceTrace.Operation.displayName = 'TronWebProto.TransactionBalanceTrace.Operation'; } /** * 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 */ TronWebProto.BlockBalanceTrace = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, TronWebProto.BlockBalanceTrace.repeatedFields_, null); }; goog.inherits(TronWebProto.BlockBalanceTrace, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.BlockBalanceTrace.displayName = 'TronWebProto.BlockBalanceTrace'; } /** * 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 */ TronWebProto.BlockBalanceTrace.BlockIdentifier = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.BlockBalanceTrace.BlockIdentifier, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.BlockBalanceTrace.BlockIdentifier.displayName = 'TronWebProto.BlockBalanceTrace.BlockIdentifier'; } /** * 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 */ TronWebProto.AccountTrace = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.AccountTrace, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.AccountTrace.displayName = 'TronWebProto.AccountTrace'; } /** * 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 */ TronWebProto.AccountIdentifier = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.AccountIdentifier, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.AccountIdentifier.displayName = 'TronWebProto.AccountIdentifier'; } /** * 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 */ TronWebProto.AccountBalanceRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.AccountBalanceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.AccountBalanceRequest.displayName = 'TronWebProto.AccountBalanceRequest'; } /** * 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 */ TronWebProto.AccountBalanceResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.AccountBalanceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.AccountBalanceResponse.displayName = 'TronWebProto.AccountBalanceResponse'; } /** * 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 */ TronWebProto.FreezeBalanceV2Contract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.FreezeBalanceV2Contract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.FreezeBalanceV2Contract.displayName = 'TronWebProto.FreezeBalanceV2Contract'; } /** * 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 */ TronWebProto.UnfreezeBalanceV2Contract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.UnfreezeBalanceV2Contract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.UnfreezeBalanceV2Contract.displayName = 'TronWebProto.UnfreezeBalanceV2Contract'; } /** * 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 */ TronWebProto.WithdrawExpireUnfreezeContract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.WithdrawExpireUnfreezeContract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.WithdrawExpireUnfreezeContract.displayName = 'TronWebProto.WithdrawExpireUnfreezeContract'; } /** * 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 */ TronWebProto.DelegateResourceContract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.DelegateResourceContract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.DelegateResourceContract.displayName = 'TronWebProto.DelegateResourceContract'; } /** * 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 */ TronWebProto.UnDelegateResourceContract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.UnDelegateResourceContract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.UnDelegateResourceContract.displayName = 'TronWebProto.UnDelegateResourceContract'; } /** * 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 */ TronWebProto.CancelAllUnfreezeV2Contract = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(TronWebProto.CancelAllUnfreezeV2Contract, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ TronWebProto.CancelAllUnfreezeV2Contract.displayName = 'TronWebProto.CancelAllUnfreezeV2Contract'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ TronWebProto.FreezeBalanceContract.prototype.toObject = function (opt_includeInstance) { return TronWebProto.FreezeBalanceContract.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!TronWebProto.FreezeBalanceContract} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.FreezeBalanceContract.toObject = function (includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), frozenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), frozenDuration: jspb.Message.getFieldWithDefault(msg, 3, 0), resource: jspb.Message.getFieldWithDefault(msg, 10, 0), receiverAddress: msg.getReceiverAddress_asB64(), }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!TronWebProto.FreezeBalanceContract} */ TronWebProto.FreezeBalanceContract.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new TronWebProto.FreezeBalanceContract(); return TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!TronWebProto.FreezeBalanceContract} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!TronWebProto.FreezeBalanceContract} */ TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOwnerAddress(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setFrozenBalance(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setFrozenDuration(value); break; case 10: var value = /** @type {!TronWebProto.ResourceCode} */ (reader.readEnum()); msg.setResource(value); break; case 15: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setReceiverAddress(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ TronWebProto.FreezeBalanceContract.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); TronWebProto.FreezeBalanceContract.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!TronWebProto.FreezeBalanceContract} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.FreezeBalanceContract.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getOwnerAddress_asU8(); if (f.length > 0) { writer.writeBytes(1, f); } f = message.getFrozenBalance(); if (f !== 0) { writer.writeInt64(2, f); } f = message.getFrozenDuration(); if (f !== 0) { writer.writeInt64(3, f); } f = message.getResource(); if (f !== 0.0) { writer.writeEnum(10, f); } f = message.getReceiverAddress_asU8(); if (f.length > 0) { writer.writeBytes(15, f); } }; /** * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} */ TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress = function () { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, '')); }; /** * optional bytes owner_address = 1; * This is a type-conversion wrapper around `getOwnerAddress()` * @return {string} */ TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress())); }; /** * optional bytes owner_address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOwnerAddress()` * @return {!Uint8Array} */ TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress())); }; /** * @param {!(string|Uint8Array)} value * @return {!TronWebProto.FreezeBalanceContract} returns this */ TronWebProto.FreezeBalanceContract.prototype.setOwnerAddress = function (value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional int64 frozen_balance = 2; * @return {number} */ TronWebProto.FreezeBalanceContract.prototype.getFrozenBalance = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!TronWebProto.FreezeBalanceContract} returns this */ TronWebProto.FreezeBalanceContract.prototype.setFrozenBalance = function (value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int64 frozen_duration = 3; * @return {number} */ TronWebProto.FreezeBalanceContract.prototype.getFrozenDuration = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!TronWebProto.FreezeBalanceContract} returns this */ TronWebProto.FreezeBalanceContract.prototype.setFrozenDuration = function (value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional ResourceCode resource = 10; * @return {!TronWebProto.ResourceCode} */ TronWebProto.FreezeBalanceContract.prototype.getResource = function () { return /** @type {!TronWebProto.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** * @param {!TronWebProto.ResourceCode} value * @return {!TronWebProto.FreezeBalanceContract} returns this */ TronWebProto.FreezeBalanceContract.prototype.setResource = function (value) { return jspb.Message.setProto3EnumField(this, 10, value); }; /** * optional bytes receiver_address = 15; * @return {!(string|Uint8Array)} */ TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress = function () { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, '')); }; /** * optional bytes receiver_address = 15; * This is a type-conversion wrapper around `getReceiverAddress()` * @return {string} */ TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getReceiverAddress())); }; /** * optional bytes receiver_address = 15; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getReceiverAddress()` * @return {!Uint8Array} */ TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getReceiverAddress())); }; /** * @param {!(string|Uint8Array)} value * @return {!TronWebProto.FreezeBalanceContract} returns this */ TronWebProto.FreezeBalanceContract.prototype.setReceiverAddress = function (value) { return jspb.Message.setProto3BytesField(this, 15, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ TronWebProto.UnfreezeBalanceContract.prototype.toObject = function (opt_includeInstance) { return TronWebProto.UnfreezeBalanceContract.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!TronWebProto.UnfreezeBalanceContract} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.UnfreezeBalanceContract.toObject = function (includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), resource: jspb.Message.getFieldWithDefault(msg, 10, 0), receiverAddress: msg.getReceiverAddress_asB64(), }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!TronWebProto.UnfreezeBalanceContract} */ TronWebProto.UnfreezeBalanceContract.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new TronWebProto.UnfreezeBalanceContract(); return TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!TronWebProto.UnfreezeBalanceContract} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!TronWebProto.UnfreezeBalanceContract} */ TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOwnerAddress(value); break; case 10: var value = /** @type {!TronWebProto.ResourceCode} */ (reader.readEnum()); msg.setResource(value); break; case 15: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setReceiverAddress(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ TronWebProto.UnfreezeBalanceContract.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!TronWebProto.UnfreezeBalanceContract} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getOwnerAddress_asU8(); if (f.length > 0) { writer.writeBytes(1, f); } f = message.getResource(); if (f !== 0.0) { writer.writeEnum(10, f); } f = message.getReceiverAddress_asU8(); if (f.length > 0) { writer.writeBytes(15, f); } }; /** * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} */ TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress = function () { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, '')); }; /** * optional bytes owner_address = 1; * This is a type-conversion wrapper around `getOwnerAddress()` * @return {string} */ TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress())); }; /** * optional bytes owner_address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOwnerAddress()` * @return {!Uint8Array} */ TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress())); }; /** * @param {!(string|Uint8Array)} value * @return {!TronWebProto.UnfreezeBalanceContract} returns this */ TronWebProto.UnfreezeBalanceContract.prototype.setOwnerAddress = function (value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional ResourceCode resource = 10; * @return {!TronWebProto.ResourceCode} */ TronWebProto.UnfreezeBalanceContract.prototype.getResource = function () { return /** @type {!TronWebProto.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** * @param {!TronWebProto.ResourceCode} value * @return {!TronWebProto.UnfreezeBalanceContract} returns this */ TronWebProto.UnfreezeBalanceContract.prototype.setResource = function (value) { return jspb.Message.setProto3EnumField(this, 10, value); }; /** * optional bytes receiver_address = 15; * @return {!(string|Uint8Array)} */ TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress = function () { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, '')); }; /** * optional bytes receiver_address = 15; * This is a type-conversion wrapper around `getReceiverAddress()` * @return {string} */ TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getReceiverAddress())); }; /** * optional bytes receiver_address = 15; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getReceiverAddress()` * @return {!Uint8Array} */ TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getReceiverAddress())); }; /** * @param {!(string|Uint8Array)} value * @return {!TronWebProto.UnfreezeBalanceContract} returns this */ TronWebProto.UnfreezeBalanceContract.prototype.setReceiverAddress = function (value) { return jspb.Message.setProto3BytesField(this, 15, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ TronWebProto.WithdrawBalanceContract.prototype.toObject = function (opt_includeInstance) { return TronWebProto.WithdrawBalanceContract.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!TronWebProto.WithdrawBalanceContract} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.WithdrawBalanceContract.toObject = function (includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!TronWebProto.WithdrawBalanceContract} */ TronWebProto.WithdrawBalanceContract.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new TronWebProto.WithdrawBalanceContract(); return TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!TronWebProto.WithdrawBalanceContract} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!TronWebProto.WithdrawBalanceContract} */ TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOwnerAddress(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ TronWebProto.WithdrawBalanceContract.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!TronWebProto.WithdrawBalanceContract} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getOwnerAddress_asU8(); if (f.length > 0) { writer.writeBytes(1, f); } }; /** * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} */ TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress = function () { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, '')); }; /** * optional bytes owner_address = 1; * This is a type-conversion wrapper around `getOwnerAddress()` * @return {string} */ TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress())); }; /** * optional bytes owner_address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOwnerAddress()` * @return {!Uint8Array} */ TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress())); }; /** * @param {!(string|Uint8Array)} value * @return {!TronWebProto.WithdrawBalanceContract} returns this */ TronWebProto.WithdrawBalanceContract.prototype.setOwnerAddress = function (value) { return jspb.Message.setProto3BytesField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ TronWebProto.TransferContract.prototype.toObject = function (opt_includeInstance) { return TronWebProto.TransferContract.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!TronWebProto.TransferContract} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.TransferContract.toObject = function (includeInstance, msg) { var f, obj = { ownerAddress: msg.getOwnerAddress_asB64(), toAddress: msg.getToAddress_asB64(), amount: jspb.Message.getFieldWithDefault(msg, 3, 0), }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!TronWebProto.TransferContract} */ TronWebProto.TransferContract.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new TronWebProto.TransferContract(); return TronWebProto.TransferContract.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!TronWebProto.TransferContract} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!TronWebProto.TransferContract} */ TronWebProto.TransferContract.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOwnerAddress(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setToAddress(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setAmount(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ TronWebProto.TransferContract.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); TronWebProto.TransferContract.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!TronWebProto.TransferContract} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.TransferContract.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getOwnerAddress_asU8(); if (f.length > 0) { writer.writeBytes(1, f); } f = message.getToAddress_asU8(); if (f.length > 0) { writer.writeBytes(2, f); } f = message.getAmount(); if (f !== 0) { writer.writeInt64(3, f); } }; /** * optional bytes owner_address = 1; * @return {!(string|Uint8Array)} */ TronWebProto.TransferContract.prototype.getOwnerAddress = function () { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, '')); }; /** * optional bytes owner_address = 1; * This is a type-conversion wrapper around `getOwnerAddress()` * @return {string} */ TronWebProto.TransferContract.prototype.getOwnerAddress_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress())); }; /** * optional bytes owner_address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOwnerAddress()` * @return {!Uint8Array} */ TronWebProto.TransferContract.prototype.getOwnerAddress_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress())); }; /** * @param {!(string|Uint8Array)} value * @return {!TronWebProto.TransferContract} returns this */ TronWebProto.TransferContract.prototype.setOwnerAddress = function (value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional bytes to_address = 2; * @return {!(string|Uint8Array)} */ TronWebProto.TransferContract.prototype.getToAddress = function () { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, '')); }; /** * optional bytes to_address = 2; * This is a type-conversion wrapper around `getToAddress()` * @return {string} */ TronWebProto.TransferContract.prototype.getToAddress_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getToAddress())); }; /** * optional bytes to_address = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getToAddress()` * @return {!Uint8Array} */ TronWebProto.TransferContract.prototype.getToAddress_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getToAddress())); }; /** * @param {!(string|Uint8Array)} value * @return {!TronWebProto.TransferContract} returns this */ TronWebProto.TransferContract.prototype.setToAddress = function (value) { return jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional int64 amount = 3; * @return {number} */ TronWebProto.TransferContract.prototype.getAmount = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!TronWebProto.TransferContract} returns this */ TronWebProto.TransferContract.prototype.setAmount = function (value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ TronWebProto.TransactionBalanceTrace.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ TronWebProto.TransactionBalanceTrace.prototype.toObject = function (opt_includeInstance) { return TronWebProto.TransactionBalanceTrace.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!TronWebProto.TransactionBalanceTrace} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.TransactionBalanceTrace.toObject = function (includeInstance, msg) { var f, obj = { transactionIdentifier: msg.getTransactionIdentifier_asB64(), operationList: jspb.Message.toObjectList( msg.getOperationList(), TronWebProto.TransactionBalanceTrace.Operation.toObject, includeInstance ), type: jspb.Message.getFieldWithDefault(msg, 3, ''), status: jspb.Message.getFieldWithDefault(msg, 4, ''), }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!TronWebProto.TransactionBalanceTrace} */ TronWebProto.TransactionBalanceTrace.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new TronWebProto.TransactionBalanceTrace(); return TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!TronWebProto.TransactionBalanceTrace} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!TronWebProto.TransactionBalanceTrace} */ TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setTransactionIdentifier(value); break; case 2: var value = new TronWebProto.TransactionBalanceTrace.Operation(); reader.readMessage(value, TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader); msg.addOperation(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setType(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setStatus(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ TronWebProto.TransactionBalanceTrace.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!TronWebProto.TransactionBalanceTrace} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getTransactionIdentifier_asU8(); if (f.length > 0) { writer.writeBytes(1, f); } f = message.getOperationList(); if (f.length > 0) { writer.writeRepeatedMessage(2, f, TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter); } f = message.getType(); if (f.length > 0) { writer.writeString(3, f); } f = message.getStatus(); if (f.length > 0) { writer.writeString(4, f); } }; if (jspb.Message.GENERATE_TO_OBJECT)