UNPKG

@bandprotocol/bandchain.js

Version:

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

1,609 lines (1,513 loc) 51.4 kB
// source: ibc/core/client/v1/client.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 cosmos_upgrade_v1beta1_upgrade_pb = require('../../../../cosmos/upgrade/v1beta1/upgrade_pb.js') goog.object.extend(proto, cosmos_upgrade_v1beta1_upgrade_pb) var cosmos_proto_cosmos_pb = require('../../../../cosmos_proto/cosmos_pb.js') goog.object.extend(proto, cosmos_proto_cosmos_pb) var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') goog.object.extend(proto, gogoproto_gogo_pb) var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') goog.object.extend(proto, google_protobuf_any_pb) goog.exportSymbol( 'proto.ibc.core.client.v1.ClientConsensusStates', null, global, ) goog.exportSymbol('proto.ibc.core.client.v1.ClientUpdateProposal', null, global) goog.exportSymbol( 'proto.ibc.core.client.v1.ConsensusStateWithHeight', null, global, ) goog.exportSymbol('proto.ibc.core.client.v1.Height', null, global) goog.exportSymbol( 'proto.ibc.core.client.v1.IdentifiedClientState', null, global, ) goog.exportSymbol('proto.ibc.core.client.v1.Params', null, global) goog.exportSymbol('proto.ibc.core.client.v1.UpgradeProposal', 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.core.client.v1.IdentifiedClientState = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.core.client.v1.IdentifiedClientState, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.core.client.v1.IdentifiedClientState.displayName = 'proto.ibc.core.client.v1.IdentifiedClientState' } /** * 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.core.client.v1.ConsensusStateWithHeight = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.core.client.v1.ConsensusStateWithHeight, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.core.client.v1.ConsensusStateWithHeight.displayName = 'proto.ibc.core.client.v1.ConsensusStateWithHeight' } /** * 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.core.client.v1.ClientConsensusStates = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.ibc.core.client.v1.ClientConsensusStates.repeatedFields_, null, ) } goog.inherits(proto.ibc.core.client.v1.ClientConsensusStates, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.core.client.v1.ClientConsensusStates.displayName = 'proto.ibc.core.client.v1.ClientConsensusStates' } /** * 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.core.client.v1.Height = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.core.client.v1.Height, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.core.client.v1.Height.displayName = 'proto.ibc.core.client.v1.Height' } /** * 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.core.client.v1.Params = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.ibc.core.client.v1.Params.repeatedFields_, null, ) } goog.inherits(proto.ibc.core.client.v1.Params, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.core.client.v1.Params.displayName = 'proto.ibc.core.client.v1.Params' } /** * 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.core.client.v1.ClientUpdateProposal = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.core.client.v1.ClientUpdateProposal, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.core.client.v1.ClientUpdateProposal.displayName = 'proto.ibc.core.client.v1.ClientUpdateProposal' } /** * 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.core.client.v1.UpgradeProposal = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.core.client.v1.UpgradeProposal, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.core.client.v1.UpgradeProposal.displayName = 'proto.ibc.core.client.v1.UpgradeProposal' } 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.core.client.v1.IdentifiedClientState.prototype.toObject = function ( opt_includeInstance, ) { return proto.ibc.core.client.v1.IdentifiedClientState.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.core.client.v1.IdentifiedClientState} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.IdentifiedClientState.toObject = function ( includeInstance, msg, ) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, ''), clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.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.core.client.v1.IdentifiedClientState} */ proto.ibc.core.client.v1.IdentifiedClientState.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.core.client.v1.IdentifiedClientState() return proto.ibc.core.client.v1.IdentifiedClientState.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.core.client.v1.IdentifiedClientState} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.core.client.v1.IdentifiedClientState} */ proto.ibc.core.client.v1.IdentifiedClientState.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.setClientId(value) break case 2: var value = new google_protobuf_any_pb.Any() reader.readMessage( value, google_protobuf_any_pb.Any.deserializeBinaryFromReader, ) msg.setClientState(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.core.client.v1.IdentifiedClientState.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.core.client.v1.IdentifiedClientState.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.core.client.v1.IdentifiedClientState} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.IdentifiedClientState.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getClientId() if (f.length > 0) { writer.writeString(1, f) } f = message.getClientState() if (f != null) { writer.writeMessage( 2, f, google_protobuf_any_pb.Any.serializeBinaryToWriter, ) } } /** * optional string client_id = 1; * @return {string} */ proto.ibc.core.client.v1.IdentifiedClientState.prototype.getClientId = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.ibc.core.client.v1.IdentifiedClientState} returns this */ proto.ibc.core.client.v1.IdentifiedClientState.prototype.setClientId = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional google.protobuf.Any client_state = 2; * @return {?proto.google.protobuf.Any} */ proto.ibc.core.client.v1.IdentifiedClientState.prototype.getClientState = 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.ibc.core.client.v1.IdentifiedClientState} returns this */ proto.ibc.core.client.v1.IdentifiedClientState.prototype.setClientState = function (value) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.core.client.v1.IdentifiedClientState} returns this */ proto.ibc.core.client.v1.IdentifiedClientState.prototype.clearClientState = function () { return this.setClientState(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.core.client.v1.IdentifiedClientState.prototype.hasClientState = 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.core.client.v1.ConsensusStateWithHeight.prototype.toObject = function (opt_includeInstance) { return proto.ibc.core.client.v1.ConsensusStateWithHeight.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.core.client.v1.ConsensusStateWithHeight} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.ConsensusStateWithHeight.toObject = function ( includeInstance, msg, ) { var f, obj = { height: (f = msg.getHeight()) && proto.ibc.core.client.v1.Height.toObject(includeInstance, f), consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.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.core.client.v1.ConsensusStateWithHeight} */ proto.ibc.core.client.v1.ConsensusStateWithHeight.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.core.client.v1.ConsensusStateWithHeight() return proto.ibc.core.client.v1.ConsensusStateWithHeight.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.core.client.v1.ConsensusStateWithHeight} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} */ proto.ibc.core.client.v1.ConsensusStateWithHeight.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = new proto.ibc.core.client.v1.Height() reader.readMessage( value, proto.ibc.core.client.v1.Height.deserializeBinaryFromReader, ) msg.setHeight(value) break case 2: var value = new google_protobuf_any_pb.Any() reader.readMessage( value, google_protobuf_any_pb.Any.deserializeBinaryFromReader, ) msg.setConsensusState(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.core.client.v1.ConsensusStateWithHeight.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.core.client.v1.ConsensusStateWithHeight} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.ConsensusStateWithHeight.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getHeight() if (f != null) { writer.writeMessage( 1, f, proto.ibc.core.client.v1.Height.serializeBinaryToWriter, ) } f = message.getConsensusState() if (f != null) { writer.writeMessage( 2, f, google_protobuf_any_pb.Any.serializeBinaryToWriter, ) } } /** * optional Height height = 1; * @return {?proto.ibc.core.client.v1.Height} */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.getHeight = function () { return /** @type{?proto.ibc.core.client.v1.Height} */ ( jspb.Message.getWrapperField(this, proto.ibc.core.client.v1.Height, 1) ) } /** * @param {?proto.ibc.core.client.v1.Height|undefined} value * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.setHeight = function (value) { return jspb.Message.setWrapperField(this, 1, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.clearHeight = function () { return this.setHeight(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.hasHeight = function () { return jspb.Message.getField(this, 1) != null } /** * optional google.protobuf.Any consensus_state = 2; * @return {?proto.google.protobuf.Any} */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.getConsensusState = 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.ibc.core.client.v1.ConsensusStateWithHeight} returns this */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.setConsensusState = function (value) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.clearConsensusState = function () { return this.setConsensusState(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.hasConsensusState = function () { return jspb.Message.getField(this, 2) != null } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.ibc.core.client.v1.ClientConsensusStates.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.core.client.v1.ClientConsensusStates.prototype.toObject = function ( opt_includeInstance, ) { return proto.ibc.core.client.v1.ClientConsensusStates.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.core.client.v1.ClientConsensusStates} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.ClientConsensusStates.toObject = function ( includeInstance, msg, ) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, ''), consensusStatesList: jspb.Message.toObjectList( msg.getConsensusStatesList(), proto.ibc.core.client.v1.ConsensusStateWithHeight.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.core.client.v1.ClientConsensusStates} */ proto.ibc.core.client.v1.ClientConsensusStates.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.core.client.v1.ClientConsensusStates() return proto.ibc.core.client.v1.ClientConsensusStates.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.core.client.v1.ClientConsensusStates} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.core.client.v1.ClientConsensusStates} */ proto.ibc.core.client.v1.ClientConsensusStates.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.setClientId(value) break case 2: var value = new proto.ibc.core.client.v1.ConsensusStateWithHeight() reader.readMessage( value, proto.ibc.core.client.v1.ConsensusStateWithHeight .deserializeBinaryFromReader, ) msg.addConsensusStates(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.core.client.v1.ClientConsensusStates.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.core.client.v1.ClientConsensusStates.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.core.client.v1.ClientConsensusStates} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.ClientConsensusStates.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getClientId() if (f.length > 0) { writer.writeString(1, f) } f = message.getConsensusStatesList() if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.ibc.core.client.v1.ConsensusStateWithHeight .serializeBinaryToWriter, ) } } /** * optional string client_id = 1; * @return {string} */ proto.ibc.core.client.v1.ClientConsensusStates.prototype.getClientId = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this */ proto.ibc.core.client.v1.ClientConsensusStates.prototype.setClientId = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * repeated ConsensusStateWithHeight consensus_states = 2; * @return {!Array<!proto.ibc.core.client.v1.ConsensusStateWithHeight>} */ proto.ibc.core.client.v1.ClientConsensusStates.prototype.getConsensusStatesList = function () { return /** @type{!Array<!proto.ibc.core.client.v1.ConsensusStateWithHeight>} */ ( jspb.Message.getRepeatedWrapperField( this, proto.ibc.core.client.v1.ConsensusStateWithHeight, 2, ) ) } /** * @param {!Array<!proto.ibc.core.client.v1.ConsensusStateWithHeight>} value * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this */ proto.ibc.core.client.v1.ClientConsensusStates.prototype.setConsensusStatesList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 2, value) } /** * @param {!proto.ibc.core.client.v1.ConsensusStateWithHeight=} opt_value * @param {number=} opt_index * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} */ proto.ibc.core.client.v1.ClientConsensusStates.prototype.addConsensusStates = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField( this, 2, opt_value, proto.ibc.core.client.v1.ConsensusStateWithHeight, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this */ proto.ibc.core.client.v1.ClientConsensusStates.prototype.clearConsensusStatesList = function () { return this.setConsensusStatesList([]) } 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.core.client.v1.Height.prototype.toObject = function ( opt_includeInstance, ) { return proto.ibc.core.client.v1.Height.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.core.client.v1.Height} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.Height.toObject = function (includeInstance, msg) { var f, obj = { revisionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), revisionHeight: jspb.Message.getFieldWithDefault(msg, 2, 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.ibc.core.client.v1.Height} */ proto.ibc.core.client.v1.Height.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.core.client.v1.Height() return proto.ibc.core.client.v1.Height.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.core.client.v1.Height} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.core.client.v1.Height} */ proto.ibc.core.client.v1.Height.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.setRevisionNumber(value) break case 2: var value = /** @type {number} */ (reader.readUint64()) msg.setRevisionHeight(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.core.client.v1.Height.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.core.client.v1.Height.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.core.client.v1.Height} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.Height.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getRevisionNumber() if (f !== 0) { writer.writeUint64(1, f) } f = message.getRevisionHeight() if (f !== 0) { writer.writeUint64(2, f) } } /** * optional uint64 revision_number = 1; * @return {number} */ proto.ibc.core.client.v1.Height.prototype.getRevisionNumber = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) } /** * @param {number} value * @return {!proto.ibc.core.client.v1.Height} returns this */ proto.ibc.core.client.v1.Height.prototype.setRevisionNumber = function (value) { return jspb.Message.setProto3IntField(this, 1, value) } /** * optional uint64 revision_height = 2; * @return {number} */ proto.ibc.core.client.v1.Height.prototype.getRevisionHeight = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) } /** * @param {number} value * @return {!proto.ibc.core.client.v1.Height} returns this */ proto.ibc.core.client.v1.Height.prototype.setRevisionHeight = function (value) { return jspb.Message.setProto3IntField(this, 2, value) } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.ibc.core.client.v1.Params.repeatedFields_ = [1] 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.core.client.v1.Params.prototype.toObject = function ( opt_includeInstance, ) { return proto.ibc.core.client.v1.Params.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.core.client.v1.Params} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.Params.toObject = function (includeInstance, msg) { var f, obj = { allowedClientsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.core.client.v1.Params} */ proto.ibc.core.client.v1.Params.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.core.client.v1.Params() return proto.ibc.core.client.v1.Params.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.core.client.v1.Params} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.core.client.v1.Params} */ proto.ibc.core.client.v1.Params.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.addAllowedClients(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.core.client.v1.Params.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.core.client.v1.Params.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.core.client.v1.Params} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.Params.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getAllowedClientsList() if (f.length > 0) { writer.writeRepeatedString(1, f) } } /** * repeated string allowed_clients = 1; * @return {!Array<string>} */ proto.ibc.core.client.v1.Params.prototype.getAllowedClientsList = function () { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1)) } /** * @param {!Array<string>} value * @return {!proto.ibc.core.client.v1.Params} returns this */ proto.ibc.core.client.v1.Params.prototype.setAllowedClientsList = function ( value, ) { return jspb.Message.setField(this, 1, value || []) } /** * @param {string} value * @param {number=} opt_index * @return {!proto.ibc.core.client.v1.Params} returns this */ proto.ibc.core.client.v1.Params.prototype.addAllowedClients = function ( value, opt_index, ) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index) } /** * Clears the list making it empty but non-null. * @return {!proto.ibc.core.client.v1.Params} returns this */ proto.ibc.core.client.v1.Params.prototype.clearAllowedClientsList = function () { return this.setAllowedClientsList([]) } 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.core.client.v1.ClientUpdateProposal.prototype.toObject = function ( opt_includeInstance, ) { return proto.ibc.core.client.v1.ClientUpdateProposal.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.core.client.v1.ClientUpdateProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.ClientUpdateProposal.toObject = function ( includeInstance, msg, ) { var f, obj = { title: jspb.Message.getFieldWithDefault(msg, 1, ''), description: jspb.Message.getFieldWithDefault(msg, 2, ''), subjectClientId: jspb.Message.getFieldWithDefault(msg, 3, ''), substituteClientId: 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 {!proto.ibc.core.client.v1.ClientUpdateProposal} */ proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.core.client.v1.ClientUpdateProposal() return proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.core.client.v1.ClientUpdateProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} */ proto.ibc.core.client.v1.ClientUpdateProposal.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.setTitle(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.setDescription(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.setSubjectClientId(value) break case 4: var value = /** @type {string} */ (reader.readString()) msg.setSubstituteClientId(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.core.client.v1.ClientUpdateProposal.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.core.client.v1.ClientUpdateProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getTitle() if (f.length > 0) { writer.writeString(1, f) } f = message.getDescription() if (f.length > 0) { writer.writeString(2, f) } f = message.getSubjectClientId() if (f.length > 0) { writer.writeString(3, f) } f = message.getSubstituteClientId() if (f.length > 0) { writer.writeString(4, f) } } /** * optional string title = 1; * @return {string} */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getTitle = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setTitle = function ( value, ) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string description = 2; * @return {string} */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getDescription = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setDescription = function (value) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional string subject_client_id = 3; * @return {string} */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubjectClientId = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) } /** * @param {string} value * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubjectClientId = function (value) { return jspb.Message.setProto3StringField(this, 3, value) } /** * optional string substitute_client_id = 4; * @return {string} */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubstituteClientId = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, '')) } /** * @param {string} value * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this */ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubstituteClientId = function (value) { return jspb.Message.setProto3StringField(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.ibc.core.client.v1.UpgradeProposal.prototype.toObject = function ( opt_includeInstance, ) { return proto.ibc.core.client.v1.UpgradeProposal.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.core.client.v1.UpgradeProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.UpgradeProposal.toObject = function ( includeInstance, msg, ) { var f, obj = { title: jspb.Message.getFieldWithDefault(msg, 1, ''), description: jspb.Message.getFieldWithDefault(msg, 2, ''), plan: (f = msg.getPlan()) && cosmos_upgrade_v1beta1_upgrade_pb.Plan.toObject(includeInstance, f), upgradedClientState: (f = msg.getUpgradedClientState()) && google_protobuf_any_pb.Any.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.core.client.v1.UpgradeProposal} */ proto.ibc.core.client.v1.UpgradeProposal.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.core.client.v1.UpgradeProposal() return proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.core.client.v1.UpgradeProposal} */ proto.ibc.core.client.v1.UpgradeProposal.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.setTitle(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.setDescription(value) break case 3: var value = new cosmos_upgrade_v1beta1_upgrade_pb.Plan() reader.readMessage( value, cosmos_upgrade_v1beta1_upgrade_pb.Plan.deserializeBinaryFromReader, ) msg.setPlan(value) break case 4: var value = new google_protobuf_any_pb.Any() reader.readMessage( value, google_protobuf_any_pb.Any.deserializeBinaryFromReader, ) msg.setUpgradedClientState(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.core.client.v1.UpgradeProposal.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.core.client.v1.UpgradeProposal.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.core.client.v1.UpgradeProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getTitle() if (f.length > 0) { writer.writeString(1, f) } f = message.getDescription() if (f.length > 0) { writer.writeString(2, f) } f = message.getPlan() if (f != null) { writer.writeMessage( 3, f, cosmos_upgrade_v1beta1_upgrade_pb.Plan.serializeBinaryToWriter, ) } f = message.getUpgradedClientState() if (f != null) { writer.writeMessage( 4, f, google_protobuf_any_pb.Any.serializeBinaryToWriter, ) } } /** * optional string title = 1; * @return {string} */ proto.ibc.core.client.v1.UpgradeProposal.prototype.getTitle = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ proto.ibc.core.client.v1.UpgradeProposal.prototype.setTitle = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string description = 2; * @return {string} */ proto.ibc.core.client.v1.UpgradeProposal.prototype.getDescription = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ proto.ibc.core.client.v1.UpgradeProposal.prototype.setDescription = function ( value, ) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional cosmos.upgrade.v1beta1.Plan plan = 3; * @return {?proto.cosmos.upgrade.v1beta1.Plan} */ proto.ibc.core.client.v1.UpgradeProposal.prototype.getPlan = function () { return /** @type{?proto.cosmos.upgrade.v1beta1.Plan} */ ( jspb.Message.getWrapperField( this, cosmos_upgrade_v1beta1_upgrade_pb.Plan, 3, ) ) } /** * @param {?proto.cosmos.upgrade.v1beta1.Plan|undefined} value * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ proto.ibc.core.client.v1.UpgradeProposal.prototype.setPlan = function (value) { return jspb.Message.setWrapperField(this, 3, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ proto.ibc.core.client.v1.UpgradeProposal.prototype.cl