UNPKG

@bandprotocol/bandchain.js

Version:

Library for interacting with BandChain in browser and Node.js environments

1,634 lines (1,538 loc) 113 kB
// source: cosmos/tx/v1beta1/tx.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 = Function('return this')() var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') goog.object.extend(proto, gogoproto_gogo_pb) var cosmos_crypto_multisig_v1beta1_multisig_pb = require('../../../cosmos/crypto/multisig/v1beta1/multisig_pb.js') goog.object.extend(proto, cosmos_crypto_multisig_v1beta1_multisig_pb) var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') goog.object.extend(proto, cosmos_base_v1beta1_coin_pb) var cosmos_tx_signing_v1beta1_signing_pb = require('../../../cosmos/tx/signing/v1beta1/signing_pb.js') goog.object.extend(proto, cosmos_tx_signing_v1beta1_signing_pb) var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') goog.object.extend(proto, google_protobuf_any_pb) var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') goog.object.extend(proto, cosmos_proto_cosmos_pb) goog.exportSymbol('proto.cosmos.tx.v1beta1.AuthInfo', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.AuxSignerData', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.Fee', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.Multi', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.Single', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.SumCase', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.SignDoc', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.SignDocDirectAux', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.SignerInfo', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.Tip', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.Tx', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.TxBody', null, global) goog.exportSymbol('proto.cosmos.tx.v1beta1.TxRaw', 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.cosmos.tx.v1beta1.Tx = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.Tx.repeatedFields_, null, ) } goog.inherits(proto.cosmos.tx.v1beta1.Tx, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.Tx.displayName = 'proto.cosmos.tx.v1beta1.Tx' } /** * 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.cosmos.tx.v1beta1.TxRaw = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.TxRaw.repeatedFields_, null, ) } goog.inherits(proto.cosmos.tx.v1beta1.TxRaw, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.TxRaw.displayName = 'proto.cosmos.tx.v1beta1.TxRaw' } /** * 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.cosmos.tx.v1beta1.SignDoc = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.tx.v1beta1.SignDoc, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.SignDoc.displayName = 'proto.cosmos.tx.v1beta1.SignDoc' } /** * 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.cosmos.tx.v1beta1.SignDocDirectAux = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.tx.v1beta1.SignDocDirectAux, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.SignDocDirectAux.displayName = 'proto.cosmos.tx.v1beta1.SignDocDirectAux' } /** * 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.cosmos.tx.v1beta1.TxBody = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, 500, proto.cosmos.tx.v1beta1.TxBody.repeatedFields_, null, ) } goog.inherits(proto.cosmos.tx.v1beta1.TxBody, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.TxBody.displayName = 'proto.cosmos.tx.v1beta1.TxBody' } /** * 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.cosmos.tx.v1beta1.AuthInfo = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.AuthInfo.repeatedFields_, null, ) } goog.inherits(proto.cosmos.tx.v1beta1.AuthInfo, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.AuthInfo.displayName = 'proto.cosmos.tx.v1beta1.AuthInfo' } /** * 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.cosmos.tx.v1beta1.SignerInfo = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.tx.v1beta1.SignerInfo, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.SignerInfo.displayName = 'proto.cosmos.tx.v1beta1.SignerInfo' } /** * 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.cosmos.tx.v1beta1.ModeInfo = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, null, proto.cosmos.tx.v1beta1.ModeInfo.oneofGroups_, ) } goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.ModeInfo.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo' } /** * 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.cosmos.tx.v1beta1.ModeInfo.Single = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo.Single, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.ModeInfo.Single.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo.Single' } /** * 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.cosmos.tx.v1beta1.ModeInfo.Multi = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.ModeInfo.Multi.repeatedFields_, null, ) } goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo.Multi, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.ModeInfo.Multi.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo.Multi' } /** * 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.cosmos.tx.v1beta1.Fee = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.Fee.repeatedFields_, null, ) } goog.inherits(proto.cosmos.tx.v1beta1.Fee, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.Fee.displayName = 'proto.cosmos.tx.v1beta1.Fee' } /** * 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.cosmos.tx.v1beta1.Tip = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.Tip.repeatedFields_, null, ) } goog.inherits(proto.cosmos.tx.v1beta1.Tip, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.Tip.displayName = 'proto.cosmos.tx.v1beta1.Tip' } /** * 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.cosmos.tx.v1beta1.AuxSignerData = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.tx.v1beta1.AuxSignerData, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.tx.v1beta1.AuxSignerData.displayName = 'proto.cosmos.tx.v1beta1.AuxSignerData' } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.tx.v1beta1.Tx.repeatedFields_ = [3] 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} */ proto.cosmos.tx.v1beta1.Tx.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.tx.v1beta1.Tx.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 {!proto.cosmos.tx.v1beta1.Tx} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.Tx.toObject = function (includeInstance, msg) { var f, obj = { body: (f = msg.getBody()) && proto.cosmos.tx.v1beta1.TxBody.toObject(includeInstance, f), authInfo: (f = msg.getAuthInfo()) && proto.cosmos.tx.v1beta1.AuthInfo.toObject(includeInstance, f), signaturesList: msg.getSignaturesList_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.cosmos.tx.v1beta1.Tx} */ proto.cosmos.tx.v1beta1.Tx.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.tx.v1beta1.Tx() return proto.cosmos.tx.v1beta1.Tx.deserializeBinaryFromReader(msg, reader) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.tx.v1beta1.Tx} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.tx.v1beta1.Tx} */ proto.cosmos.tx.v1beta1.Tx.deserializeBinaryFromReader = function ( msg, reader, ) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = new proto.cosmos.tx.v1beta1.TxBody() reader.readMessage( value, proto.cosmos.tx.v1beta1.TxBody.deserializeBinaryFromReader, ) msg.setBody(value) break case 2: var value = new proto.cosmos.tx.v1beta1.AuthInfo() reader.readMessage( value, proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinaryFromReader, ) msg.setAuthInfo(value) break case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.addSignatures(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.Tx.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.tx.v1beta1.Tx.serializeBinaryToWriter(this, writer) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.tx.v1beta1.Tx} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.Tx.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getBody() if (f != null) { writer.writeMessage( 1, f, proto.cosmos.tx.v1beta1.TxBody.serializeBinaryToWriter, ) } f = message.getAuthInfo() if (f != null) { writer.writeMessage( 2, f, proto.cosmos.tx.v1beta1.AuthInfo.serializeBinaryToWriter, ) } f = message.getSignaturesList_asU8() if (f.length > 0) { writer.writeRepeatedBytes(3, f) } } /** * optional TxBody body = 1; * @return {?proto.cosmos.tx.v1beta1.TxBody} */ proto.cosmos.tx.v1beta1.Tx.prototype.getBody = function () { return /** @type{?proto.cosmos.tx.v1beta1.TxBody} */ ( jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.TxBody, 1) ) } /** * @param {?proto.cosmos.tx.v1beta1.TxBody|undefined} value * @return {!proto.cosmos.tx.v1beta1.Tx} returns this */ proto.cosmos.tx.v1beta1.Tx.prototype.setBody = function (value) { return jspb.Message.setWrapperField(this, 1, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.tx.v1beta1.Tx} returns this */ proto.cosmos.tx.v1beta1.Tx.prototype.clearBody = function () { return this.setBody(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.tx.v1beta1.Tx.prototype.hasBody = function () { return jspb.Message.getField(this, 1) != null } /** * optional AuthInfo auth_info = 2; * @return {?proto.cosmos.tx.v1beta1.AuthInfo} */ proto.cosmos.tx.v1beta1.Tx.prototype.getAuthInfo = function () { return /** @type{?proto.cosmos.tx.v1beta1.AuthInfo} */ ( jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.AuthInfo, 2) ) } /** * @param {?proto.cosmos.tx.v1beta1.AuthInfo|undefined} value * @return {!proto.cosmos.tx.v1beta1.Tx} returns this */ proto.cosmos.tx.v1beta1.Tx.prototype.setAuthInfo = function (value) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.tx.v1beta1.Tx} returns this */ proto.cosmos.tx.v1beta1.Tx.prototype.clearAuthInfo = function () { return this.setAuthInfo(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.tx.v1beta1.Tx.prototype.hasAuthInfo = function () { return jspb.Message.getField(this, 2) != null } /** * repeated bytes signatures = 3; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList = function () { return /** @type {!(Array<!Uint8Array>|Array<string>)} */ ( jspb.Message.getRepeatedField(this, 3) ) } /** * repeated bytes signatures = 3; * This is a type-conversion wrapper around `getSignaturesList()` * @return {!Array<string>} */ proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList_asB64 = function () { return /** @type {!Array<string>} */ ( jspb.Message.bytesListAsB64(this.getSignaturesList()) ) } /** * repeated bytes signatures = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getSignaturesList()` * @return {!Array<!Uint8Array>} */ proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList_asU8 = function () { return /** @type {!Array<!Uint8Array>} */ ( jspb.Message.bytesListAsU8(this.getSignaturesList()) ) } /** * @param {!(Array<!Uint8Array>|Array<string>)} value * @return {!proto.cosmos.tx.v1beta1.Tx} returns this */ proto.cosmos.tx.v1beta1.Tx.prototype.setSignaturesList = function (value) { return jspb.Message.setField(this, 3, value || []) } /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index * @return {!proto.cosmos.tx.v1beta1.Tx} returns this */ proto.cosmos.tx.v1beta1.Tx.prototype.addSignatures = function ( value, opt_index, ) { return jspb.Message.addToRepeatedField(this, 3, value, opt_index) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.tx.v1beta1.Tx} returns this */ proto.cosmos.tx.v1beta1.Tx.prototype.clearSignaturesList = function () { return this.setSignaturesList([]) } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.tx.v1beta1.TxRaw.repeatedFields_ = [3] 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} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.tx.v1beta1.TxRaw.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 {!proto.cosmos.tx.v1beta1.TxRaw} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.TxRaw.toObject = function (includeInstance, msg) { var f, obj = { bodyBytes: msg.getBodyBytes_asB64(), authInfoBytes: msg.getAuthInfoBytes_asB64(), signaturesList: msg.getSignaturesList_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.cosmos.tx.v1beta1.TxRaw} */ proto.cosmos.tx.v1beta1.TxRaw.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.tx.v1beta1.TxRaw() return proto.cosmos.tx.v1beta1.TxRaw.deserializeBinaryFromReader(msg, reader) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.tx.v1beta1.TxRaw} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.tx.v1beta1.TxRaw} */ proto.cosmos.tx.v1beta1.TxRaw.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.setBodyBytes(value) break case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.setAuthInfoBytes(value) break case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.addSignatures(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.tx.v1beta1.TxRaw.serializeBinaryToWriter(this, writer) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.tx.v1beta1.TxRaw} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.TxRaw.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getBodyBytes_asU8() if (f.length > 0) { writer.writeBytes(1, f) } f = message.getAuthInfoBytes_asU8() if (f.length > 0) { writer.writeBytes(2, f) } f = message.getSignaturesList_asU8() if (f.length > 0) { writer.writeRepeatedBytes(3, f) } } /** * optional bytes body_bytes = 1; * @return {!(string|Uint8Array)} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 1, '') ) } /** * optional bytes body_bytes = 1; * This is a type-conversion wrapper around `getBodyBytes()` * @return {string} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBodyBytes())) } /** * optional bytes body_bytes = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getBodyBytes()` * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes_asU8 = function () { return /** @type {!Uint8Array} */ ( jspb.Message.bytesAsU8(this.getBodyBytes()) ) } /** * @param {!(string|Uint8Array)} value * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this */ proto.cosmos.tx.v1beta1.TxRaw.prototype.setBodyBytes = function (value) { return jspb.Message.setProto3BytesField(this, 1, value) } /** * optional bytes auth_info_bytes = 2; * @return {!(string|Uint8Array)} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 2, '') ) } /** * optional bytes auth_info_bytes = 2; * This is a type-conversion wrapper around `getAuthInfoBytes()` * @return {string} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes_asB64 = function () { return /** @type {string} */ ( jspb.Message.bytesAsB64(this.getAuthInfoBytes()) ) } /** * optional bytes auth_info_bytes = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAuthInfoBytes()` * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes_asU8 = function () { return /** @type {!Uint8Array} */ ( jspb.Message.bytesAsU8(this.getAuthInfoBytes()) ) } /** * @param {!(string|Uint8Array)} value * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this */ proto.cosmos.tx.v1beta1.TxRaw.prototype.setAuthInfoBytes = function (value) { return jspb.Message.setProto3BytesField(this, 2, value) } /** * repeated bytes signatures = 3; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList = function () { return /** @type {!(Array<!Uint8Array>|Array<string>)} */ ( jspb.Message.getRepeatedField(this, 3) ) } /** * repeated bytes signatures = 3; * This is a type-conversion wrapper around `getSignaturesList()` * @return {!Array<string>} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList_asB64 = function () { return /** @type {!Array<string>} */ ( jspb.Message.bytesListAsB64(this.getSignaturesList()) ) } /** * repeated bytes signatures = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getSignaturesList()` * @return {!Array<!Uint8Array>} */ proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList_asU8 = function () { return /** @type {!Array<!Uint8Array>} */ ( jspb.Message.bytesListAsU8(this.getSignaturesList()) ) } /** * @param {!(Array<!Uint8Array>|Array<string>)} value * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this */ proto.cosmos.tx.v1beta1.TxRaw.prototype.setSignaturesList = function (value) { return jspb.Message.setField(this, 3, value || []) } /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this */ proto.cosmos.tx.v1beta1.TxRaw.prototype.addSignatures = function ( value, opt_index, ) { return jspb.Message.addToRepeatedField(this, 3, value, opt_index) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this */ proto.cosmos.tx.v1beta1.TxRaw.prototype.clearSignaturesList = function () { return this.setSignaturesList([]) } 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} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.tx.v1beta1.SignDoc.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 {!proto.cosmos.tx.v1beta1.SignDoc} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.SignDoc.toObject = function (includeInstance, msg) { var f, obj = { bodyBytes: msg.getBodyBytes_asB64(), authInfoBytes: msg.getAuthInfoBytes_asB64(), chainId: jspb.Message.getFieldWithDefault(msg, 3, ''), accountNumber: jspb.Message.getFieldWithDefault(msg, 4, 0), } if (includeInstance) { obj.$jspbMessageInstance = msg } return obj } } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.cosmos.tx.v1beta1.SignDoc} */ proto.cosmos.tx.v1beta1.SignDoc.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.tx.v1beta1.SignDoc() return proto.cosmos.tx.v1beta1.SignDoc.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.tx.v1beta1.SignDoc} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.tx.v1beta1.SignDoc} */ proto.cosmos.tx.v1beta1.SignDoc.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.setBodyBytes(value) break case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.setAuthInfoBytes(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.setChainId(value) break case 4: var value = /** @type {number} */ (reader.readUint64()) msg.setAccountNumber(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.tx.v1beta1.SignDoc.serializeBinaryToWriter(this, writer) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.tx.v1beta1.SignDoc} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.SignDoc.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getBodyBytes_asU8() if (f.length > 0) { writer.writeBytes(1, f) } f = message.getAuthInfoBytes_asU8() if (f.length > 0) { writer.writeBytes(2, f) } f = message.getChainId() if (f.length > 0) { writer.writeString(3, f) } f = message.getAccountNumber() if (f !== 0) { writer.writeUint64(4, f) } } /** * optional bytes body_bytes = 1; * @return {!(string|Uint8Array)} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 1, '') ) } /** * optional bytes body_bytes = 1; * This is a type-conversion wrapper around `getBodyBytes()` * @return {string} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBodyBytes())) } /** * optional bytes body_bytes = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getBodyBytes()` * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes_asU8 = function () { return /** @type {!Uint8Array} */ ( jspb.Message.bytesAsU8(this.getBodyBytes()) ) } /** * @param {!(string|Uint8Array)} value * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this */ proto.cosmos.tx.v1beta1.SignDoc.prototype.setBodyBytes = function (value) { return jspb.Message.setProto3BytesField(this, 1, value) } /** * optional bytes auth_info_bytes = 2; * @return {!(string|Uint8Array)} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 2, '') ) } /** * optional bytes auth_info_bytes = 2; * This is a type-conversion wrapper around `getAuthInfoBytes()` * @return {string} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes_asB64 = function () { return /** @type {string} */ ( jspb.Message.bytesAsB64(this.getAuthInfoBytes()) ) } /** * optional bytes auth_info_bytes = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAuthInfoBytes()` * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes_asU8 = function () { return /** @type {!Uint8Array} */ ( jspb.Message.bytesAsU8(this.getAuthInfoBytes()) ) } /** * @param {!(string|Uint8Array)} value * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this */ proto.cosmos.tx.v1beta1.SignDoc.prototype.setAuthInfoBytes = function (value) { return jspb.Message.setProto3BytesField(this, 2, value) } /** * optional string chain_id = 3; * @return {string} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.getChainId = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) } /** * @param {string} value * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this */ proto.cosmos.tx.v1beta1.SignDoc.prototype.setChainId = function (value) { return jspb.Message.setProto3StringField(this, 3, value) } /** * optional uint64 account_number = 4; * @return {number} */ proto.cosmos.tx.v1beta1.SignDoc.prototype.getAccountNumber = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) } /** * @param {number} value * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this */ proto.cosmos.tx.v1beta1.SignDoc.prototype.setAccountNumber = function (value) { return jspb.Message.setProto3IntField(this, 4, 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} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.tx.v1beta1.SignDocDirectAux.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 {!proto.cosmos.tx.v1beta1.SignDocDirectAux} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.SignDocDirectAux.toObject = function ( includeInstance, msg, ) { var f, obj = { bodyBytes: msg.getBodyBytes_asB64(), publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), chainId: jspb.Message.getFieldWithDefault(msg, 3, ''), accountNumber: jspb.Message.getFieldWithDefault(msg, 4, 0), sequence: jspb.Message.getFieldWithDefault(msg, 5, 0), tip: (f = msg.getTip()) && proto.cosmos.tx.v1beta1.Tip.toObject(includeInstance, f), } if (includeInstance) { obj.$jspbMessageInstance = msg } return obj } } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.tx.v1beta1.SignDocDirectAux() return proto.cosmos.tx.v1beta1.SignDocDirectAux.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.tx.v1beta1.SignDocDirectAux} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.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.setBodyBytes(value) break case 2: var value = new google_protobuf_any_pb.Any() reader.readMessage( value, google_protobuf_any_pb.Any.deserializeBinaryFromReader, ) msg.setPublicKey(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.setChainId(value) break case 4: var value = /** @type {number} */ (reader.readUint64()) msg.setAccountNumber(value) break case 5: var value = /** @type {number} */ (reader.readUint64()) msg.setSequence(value) break case 6: var value = new proto.cosmos.tx.v1beta1.Tip() reader.readMessage( value, proto.cosmos.tx.v1beta1.Tip.deserializeBinaryFromReader, ) msg.setTip(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.tx.v1beta1.SignDocDirectAux.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.tx.v1beta1.SignDocDirectAux} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.SignDocDirectAux.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getBodyBytes_asU8() if (f.length > 0) { writer.writeBytes(1, f) } f = message.getPublicKey() if (f != null) { writer.writeMessage( 2, f, google_protobuf_any_pb.Any.serializeBinaryToWriter, ) } f = message.getChainId() if (f.length > 0) { writer.writeString(3, f) } f = message.getAccountNumber() if (f !== 0) { writer.writeUint64(4, f) } f = message.getSequence() if (f !== 0) { writer.writeUint64(5, f) } f = message.getTip() if (f != null) { writer.writeMessage( 6, f, proto.cosmos.tx.v1beta1.Tip.serializeBinaryToWriter, ) } } /** * optional bytes body_bytes = 1; * @return {!(string|Uint8Array)} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.getBodyBytes = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 1, '') ) } /** * optional bytes body_bytes = 1; * This is a type-conversion wrapper around `getBodyBytes()` * @return {string} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.getBodyBytes_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBodyBytes())) } /** * optional bytes body_bytes = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getBodyBytes()` * @return {!Uint8Array} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.getBodyBytes_asU8 = function () { return /** @type {!Uint8Array} */ ( jspb.Message.bytesAsU8(this.getBodyBytes()) ) } /** * @param {!(string|Uint8Array)} value * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} returns this */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.setBodyBytes = function ( value, ) { return jspb.Message.setProto3BytesField(this, 1, value) } /** * optional google.protobuf.Any public_key = 2; * @return {?proto.google.protobuf.Any} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.getPublicKey = function () { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2) ) } /** * @param {?proto.google.protobuf.Any|undefined} value * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} returns this */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.setPublicKey = function ( value, ) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} returns this */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.clearPublicKey = function () { return this.setPublicKey(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.hasPublicKey = function () { return jspb.Message.getField(this, 2) != null } /** * optional string chain_id = 3; * @return {string} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.getChainId = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) } /** * @param {string} value * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} returns this */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.setChainId = function ( value, ) { return jspb.Message.setProto3StringField(this, 3, value) } /** * optional uint64 account_number = 4; * @return {number} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.getAccountNumber = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) } /** * @param {number} value * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} returns this */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.setAccountNumber = function ( value, ) { return jspb.Message.setProto3IntField(this, 4, value) } /** * optional uint64 sequence = 5; * @return {number} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.getSequence = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) } /** * @param {number} value * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} returns this */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.setSequence = function ( value, ) { return jspb.Message.setProto3IntField(this, 5, value) } /** * optional Tip tip = 6; * @return {?proto.cosmos.tx.v1beta1.Tip} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.getTip = function () { return /** @type{?proto.cosmos.tx.v1beta1.Tip} */ ( jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.Tip, 6) ) } /** * @param {?proto.cosmos.tx.v1beta1.Tip|undefined} value * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} returns this */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.setTip = function (value) { return jspb.Message.setWrapperField(this, 6, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.tx.v1beta1.SignDocDirectAux} returns this */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.clearTip = function () { return this.setTip(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.tx.v1beta1.SignDocDirectAux.prototype.hasTip = function () { return jspb.Message.getField(this, 6) != null } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.tx.v1beta1.TxBody.repeatedFields_ = [1, 1023, 2047] 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} */ proto.cosmos.tx.v1beta1.TxBody.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.tx.v1beta1.TxBody.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 {!proto.cosmos.tx.v1beta1.TxBody} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.tx.v1beta1.TxBody.toObject = function (includeInstance, msg) { var f, obj = { messagesList: jspb.Message.toObjectList( msg.getMessagesList(), google_protobuf_any_pb.Any.toObject, includeInstance, ), memo: jspb.Message.getFieldWithDefault(msg, 2, ''), timeoutHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), extensionOptionsList: jspb.Message.toObjectList( msg.getExtensionOptionsList(), google_protobuf_any_pb.Any.toObject, includeInstance, ), nonCriticalExtensionOptionsList: jspb.Message.toObjectList( msg.getNonCriticalExtensionOptionsList(), google_protobuf_any_pb.Any.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.cosmos.tx.v1beta1.TxBody} */ proto.cosmos.tx.v1beta1.TxBody.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.tx.v1beta1.TxBody() return proto.cosmos.tx.v1beta1.TxBody.deserializeBinaryFromReader(msg, reader) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.tx.v1beta1.TxBody} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.tx.v1beta1.TxBody} */ proto.cosmos.tx.v