UNPKG

@bandprotocol/bandchain.js

Version:

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

1,594 lines (1,528 loc) 175 kB
// source: cosmos/staking/v1beta1/staking.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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') goog.object.extend(proto, google_protobuf_any_pb) var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js') goog.object.extend(proto, google_protobuf_duration_pb) var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') goog.object.extend(proto, google_protobuf_timestamp_pb) var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') goog.object.extend(proto, cosmos_proto_cosmos_pb) var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') goog.object.extend(proto, cosmos_base_v1beta1_coin_pb) var amino_amino_pb = require('../../../amino/amino_pb.js') goog.object.extend(proto, amino_amino_pb) var tendermint_types_types_pb = require('../../../tendermint/types/types_pb.js') goog.object.extend(proto, tendermint_types_types_pb) var tendermint_abci_types_pb = require('../../../tendermint/abci/types_pb.js') goog.object.extend(proto, tendermint_abci_types_pb) goog.exportSymbol('proto.cosmos.staking.v1beta1.BondStatus', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.Commission', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.CommissionRates', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.DVPair', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.DVPairs', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.DVVTriplet', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.DVVTriplets', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.Delegation', null, global) goog.exportSymbol( 'proto.cosmos.staking.v1beta1.DelegationResponse', null, global, ) goog.exportSymbol('proto.cosmos.staking.v1beta1.Description', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.HistoricalInfo', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.Infraction', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.Params', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.Pool', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.Redelegation', null, global) goog.exportSymbol( 'proto.cosmos.staking.v1beta1.RedelegationEntry', null, global, ) goog.exportSymbol( 'proto.cosmos.staking.v1beta1.RedelegationEntryResponse', null, global, ) goog.exportSymbol( 'proto.cosmos.staking.v1beta1.RedelegationResponse', null, global, ) goog.exportSymbol( 'proto.cosmos.staking.v1beta1.UnbondingDelegation', null, global, ) goog.exportSymbol( 'proto.cosmos.staking.v1beta1.UnbondingDelegationEntry', null, global, ) goog.exportSymbol('proto.cosmos.staking.v1beta1.ValAddresses', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.Validator', null, global) goog.exportSymbol('proto.cosmos.staking.v1beta1.ValidatorUpdates', 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.staking.v1beta1.HistoricalInfo = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.HistoricalInfo.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.HistoricalInfo, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.HistoricalInfo.displayName = 'proto.cosmos.staking.v1beta1.HistoricalInfo' } /** * 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.staking.v1beta1.CommissionRates = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.CommissionRates, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.CommissionRates.displayName = 'proto.cosmos.staking.v1beta1.CommissionRates' } /** * 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.staking.v1beta1.Commission = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.Commission, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.Commission.displayName = 'proto.cosmos.staking.v1beta1.Commission' } /** * 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.staking.v1beta1.Description = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.Description, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.Description.displayName = 'proto.cosmos.staking.v1beta1.Description' } /** * 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.staking.v1beta1.Validator = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.Validator.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.Validator, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.Validator.displayName = 'proto.cosmos.staking.v1beta1.Validator' } /** * 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.staking.v1beta1.ValAddresses = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.ValAddresses.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.ValAddresses, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.ValAddresses.displayName = 'proto.cosmos.staking.v1beta1.ValAddresses' } /** * 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.staking.v1beta1.DVPair = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.DVPair, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.DVPair.displayName = 'proto.cosmos.staking.v1beta1.DVPair' } /** * 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.staking.v1beta1.DVPairs = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.DVPairs.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.DVPairs, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.DVPairs.displayName = 'proto.cosmos.staking.v1beta1.DVPairs' } /** * 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.staking.v1beta1.DVVTriplet = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.DVVTriplet, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.DVVTriplet.displayName = 'proto.cosmos.staking.v1beta1.DVVTriplet' } /** * 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.staking.v1beta1.DVVTriplets = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.DVVTriplets.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.DVVTriplets, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.DVVTriplets.displayName = 'proto.cosmos.staking.v1beta1.DVVTriplets' } /** * 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.staking.v1beta1.Delegation = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.Delegation, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.Delegation.displayName = 'proto.cosmos.staking.v1beta1.Delegation' } /** * 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.staking.v1beta1.UnbondingDelegation = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.UnbondingDelegation.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.UnbondingDelegation, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.UnbondingDelegation.displayName = 'proto.cosmos.staking.v1beta1.UnbondingDelegation' } /** * 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.staking.v1beta1.UnbondingDelegationEntry = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.cosmos.staking.v1beta1.UnbondingDelegationEntry, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.displayName = 'proto.cosmos.staking.v1beta1.UnbondingDelegationEntry' } /** * 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.staking.v1beta1.RedelegationEntry = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.RedelegationEntry, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.RedelegationEntry.displayName = 'proto.cosmos.staking.v1beta1.RedelegationEntry' } /** * 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.staking.v1beta1.Redelegation = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.Redelegation.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.Redelegation, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.Redelegation.displayName = 'proto.cosmos.staking.v1beta1.Redelegation' } /** * 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.staking.v1beta1.Params = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.Params, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.Params.displayName = 'proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.DelegationResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.DelegationResponse, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.DelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.DelegationResponse' } /** * 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.staking.v1beta1.RedelegationEntryResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.cosmos.staking.v1beta1.RedelegationEntryResponse, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.RedelegationEntryResponse.displayName = 'proto.cosmos.staking.v1beta1.RedelegationEntryResponse' } /** * 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.staking.v1beta1.RedelegationResponse = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.RedelegationResponse.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.RedelegationResponse, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.RedelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.RedelegationResponse' } /** * 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.staking.v1beta1.Pool = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.staking.v1beta1.Pool, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.Pool.displayName = 'proto.cosmos.staking.v1beta1.Pool' } /** * 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.staking.v1beta1.ValidatorUpdates = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.ValidatorUpdates.repeatedFields_, null, ) } goog.inherits(proto.cosmos.staking.v1beta1.ValidatorUpdates, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.staking.v1beta1.ValidatorUpdates.displayName = 'proto.cosmos.staking.v1beta1.ValidatorUpdates' } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.staking.v1beta1.HistoricalInfo.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.cosmos.staking.v1beta1.HistoricalInfo.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.staking.v1beta1.HistoricalInfo.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.staking.v1beta1.HistoricalInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.HistoricalInfo.toObject = function ( includeInstance, msg, ) { var f, obj = { header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), valsetList: jspb.Message.toObjectList( msg.getValsetList(), proto.cosmos.staking.v1beta1.Validator.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.staking.v1beta1.HistoricalInfo} */ proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.staking.v1beta1.HistoricalInfo() return proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.staking.v1beta1.HistoricalInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} */ proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = new tendermint_types_types_pb.Header() reader.readMessage( value, tendermint_types_types_pb.Header.deserializeBinaryFromReader, ) msg.setHeader(value) break case 2: var value = new proto.cosmos.staking.v1beta1.Validator() reader.readMessage( value, proto.cosmos.staking.v1beta1.Validator.deserializeBinaryFromReader, ) msg.addValset(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.staking.v1beta1.HistoricalInfo.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.staking.v1beta1.HistoricalInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.HistoricalInfo.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getHeader() if (f != null) { writer.writeMessage( 1, f, tendermint_types_types_pb.Header.serializeBinaryToWriter, ) } f = message.getValsetList() if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.cosmos.staking.v1beta1.Validator.serializeBinaryToWriter, ) } } /** * optional tendermint.types.Header header = 1; * @return {?proto.tendermint.types.Header} */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.getHeader = function () { return /** @type{?proto.tendermint.types.Header} */ ( jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 1) ) } /** * @param {?proto.tendermint.types.Header|undefined} value * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.setHeader = function ( value, ) { return jspb.Message.setWrapperField(this, 1, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.clearHeader = function () { return this.setHeader(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.hasHeader = function () { return jspb.Message.getField(this, 1) != null } /** * repeated Validator valset = 2; * @return {!Array<!proto.cosmos.staking.v1beta1.Validator>} */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.getValsetList = function () { return /** @type{!Array<!proto.cosmos.staking.v1beta1.Validator>} */ ( jspb.Message.getRepeatedWrapperField( this, proto.cosmos.staking.v1beta1.Validator, 2, ) ) } /** * @param {!Array<!proto.cosmos.staking.v1beta1.Validator>} value * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.setValsetList = function ( value, ) { return jspb.Message.setRepeatedWrapperField(this, 2, value) } /** * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.staking.v1beta1.Validator} */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.addValset = function ( opt_value, opt_index, ) { return jspb.Message.addToRepeatedWrapperField( this, 2, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this */ proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.clearValsetList = function () { return this.setValsetList([]) } 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.staking.v1beta1.CommissionRates.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.staking.v1beta1.CommissionRates.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.staking.v1beta1.CommissionRates} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.CommissionRates.toObject = function ( includeInstance, msg, ) { var f, obj = { rate: jspb.Message.getFieldWithDefault(msg, 1, ''), maxRate: jspb.Message.getFieldWithDefault(msg, 2, ''), maxChangeRate: jspb.Message.getFieldWithDefault(msg, 3, ''), } 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.staking.v1beta1.CommissionRates} */ proto.cosmos.staking.v1beta1.CommissionRates.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.staking.v1beta1.CommissionRates() return proto.cosmos.staking.v1beta1.CommissionRates.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.staking.v1beta1.CommissionRates} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.staking.v1beta1.CommissionRates} */ proto.cosmos.staking.v1beta1.CommissionRates.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.setRate(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.setMaxRate(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.setMaxChangeRate(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.staking.v1beta1.CommissionRates.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.staking.v1beta1.CommissionRates.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.staking.v1beta1.CommissionRates} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.CommissionRates.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getRate() if (f.length > 0) { writer.writeString(1, f) } f = message.getMaxRate() if (f.length > 0) { writer.writeString(2, f) } f = message.getMaxChangeRate() if (f.length > 0) { writer.writeString(3, f) } } /** * optional string rate = 1; * @return {string} */ proto.cosmos.staking.v1beta1.CommissionRates.prototype.getRate = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this */ proto.cosmos.staking.v1beta1.CommissionRates.prototype.setRate = function ( value, ) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string max_rate = 2; * @return {string} */ proto.cosmos.staking.v1beta1.CommissionRates.prototype.getMaxRate = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this */ proto.cosmos.staking.v1beta1.CommissionRates.prototype.setMaxRate = function ( value, ) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional string max_change_rate = 3; * @return {string} */ proto.cosmos.staking.v1beta1.CommissionRates.prototype.getMaxChangeRate = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) } /** * @param {string} value * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this */ proto.cosmos.staking.v1beta1.CommissionRates.prototype.setMaxChangeRate = function (value) { return jspb.Message.setProto3StringField(this, 3, 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.staking.v1beta1.Commission.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.staking.v1beta1.Commission.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.staking.v1beta1.Commission} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.Commission.toObject = function ( includeInstance, msg, ) { var f, obj = { commissionRates: (f = msg.getCommissionRates()) && proto.cosmos.staking.v1beta1.CommissionRates.toObject( includeInstance, f, ), updateTime: (f = msg.getUpdateTime()) && google_protobuf_timestamp_pb.Timestamp.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.staking.v1beta1.Commission} */ proto.cosmos.staking.v1beta1.Commission.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.staking.v1beta1.Commission() return proto.cosmos.staking.v1beta1.Commission.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.staking.v1beta1.Commission} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.staking.v1beta1.Commission} */ proto.cosmos.staking.v1beta1.Commission.deserializeBinaryFromReader = function ( msg, reader, ) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = new proto.cosmos.staking.v1beta1.CommissionRates() reader.readMessage( value, proto.cosmos.staking.v1beta1.CommissionRates .deserializeBinaryFromReader, ) msg.setCommissionRates(value) break case 2: var value = new google_protobuf_timestamp_pb.Timestamp() reader.readMessage( value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader, ) msg.setUpdateTime(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.staking.v1beta1.Commission.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.staking.v1beta1.Commission.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.staking.v1beta1.Commission} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.Commission.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getCommissionRates() if (f != null) { writer.writeMessage( 1, f, proto.cosmos.staking.v1beta1.CommissionRates.serializeBinaryToWriter, ) } f = message.getUpdateTime() if (f != null) { writer.writeMessage( 2, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter, ) } } /** * optional CommissionRates commission_rates = 1; * @return {?proto.cosmos.staking.v1beta1.CommissionRates} */ proto.cosmos.staking.v1beta1.Commission.prototype.getCommissionRates = function () { return /** @type{?proto.cosmos.staking.v1beta1.CommissionRates} */ ( jspb.Message.getWrapperField( this, proto.cosmos.staking.v1beta1.CommissionRates, 1, ) ) } /** * @param {?proto.cosmos.staking.v1beta1.CommissionRates|undefined} value * @return {!proto.cosmos.staking.v1beta1.Commission} returns this */ proto.cosmos.staking.v1beta1.Commission.prototype.setCommissionRates = function (value) { return jspb.Message.setWrapperField(this, 1, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.staking.v1beta1.Commission} returns this */ proto.cosmos.staking.v1beta1.Commission.prototype.clearCommissionRates = function () { return this.setCommissionRates(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.staking.v1beta1.Commission.prototype.hasCommissionRates = function () { return jspb.Message.getField(this, 1) != null } /** * optional google.protobuf.Timestamp update_time = 2; * @return {?proto.google.protobuf.Timestamp} */ proto.cosmos.staking.v1beta1.Commission.prototype.getUpdateTime = function () { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField( this, google_protobuf_timestamp_pb.Timestamp, 2, ) ) } /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.cosmos.staking.v1beta1.Commission} returns this */ proto.cosmos.staking.v1beta1.Commission.prototype.setUpdateTime = function ( value, ) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.staking.v1beta1.Commission} returns this */ proto.cosmos.staking.v1beta1.Commission.prototype.clearUpdateTime = function () { return this.setUpdateTime(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.staking.v1beta1.Commission.prototype.hasUpdateTime = 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.cosmos.staking.v1beta1.Description.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.staking.v1beta1.Description.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.staking.v1beta1.Description} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.Description.toObject = function ( includeInstance, msg, ) { var f, obj = { moniker: jspb.Message.getFieldWithDefault(msg, 1, ''), identity: jspb.Message.getFieldWithDefault(msg, 2, ''), website: jspb.Message.getFieldWithDefault(msg, 3, ''), securityContact: jspb.Message.getFieldWithDefault(msg, 4, ''), details: jspb.Message.getFieldWithDefault(msg, 5, ''), } 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.staking.v1beta1.Description} */ proto.cosmos.staking.v1beta1.Description.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.staking.v1beta1.Description() return proto.cosmos.staking.v1beta1.Description.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.staking.v1beta1.Description} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.staking.v1beta1.Description} */ proto.cosmos.staking.v1beta1.Description.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.setMoniker(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.setIdentity(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.setWebsite(value) break case 4: var value = /** @type {string} */ (reader.readString()) msg.setSecurityContact(value) break case 5: var value = /** @type {string} */ (reader.readString()) msg.setDetails(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.staking.v1beta1.Description.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.staking.v1beta1.Description.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.staking.v1beta1.Description} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.Description.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getMoniker() if (f.length > 0) { writer.writeString(1, f) } f = message.getIdentity() if (f.length > 0) { writer.writeString(2, f) } f = message.getWebsite() if (f.length > 0) { writer.writeString(3, f) } f = message.getSecurityContact() if (f.length > 0) { writer.writeString(4, f) } f = message.getDetails() if (f.length > 0) { writer.writeString(5, f) } } /** * optional string moniker = 1; * @return {string} */ proto.cosmos.staking.v1beta1.Description.prototype.getMoniker = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.staking.v1beta1.Description} returns this */ proto.cosmos.staking.v1beta1.Description.prototype.setMoniker = function ( value, ) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string identity = 2; * @return {string} */ proto.cosmos.staking.v1beta1.Description.prototype.getIdentity = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.cosmos.staking.v1beta1.Description} returns this */ proto.cosmos.staking.v1beta1.Description.prototype.setIdentity = function ( value, ) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional string website = 3; * @return {string} */ proto.cosmos.staking.v1beta1.Description.prototype.getWebsite = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) } /** * @param {string} value * @return {!proto.cosmos.staking.v1beta1.Description} returns this */ proto.cosmos.staking.v1beta1.Description.prototype.setWebsite = function ( value, ) { return jspb.Message.setProto3StringField(this, 3, value) } /** * optional string security_contact = 4; * @return {string} */ proto.cosmos.staking.v1beta1.Description.prototype.getSecurityContact = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, '')) } /** * @param {string} value * @return {!proto.cosmos.staking.v1beta1.Description} returns this */ proto.cosmos.staking.v1beta1.Description.prototype.setSecurityContact = function (value) { return jspb.Message.setProto3StringField(this, 4, value) } /** * optional string details = 5; * @return {string} */ proto.cosmos.staking.v1beta1.Description.prototype.getDetails = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) } /** * @param {string} value * @return {!proto.cosmos.staking.v1beta1.Description} returns this */ proto.cosmos.staking.v1beta1.Description.prototype.setDetails = function ( value, ) { return jspb.Message.setProto3StringField(this, 5, value) } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.staking.v1beta1.Validator.repeatedFields_ = [13] 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.staking.v1beta1.Validator.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.staking.v1beta1.Validator.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.staking.v1beta1.Validator} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.staking.v1beta1.Validator.toObject = function ( includeInstance, msg, ) { var f, obj = { operatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ''), consensusPubkey: (f = msg.getConsensusPubkey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), jailed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), status: jspb.Message.getFieldWithDefault(msg, 4, 0), tokens: jspb.Message.getFieldWithDefault(msg, 5, ''), delegatorShares: jspb.Message.getFieldWithDefault(msg, 6, ''), description: (f = msg.getDescription())