@routerprotocol/chain-api
Version:
Router Chain API Query client with generated gRPC bindings.
453 lines (389 loc) • 14.9 kB
JavaScript
// source: cosmos/consensus/v1/tx.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js');
goog.object.extend(proto, cosmos_msg_v1_msg_pb);
var tendermint_types_params_pb = require('../../../tendermint/types/params_pb.js');
goog.object.extend(proto, tendermint_types_params_pb);
goog.exportSymbol('proto.cosmos.consensus.v1.MsgUpdateParams', null, global);
goog.exportSymbol('proto.cosmos.consensus.v1.MsgUpdateParamsResponse', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.cosmos.consensus.v1.MsgUpdateParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.consensus.v1.MsgUpdateParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.consensus.v1.MsgUpdateParams.displayName = 'proto.cosmos.consensus.v1.MsgUpdateParams';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.cosmos.consensus.v1.MsgUpdateParamsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.consensus.v1.MsgUpdateParamsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.consensus.v1.MsgUpdateParamsResponse.displayName = 'proto.cosmos.consensus.v1.MsgUpdateParamsResponse';
}
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.consensus.v1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.consensus.v1.MsgUpdateParams.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.cosmos.consensus.v1.MsgUpdateParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.consensus.v1.MsgUpdateParams.toObject = function(includeInstance, msg) {
var f, obj = {
authority: jspb.Message.getFieldWithDefault(msg, 1, ""),
block: (f = msg.getBlock()) && tendermint_types_params_pb.BlockParams.toObject(includeInstance, f),
evidence: (f = msg.getEvidence()) && tendermint_types_params_pb.EvidenceParams.toObject(includeInstance, f),
validator: (f = msg.getValidator()) && tendermint_types_params_pb.ValidatorParams.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.consensus.v1.MsgUpdateParams}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.consensus.v1.MsgUpdateParams;
return proto.cosmos.consensus.v1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.consensus.v1.MsgUpdateParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.consensus.v1.MsgUpdateParams}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setAuthority(value);
break;
case 2:
var value = new tendermint_types_params_pb.BlockParams;
reader.readMessage(value,tendermint_types_params_pb.BlockParams.deserializeBinaryFromReader);
msg.setBlock(value);
break;
case 3:
var value = new tendermint_types_params_pb.EvidenceParams;
reader.readMessage(value,tendermint_types_params_pb.EvidenceParams.deserializeBinaryFromReader);
msg.setEvidence(value);
break;
case 4:
var value = new tendermint_types_params_pb.ValidatorParams;
reader.readMessage(value,tendermint_types_params_pb.ValidatorParams.deserializeBinaryFromReader);
msg.setValidator(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.consensus.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmos.consensus.v1.MsgUpdateParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.consensus.v1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getBlock();
if (f != null) {
writer.writeMessage(
2,
f,
tendermint_types_params_pb.BlockParams.serializeBinaryToWriter
);
}
f = message.getEvidence();
if (f != null) {
writer.writeMessage(
3,
f,
tendermint_types_params_pb.EvidenceParams.serializeBinaryToWriter
);
}
f = message.getValidator();
if (f != null) {
writer.writeMessage(
4,
f,
tendermint_types_params_pb.ValidatorParams.serializeBinaryToWriter
);
}
};
/**
* optional string authority = 1;
* @return {string}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.getAuthority = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.setAuthority = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional tendermint.types.BlockParams block = 2;
* @return {?proto.tendermint.types.BlockParams}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.getBlock = function() {
return /** @type{?proto.tendermint.types.BlockParams} */ (
jspb.Message.getWrapperField(this, tendermint_types_params_pb.BlockParams, 2));
};
/**
* @param {?proto.tendermint.types.BlockParams|undefined} value
* @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.setBlock = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.clearBlock = function() {
return this.setBlock(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.hasBlock = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional tendermint.types.EvidenceParams evidence = 3;
* @return {?proto.tendermint.types.EvidenceParams}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.getEvidence = function() {
return /** @type{?proto.tendermint.types.EvidenceParams} */ (
jspb.Message.getWrapperField(this, tendermint_types_params_pb.EvidenceParams, 3));
};
/**
* @param {?proto.tendermint.types.EvidenceParams|undefined} value
* @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.setEvidence = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.clearEvidence = function() {
return this.setEvidence(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.hasEvidence = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional tendermint.types.ValidatorParams validator = 4;
* @return {?proto.tendermint.types.ValidatorParams}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.getValidator = function() {
return /** @type{?proto.tendermint.types.ValidatorParams} */ (
jspb.Message.getWrapperField(this, tendermint_types_params_pb.ValidatorParams, 4));
};
/**
* @param {?proto.tendermint.types.ValidatorParams|undefined} value
* @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.setValidator = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.clearValidator = function() {
return this.setValidator(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.consensus.v1.MsgUpdateParams.prototype.hasValidator = 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.cosmos.consensus.v1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.consensus.v1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.cosmos.consensus.v1.MsgUpdateParamsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.consensus.v1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.consensus.v1.MsgUpdateParamsResponse}
*/
proto.cosmos.consensus.v1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.consensus.v1.MsgUpdateParamsResponse;
return proto.cosmos.consensus.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.consensus.v1.MsgUpdateParamsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.consensus.v1.MsgUpdateParamsResponse}
*/
proto.cosmos.consensus.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.consensus.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.consensus.v1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmos.consensus.v1.MsgUpdateParamsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.consensus.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
goog.object.extend(exports, proto.cosmos.consensus.v1);