UNPKG

@bandprotocol/bandchain.js

Version:

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

910 lines (856 loc) 31.4 kB
// source: ibc/applications/interchain_accounts/host/v1/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_msg_v1_msg_pb = require('../../../../../cosmos/msg/v1/msg_pb.js') goog.object.extend(proto, cosmos_msg_v1_msg_pb) var ibc_applications_interchain_accounts_host_v1_host_pb = require('../../../../../ibc/applications/interchain_accounts/host/v1/host_pb.js') goog.object.extend(proto, ibc_applications_interchain_accounts_host_v1_host_pb) goog.exportSymbol( 'proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe', null, global, ) goog.exportSymbol( 'proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse', null, global, ) goog.exportSymbol( 'proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams', null, global, ) goog.exportSymbol( 'proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse', 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.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams = function ( opt_data, ) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams' } /** * 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.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse' } /** * 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.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe .repeatedFields_, null, ) } goog.inherits( proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe' } /** * 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.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.ibc.applications.interchain_accounts.host.v1 .MsgModuleQuerySafeResponse.repeatedFields_, null, ) } goog.inherits( proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse' } 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.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.toObject = function (opt_includeInstance) { return proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.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.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.toObject = function (includeInstance, msg) { var f, obj = { signer: jspb.Message.getFieldWithDefault(msg, 1, ''), params: (f = msg.getParams()) && ibc_applications_interchain_accounts_host_v1_host_pb.Params.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.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams() return proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = /** @type {string} */ (reader.readString()) msg.setSigner(value) break case 2: var value = new ibc_applications_interchain_accounts_host_v1_host_pb.Params() reader.readMessage( value, ibc_applications_interchain_accounts_host_v1_host_pb.Params .deserializeBinaryFromReader, ) msg.setParams(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getSigner() if (f.length > 0) { writer.writeString(1, f) } f = message.getParams() if (f != null) { writer.writeMessage( 2, f, ibc_applications_interchain_accounts_host_v1_host_pb.Params .serializeBinaryToWriter, ) } } /** * optional string signer = 1; * @return {string} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.getSigner = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.setSigner = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional Params params = 2; * @return {?proto.ibc.applications.interchain_accounts.host.v1.Params} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.getParams = function () { return /** @type{?proto.ibc.applications.interchain_accounts.host.v1.Params} */ ( jspb.Message.getWrapperField( this, ibc_applications_interchain_accounts_host_v1_host_pb.Params, 2, ) ) } /** * @param {?proto.ibc.applications.interchain_accounts.host.v1.Params|undefined} value * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.setParams = function (value) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.clearParams = function () { return this.setParams(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.hasParams = function () { return jspb.Message.getField(this, 2) != null } 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.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.prototype.toObject = function (opt_includeInstance) { return proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.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.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.toObject = function (includeInstance, msg) { var f, obj = {} if (includeInstance) { obj.$jspbMessageInstance = msg } return obj } } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse() return proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.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} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.toObject = function (opt_includeInstance) { return proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.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.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.toObject = function (includeInstance, msg) { var f, obj = { signer: jspb.Message.getFieldWithDefault(msg, 1, ''), requestsList: jspb.Message.toObjectList( msg.getRequestsList(), ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest .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.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe() return proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = /** @type {string} */ (reader.readString()) msg.setSigner(value) break case 2: var value = new ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest() reader.readMessage( value, ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest .deserializeBinaryFromReader, ) msg.addRequests(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getSigner() if (f.length > 0) { writer.writeString(1, f) } f = message.getRequestsList() if (f.length > 0) { writer.writeRepeatedMessage( 2, f, ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest .serializeBinaryToWriter, ) } } /** * optional string signer = 1; * @return {string} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.getSigner = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.setSigner = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * repeated QueryRequest requests = 2; * @return {!Array<!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest>} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.getRequestsList = function () { return /** @type{!Array<!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest>} */ ( jspb.Message.getRepeatedWrapperField( this, ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest, 2, ) ) } /** * @param {!Array<!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest>} value * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.setRequestsList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 2, value) } /** * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest=} opt_value * @param {number=} opt_index * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.addRequests = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField( this, 2, opt_value, proto.ibc.applications.interchain_accounts.host.v1.QueryRequest, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.clearRequestsList = function () { return this.setRequestsList([]) } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.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} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.toObject = function (opt_includeInstance) { return proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.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.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.toObject = function (includeInstance, msg) { var f, obj = { height: jspb.Message.getFieldWithDefault(msg, 1, 0), responsesList: msg.getResponsesList_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.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse() return proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()) msg.setHeight(value) break case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.addResponses(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getHeight() if (f !== 0) { writer.writeUint64(1, f) } f = message.getResponsesList_asU8() if (f.length > 0) { writer.writeRepeatedBytes(2, f) } } /** * optional uint64 height = 1; * @return {number} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.getHeight = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) } /** * @param {number} value * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.setHeight = function (value) { return jspb.Message.setProto3IntField(this, 1, value) } /** * repeated bytes responses = 2; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.getResponsesList = function () { return /** @type {!(Array<!Uint8Array>|Array<string>)} */ ( jspb.Message.getRepeatedField(this, 2) ) } /** * repeated bytes responses = 2; * This is a type-conversion wrapper around `getResponsesList()` * @return {!Array<string>} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.getResponsesList_asB64 = function () { return /** @type {!Array<string>} */ ( jspb.Message.bytesListAsB64(this.getResponsesList()) ) } /** * repeated bytes responses = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getResponsesList()` * @return {!Array<!Uint8Array>} */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.getResponsesList_asU8 = function () { return /** @type {!Array<!Uint8Array>} */ ( jspb.Message.bytesListAsU8(this.getResponsesList()) ) } /** * @param {!(Array<!Uint8Array>|Array<string>)} value * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.setResponsesList = function (value) { return jspb.Message.setField(this, 2, value || []) } /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.addResponses = function (value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index) } /** * Clears the list making it empty but non-null. * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} returns this */ proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.clearResponsesList = function () { return this.setResponsesList([]) } goog.object.extend(exports, proto.ibc.applications.interchain_accounts.host.v1)