UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

1,276 lines (1,100 loc) 39.5 kB
// source: tendermint/types/params.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_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); goog.exportSymbol('proto.tendermint.types.BlockParams', null, global); goog.exportSymbol('proto.tendermint.types.ConsensusParams', null, global); goog.exportSymbol('proto.tendermint.types.EvidenceParams', null, global); goog.exportSymbol('proto.tendermint.types.HashedParams', null, global); goog.exportSymbol('proto.tendermint.types.ValidatorParams', null, global); goog.exportSymbol('proto.tendermint.types.VersionParams', 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.tendermint.types.ConsensusParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tendermint.types.ConsensusParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tendermint.types.ConsensusParams.displayName = 'proto.tendermint.types.ConsensusParams'; } /** * 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.tendermint.types.BlockParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tendermint.types.BlockParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tendermint.types.BlockParams.displayName = 'proto.tendermint.types.BlockParams'; } /** * 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.tendermint.types.EvidenceParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tendermint.types.EvidenceParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tendermint.types.EvidenceParams.displayName = 'proto.tendermint.types.EvidenceParams'; } /** * 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.tendermint.types.ValidatorParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ValidatorParams.repeatedFields_, null); }; goog.inherits(proto.tendermint.types.ValidatorParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tendermint.types.ValidatorParams.displayName = 'proto.tendermint.types.ValidatorParams'; } /** * 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.tendermint.types.VersionParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tendermint.types.VersionParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tendermint.types.VersionParams.displayName = 'proto.tendermint.types.VersionParams'; } /** * 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.tendermint.types.HashedParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tendermint.types.HashedParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tendermint.types.HashedParams.displayName = 'proto.tendermint.types.HashedParams'; } 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.tendermint.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { return proto.tendermint.types.ConsensusParams.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.tendermint.types.ConsensusParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.ConsensusParams.toObject = function(includeInstance, msg) { var f, obj = { block: (f = msg.getBlock()) && proto.tendermint.types.BlockParams.toObject(includeInstance, f), evidence: (f = msg.getEvidence()) && proto.tendermint.types.EvidenceParams.toObject(includeInstance, f), validator: (f = msg.getValidator()) && proto.tendermint.types.ValidatorParams.toObject(includeInstance, f), version: (f = msg.getVersion()) && proto.tendermint.types.VersionParams.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.tendermint.types.ConsensusParams} */ proto.tendermint.types.ConsensusParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tendermint.types.ConsensusParams; return proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tendermint.types.ConsensusParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tendermint.types.ConsensusParams} */ proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.tendermint.types.BlockParams; reader.readMessage(value,proto.tendermint.types.BlockParams.deserializeBinaryFromReader); msg.setBlock(value); break; case 2: var value = new proto.tendermint.types.EvidenceParams; reader.readMessage(value,proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader); msg.setEvidence(value); break; case 3: var value = new proto.tendermint.types.ValidatorParams; reader.readMessage(value,proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader); msg.setValidator(value); break; case 4: var value = new proto.tendermint.types.VersionParams; reader.readMessage(value,proto.tendermint.types.VersionParams.deserializeBinaryFromReader); msg.setVersion(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tendermint.types.ConsensusParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tendermint.types.ConsensusParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tendermint.types.ConsensusParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.ConsensusParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBlock(); if (f != null) { writer.writeMessage( 1, f, proto.tendermint.types.BlockParams.serializeBinaryToWriter ); } f = message.getEvidence(); if (f != null) { writer.writeMessage( 2, f, proto.tendermint.types.EvidenceParams.serializeBinaryToWriter ); } f = message.getValidator(); if (f != null) { writer.writeMessage( 3, f, proto.tendermint.types.ValidatorParams.serializeBinaryToWriter ); } f = message.getVersion(); if (f != null) { writer.writeMessage( 4, f, proto.tendermint.types.VersionParams.serializeBinaryToWriter ); } }; /** * optional BlockParams block = 1; * @return {?proto.tendermint.types.BlockParams} */ proto.tendermint.types.ConsensusParams.prototype.getBlock = function() { return /** @type{?proto.tendermint.types.BlockParams} */ ( jspb.Message.getWrapperField(this, proto.tendermint.types.BlockParams, 1)); }; /** * @param {?proto.tendermint.types.BlockParams|undefined} value * @return {!proto.tendermint.types.ConsensusParams} returns this */ proto.tendermint.types.ConsensusParams.prototype.setBlock = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.tendermint.types.ConsensusParams} returns this */ proto.tendermint.types.ConsensusParams.prototype.clearBlock = function() { return this.setBlock(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.tendermint.types.ConsensusParams.prototype.hasBlock = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional EvidenceParams evidence = 2; * @return {?proto.tendermint.types.EvidenceParams} */ proto.tendermint.types.ConsensusParams.prototype.getEvidence = function() { return /** @type{?proto.tendermint.types.EvidenceParams} */ ( jspb.Message.getWrapperField(this, proto.tendermint.types.EvidenceParams, 2)); }; /** * @param {?proto.tendermint.types.EvidenceParams|undefined} value * @return {!proto.tendermint.types.ConsensusParams} returns this */ proto.tendermint.types.ConsensusParams.prototype.setEvidence = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.tendermint.types.ConsensusParams} returns this */ proto.tendermint.types.ConsensusParams.prototype.clearEvidence = function() { return this.setEvidence(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.tendermint.types.ConsensusParams.prototype.hasEvidence = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional ValidatorParams validator = 3; * @return {?proto.tendermint.types.ValidatorParams} */ proto.tendermint.types.ConsensusParams.prototype.getValidator = function() { return /** @type{?proto.tendermint.types.ValidatorParams} */ ( jspb.Message.getWrapperField(this, proto.tendermint.types.ValidatorParams, 3)); }; /** * @param {?proto.tendermint.types.ValidatorParams|undefined} value * @return {!proto.tendermint.types.ConsensusParams} returns this */ proto.tendermint.types.ConsensusParams.prototype.setValidator = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.tendermint.types.ConsensusParams} returns this */ proto.tendermint.types.ConsensusParams.prototype.clearValidator = function() { return this.setValidator(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.tendermint.types.ConsensusParams.prototype.hasValidator = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional VersionParams version = 4; * @return {?proto.tendermint.types.VersionParams} */ proto.tendermint.types.ConsensusParams.prototype.getVersion = function() { return /** @type{?proto.tendermint.types.VersionParams} */ ( jspb.Message.getWrapperField(this, proto.tendermint.types.VersionParams, 4)); }; /** * @param {?proto.tendermint.types.VersionParams|undefined} value * @return {!proto.tendermint.types.ConsensusParams} returns this */ proto.tendermint.types.ConsensusParams.prototype.setVersion = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.tendermint.types.ConsensusParams} returns this */ proto.tendermint.types.ConsensusParams.prototype.clearVersion = function() { return this.setVersion(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.tendermint.types.ConsensusParams.prototype.hasVersion = function() { return jspb.Message.getField(this, 4) != 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.tendermint.types.BlockParams.prototype.toObject = function(opt_includeInstance) { return proto.tendermint.types.BlockParams.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.tendermint.types.BlockParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.BlockParams.toObject = function(includeInstance, msg) { var f, obj = { maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), maxGas: 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.tendermint.types.BlockParams} */ proto.tendermint.types.BlockParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tendermint.types.BlockParams; return proto.tendermint.types.BlockParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tendermint.types.BlockParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tendermint.types.BlockParams} */ proto.tendermint.types.BlockParams.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setMaxBytes(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setMaxGas(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tendermint.types.BlockParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tendermint.types.BlockParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tendermint.types.BlockParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.BlockParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMaxBytes(); if (f !== 0) { writer.writeInt64( 1, f ); } f = message.getMaxGas(); if (f !== 0) { writer.writeInt64( 2, f ); } }; /** * optional int64 max_bytes = 1; * @return {number} */ proto.tendermint.types.BlockParams.prototype.getMaxBytes = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.tendermint.types.BlockParams} returns this */ proto.tendermint.types.BlockParams.prototype.setMaxBytes = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int64 max_gas = 2; * @return {number} */ proto.tendermint.types.BlockParams.prototype.getMaxGas = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.tendermint.types.BlockParams} returns this */ proto.tendermint.types.BlockParams.prototype.setMaxGas = function(value) { return jspb.Message.setProto3IntField(this, 2, 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.tendermint.types.EvidenceParams.prototype.toObject = function(opt_includeInstance) { return proto.tendermint.types.EvidenceParams.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.tendermint.types.EvidenceParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.EvidenceParams.toObject = function(includeInstance, msg) { var f, obj = { maxAgeNumBlocks: jspb.Message.getFieldWithDefault(msg, 1, 0), maxAgeDuration: (f = msg.getMaxAgeDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), maxBytes: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.tendermint.types.EvidenceParams} */ proto.tendermint.types.EvidenceParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tendermint.types.EvidenceParams; return proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tendermint.types.EvidenceParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tendermint.types.EvidenceParams} */ proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setMaxAgeNumBlocks(value); break; case 2: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setMaxAgeDuration(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setMaxBytes(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tendermint.types.EvidenceParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tendermint.types.EvidenceParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tendermint.types.EvidenceParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.EvidenceParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMaxAgeNumBlocks(); if (f !== 0) { writer.writeInt64( 1, f ); } f = message.getMaxAgeDuration(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } f = message.getMaxBytes(); if (f !== 0) { writer.writeInt64( 3, f ); } }; /** * optional int64 max_age_num_blocks = 1; * @return {number} */ proto.tendermint.types.EvidenceParams.prototype.getMaxAgeNumBlocks = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.tendermint.types.EvidenceParams} returns this */ proto.tendermint.types.EvidenceParams.prototype.setMaxAgeNumBlocks = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional google.protobuf.Duration max_age_duration = 2; * @return {?proto.google.protobuf.Duration} */ proto.tendermint.types.EvidenceParams.prototype.getMaxAgeDuration = function() { return /** @type{?proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); }; /** * @param {?proto.google.protobuf.Duration|undefined} value * @return {!proto.tendermint.types.EvidenceParams} returns this */ proto.tendermint.types.EvidenceParams.prototype.setMaxAgeDuration = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.tendermint.types.EvidenceParams} returns this */ proto.tendermint.types.EvidenceParams.prototype.clearMaxAgeDuration = function() { return this.setMaxAgeDuration(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.tendermint.types.EvidenceParams.prototype.hasMaxAgeDuration = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional int64 max_bytes = 3; * @return {number} */ proto.tendermint.types.EvidenceParams.prototype.getMaxBytes = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.tendermint.types.EvidenceParams} returns this */ proto.tendermint.types.EvidenceParams.prototype.setMaxBytes = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.tendermint.types.ValidatorParams.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.tendermint.types.ValidatorParams.prototype.toObject = function(opt_includeInstance) { return proto.tendermint.types.ValidatorParams.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.tendermint.types.ValidatorParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.ValidatorParams.toObject = function(includeInstance, msg) { var f, obj = { pubKeyTypesList: (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.tendermint.types.ValidatorParams} */ proto.tendermint.types.ValidatorParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tendermint.types.ValidatorParams; return proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tendermint.types.ValidatorParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tendermint.types.ValidatorParams} */ proto.tendermint.types.ValidatorParams.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.addPubKeyTypes(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tendermint.types.ValidatorParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tendermint.types.ValidatorParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tendermint.types.ValidatorParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.ValidatorParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPubKeyTypesList(); if (f.length > 0) { writer.writeRepeatedString( 1, f ); } }; /** * repeated string pub_key_types = 1; * @return {!Array<string>} */ proto.tendermint.types.ValidatorParams.prototype.getPubKeyTypesList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array<string>} value * @return {!proto.tendermint.types.ValidatorParams} returns this */ proto.tendermint.types.ValidatorParams.prototype.setPubKeyTypesList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.tendermint.types.ValidatorParams} returns this */ proto.tendermint.types.ValidatorParams.prototype.addPubKeyTypes = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.tendermint.types.ValidatorParams} returns this */ proto.tendermint.types.ValidatorParams.prototype.clearPubKeyTypesList = function() { return this.setPubKeyTypesList([]); }; 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.tendermint.types.VersionParams.prototype.toObject = function(opt_includeInstance) { return proto.tendermint.types.VersionParams.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.tendermint.types.VersionParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.VersionParams.toObject = function(includeInstance, msg) { var f, obj = { app: jspb.Message.getFieldWithDefault(msg, 1, 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.tendermint.types.VersionParams} */ proto.tendermint.types.VersionParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tendermint.types.VersionParams; return proto.tendermint.types.VersionParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tendermint.types.VersionParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tendermint.types.VersionParams} */ proto.tendermint.types.VersionParams.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.setApp(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tendermint.types.VersionParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tendermint.types.VersionParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tendermint.types.VersionParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.VersionParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getApp(); if (f !== 0) { writer.writeUint64( 1, f ); } }; /** * optional uint64 app = 1; * @return {number} */ proto.tendermint.types.VersionParams.prototype.getApp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.tendermint.types.VersionParams} returns this */ proto.tendermint.types.VersionParams.prototype.setApp = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.tendermint.types.HashedParams.prototype.toObject = function(opt_includeInstance) { return proto.tendermint.types.HashedParams.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.tendermint.types.HashedParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.HashedParams.toObject = function(includeInstance, msg) { var f, obj = { blockMaxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), blockMaxGas: 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.tendermint.types.HashedParams} */ proto.tendermint.types.HashedParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tendermint.types.HashedParams; return proto.tendermint.types.HashedParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tendermint.types.HashedParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tendermint.types.HashedParams} */ proto.tendermint.types.HashedParams.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setBlockMaxBytes(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setBlockMaxGas(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tendermint.types.HashedParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tendermint.types.HashedParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tendermint.types.HashedParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tendermint.types.HashedParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBlockMaxBytes(); if (f !== 0) { writer.writeInt64( 1, f ); } f = message.getBlockMaxGas(); if (f !== 0) { writer.writeInt64( 2, f ); } }; /** * optional int64 block_max_bytes = 1; * @return {number} */ proto.tendermint.types.HashedParams.prototype.getBlockMaxBytes = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.tendermint.types.HashedParams} returns this */ proto.tendermint.types.HashedParams.prototype.setBlockMaxBytes = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int64 block_max_gas = 2; * @return {number} */ proto.tendermint.types.HashedParams.prototype.getBlockMaxGas = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.tendermint.types.HashedParams} returns this */ proto.tendermint.types.HashedParams.prototype.setBlockMaxGas = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; goog.object.extend(exports, proto.tendermint.types);