@kaiachain/kss-bridges-celer
Version:
TypeScript client and use-cases for cBridge
1,876 lines • 66.2 kB
JavaScript
// source: sgn/distribution/v1/genesis.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() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js');
goog.object.extend(proto, cosmos_base_v1beta1_coin_pb);
var sgn_distribution_v1_distribution_pb = require('../../../sgn/distribution/v1/distribution_pb.js');
goog.object.extend(proto, sgn_distribution_v1_distribution_pb);
goog.exportSymbol('proto.sgn.distribution.v1.DelegatorStartingInfoRecord', null, global);
goog.exportSymbol('proto.sgn.distribution.v1.DelegatorWithdrawInfo', null, global);
goog.exportSymbol('proto.sgn.distribution.v1.GenesisState', null, global);
goog.exportSymbol('proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord', null, global);
goog.exportSymbol('proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord', null, global);
goog.exportSymbol('proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord', null, global);
goog.exportSymbol('proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord', 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.sgn.distribution.v1.DelegatorWithdrawInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.distribution.v1.DelegatorWithdrawInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.displayName = 'proto.sgn.distribution.v1.DelegatorWithdrawInfo';
}
/**
* 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.sgn.distribution.v1.ValidatorOutstandingRewardsRecord = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.repeatedFields_, null);
};
goog.inherits(proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.displayName = 'proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord';
}
/**
* 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.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.displayName = 'proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord';
}
/**
* 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.sgn.distribution.v1.ValidatorHistoricalRewardsRecord = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.displayName = 'proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord';
}
/**
* 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.sgn.distribution.v1.ValidatorCurrentRewardsRecord = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.displayName = 'proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord';
}
/**
* 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.sgn.distribution.v1.DelegatorStartingInfoRecord = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.distribution.v1.DelegatorStartingInfoRecord, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.displayName = 'proto.sgn.distribution.v1.DelegatorStartingInfoRecord';
}
/**
* 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.sgn.distribution.v1.GenesisState = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.distribution.v1.GenesisState.repeatedFields_, null);
};
goog.inherits(proto.sgn.distribution.v1.GenesisState, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.distribution.v1.GenesisState.displayName = 'proto.sgn.distribution.v1.GenesisState';
}
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.sgn.distribution.v1.DelegatorWithdrawInfo.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.distribution.v1.DelegatorWithdrawInfo.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.sgn.distribution.v1.DelegatorWithdrawInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.toObject = function(includeInstance, msg) {
var f, obj = {
delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
withdrawAddress: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.sgn.distribution.v1.DelegatorWithdrawInfo}
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.distribution.v1.DelegatorWithdrawInfo;
return proto.sgn.distribution.v1.DelegatorWithdrawInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.distribution.v1.DelegatorWithdrawInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.distribution.v1.DelegatorWithdrawInfo}
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.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.setDelegatorAddress(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setWithdrawAddress(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.distribution.v1.DelegatorWithdrawInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.distribution.v1.DelegatorWithdrawInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDelegatorAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getWithdrawAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string delegator_address = 1;
* @return {string}
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.prototype.getDelegatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.DelegatorWithdrawInfo} returns this
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.prototype.setDelegatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string withdraw_address = 2;
* @return {string}
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.prototype.getWithdrawAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.DelegatorWithdrawInfo} returns this
*/
proto.sgn.distribution.v1.DelegatorWithdrawInfo.prototype.setWithdrawAddress = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.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.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.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.sgn.distribution.v1.ValidatorOutstandingRewardsRecord} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.toObject = function(includeInstance, msg) {
var f, obj = {
validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
outstandingRewardsList: jspb.Message.toObjectList(msg.getOutstandingRewardsList(),
cosmos_base_v1beta1_coin_pb.DecCoin.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.sgn.distribution.v1.ValidatorOutstandingRewardsRecord}
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord;
return proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord}
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.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.setValidatorAddress(value);
break;
case 2:
var value = new cosmos_base_v1beta1_coin_pb.DecCoin;
reader.readMessage(value,cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader);
msg.addOutstandingRewards(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValidatorAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getOutstandingRewardsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter
);
}
};
/**
* optional string validator_address = 1;
* @return {string}
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.prototype.getValidatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.prototype.setValidatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2;
* @return {!Array<!proto.cosmos.base.v1beta1.DecCoin>}
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.prototype.getOutstandingRewardsList = function() {
return /** @type{!Array<!proto.cosmos.base.v1beta1.DecCoin>} */ (
jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 2));
};
/**
* @param {!Array<!proto.cosmos.base.v1beta1.DecCoin>} value
* @return {!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.prototype.setOutstandingRewardsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.base.v1beta1.DecCoin}
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.prototype.addOutstandingRewards = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.DecCoin, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.prototype.clearOutstandingRewardsList = function() {
return this.setOutstandingRewardsList([]);
};
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.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.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.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.toObject = function(includeInstance, msg) {
var f, obj = {
validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
accumulated: (f = msg.getAccumulated()) && sgn_distribution_v1_distribution_pb.ValidatorAccumulatedCommission.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.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord}
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord;
return proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord}
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.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.setValidatorAddress(value);
break;
case 2:
var value = new sgn_distribution_v1_distribution_pb.ValidatorAccumulatedCommission;
reader.readMessage(value,sgn_distribution_v1_distribution_pb.ValidatorAccumulatedCommission.deserializeBinaryFromReader);
msg.setAccumulated(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValidatorAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAccumulated();
if (f != null) {
writer.writeMessage(
2,
f,
sgn_distribution_v1_distribution_pb.ValidatorAccumulatedCommission.serializeBinaryToWriter
);
}
};
/**
* optional string validator_address = 1;
* @return {string}
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.prototype.getValidatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.prototype.setValidatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional ValidatorAccumulatedCommission accumulated = 2;
* @return {?proto.sgn.distribution.v1.ValidatorAccumulatedCommission}
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.prototype.getAccumulated = function() {
return /** @type{?proto.sgn.distribution.v1.ValidatorAccumulatedCommission} */ (
jspb.Message.getWrapperField(this, sgn_distribution_v1_distribution_pb.ValidatorAccumulatedCommission, 2));
};
/**
* @param {?proto.sgn.distribution.v1.ValidatorAccumulatedCommission|undefined} value
* @return {!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.prototype.setAccumulated = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.prototype.clearAccumulated = function() {
return this.setAccumulated(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.prototype.hasAccumulated = 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.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.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.sgn.distribution.v1.ValidatorHistoricalRewardsRecord} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.toObject = function(includeInstance, msg) {
var f, obj = {
validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
period: jspb.Message.getFieldWithDefault(msg, 2, 0),
rewards: (f = msg.getRewards()) && sgn_distribution_v1_distribution_pb.ValidatorHistoricalRewards.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.sgn.distribution.v1.ValidatorHistoricalRewardsRecord}
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord;
return proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord}
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.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.setValidatorAddress(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setPeriod(value);
break;
case 3:
var value = new sgn_distribution_v1_distribution_pb.ValidatorHistoricalRewards;
reader.readMessage(value,sgn_distribution_v1_distribution_pb.ValidatorHistoricalRewards.deserializeBinaryFromReader);
msg.setRewards(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValidatorAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPeriod();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = message.getRewards();
if (f != null) {
writer.writeMessage(
3,
f,
sgn_distribution_v1_distribution_pb.ValidatorHistoricalRewards.serializeBinaryToWriter
);
}
};
/**
* optional string validator_address = 1;
* @return {string}
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.getValidatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.setValidatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional uint64 period = 2;
* @return {number}
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.getPeriod = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.setPeriod = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional ValidatorHistoricalRewards rewards = 3;
* @return {?proto.sgn.distribution.v1.ValidatorHistoricalRewards}
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.getRewards = function() {
return /** @type{?proto.sgn.distribution.v1.ValidatorHistoricalRewards} */ (
jspb.Message.getWrapperField(this, sgn_distribution_v1_distribution_pb.ValidatorHistoricalRewards, 3));
};
/**
* @param {?proto.sgn.distribution.v1.ValidatorHistoricalRewards|undefined} value
* @return {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.setRewards = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.clearRewards = function() {
return this.setRewards(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.prototype.hasRewards = function() {
return jspb.Message.getField(this, 3) != 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.sgn.distribution.v1.ValidatorCurrentRewardsRecord.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.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.sgn.distribution.v1.ValidatorCurrentRewardsRecord} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.toObject = function(includeInstance, msg) {
var f, obj = {
validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
rewards: (f = msg.getRewards()) && sgn_distribution_v1_distribution_pb.ValidatorCurrentRewards.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.sgn.distribution.v1.ValidatorCurrentRewardsRecord}
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord;
return proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord}
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.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.setValidatorAddress(value);
break;
case 2:
var value = new sgn_distribution_v1_distribution_pb.ValidatorCurrentRewards;
reader.readMessage(value,sgn_distribution_v1_distribution_pb.ValidatorCurrentRewards.deserializeBinaryFromReader);
msg.setRewards(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValidatorAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getRewards();
if (f != null) {
writer.writeMessage(
2,
f,
sgn_distribution_v1_distribution_pb.ValidatorCurrentRewards.serializeBinaryToWriter
);
}
};
/**
* optional string validator_address = 1;
* @return {string}
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.prototype.getValidatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.prototype.setValidatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional ValidatorCurrentRewards rewards = 2;
* @return {?proto.sgn.distribution.v1.ValidatorCurrentRewards}
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.prototype.getRewards = function() {
return /** @type{?proto.sgn.distribution.v1.ValidatorCurrentRewards} */ (
jspb.Message.getWrapperField(this, sgn_distribution_v1_distribution_pb.ValidatorCurrentRewards, 2));
};
/**
* @param {?proto.sgn.distribution.v1.ValidatorCurrentRewards|undefined} value
* @return {!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.prototype.setRewards = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord} returns this
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.prototype.clearRewards = function() {
return this.setRewards(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.prototype.hasRewards = 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.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.distribution.v1.DelegatorStartingInfoRecord.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.sgn.distribution.v1.DelegatorStartingInfoRecord} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.toObject = function(includeInstance, msg) {
var f, obj = {
delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""),
startingInfo: (f = msg.getStartingInfo()) && sgn_distribution_v1_distribution_pb.DelegatorStartingInfo.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.sgn.distribution.v1.DelegatorStartingInfoRecord}
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.distribution.v1.DelegatorStartingInfoRecord;
return proto.sgn.distribution.v1.DelegatorStartingInfoRecord.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord}
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.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.setDelegatorAddress(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setValidatorAddress(value);
break;
case 3:
var value = new sgn_distribution_v1_distribution_pb.DelegatorStartingInfo;
reader.readMessage(value,sgn_distribution_v1_distribution_pb.DelegatorStartingInfo.deserializeBinaryFromReader);
msg.setStartingInfo(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDelegatorAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getValidatorAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getStartingInfo();
if (f != null) {
writer.writeMessage(
3,
f,
sgn_distribution_v1_distribution_pb.DelegatorStartingInfo.serializeBinaryToWriter
);
}
};
/**
* optional string delegator_address = 1;
* @return {string}
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.getDelegatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord} returns this
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.setDelegatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string validator_address = 2;
* @return {string}
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.getValidatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord} returns this
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.setValidatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional DelegatorStartingInfo starting_info = 3;
* @return {?proto.sgn.distribution.v1.DelegatorStartingInfo}
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.getStartingInfo = function() {
return /** @type{?proto.sgn.distribution.v1.DelegatorStartingInfo} */ (
jspb.Message.getWrapperField(this, sgn_distribution_v1_distribution_pb.DelegatorStartingInfo, 3));
};
/**
* @param {?proto.sgn.distribution.v1.DelegatorStartingInfo|undefined} value
* @return {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord} returns this
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.setStartingInfo = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord} returns this
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.clearStartingInfo = function() {
return this.setStartingInfo(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.prototype.hasStartingInfo = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.sgn.distribution.v1.GenesisState.repeatedFields_ = [3,5,6,7,8,9];
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.sgn.distribution.v1.GenesisState.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.distribution.v1.GenesisState.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.sgn.distribution.v1.GenesisState} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.GenesisState.toObject = function(includeInstance, msg) {
var f, obj = {
params: (f = msg.getParams()) && sgn_distribution_v1_distribution_pb.Params.toObject(includeInstance, f),
feePool: (f = msg.getFeePool()) && sgn_distribution_v1_distribution_pb.FeePool.toObject(includeInstance, f),
delegatorWithdrawInfosList: jspb.Message.toObjectList(msg.getDelegatorWithdrawInfosList(),
proto.sgn.distribution.v1.DelegatorWithdrawInfo.toObject, includeInstance),
previousProposer: jspb.Message.getFieldWithDefault(msg, 4, ""),
outstandingRewardsList: jspb.Message.toObjectList(msg.getOutstandingRewardsList(),
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.toObject, includeInstance),
validatorAccumulatedCommissionsList: jspb.Message.toObjectList(msg.getValidatorAccumulatedCommissionsList(),
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.toObject, includeInstance),
validatorHistoricalRewardsList: jspb.Message.toObjectList(msg.getValidatorHistoricalRewardsList(),
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.toObject, includeInstance),
validatorCurrentRewardsList: jspb.Message.toObjectList(msg.getValidatorCurrentRewardsList(),
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.toObject, includeInstance),
delegatorStartingInfosList: jspb.Message.toObjectList(msg.getDelegatorStartingInfosList(),
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.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.sgn.distribution.v1.GenesisState}
*/
proto.sgn.distribution.v1.GenesisState.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.distribution.v1.GenesisState;
return proto.sgn.distribution.v1.GenesisState.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.distribution.v1.GenesisState} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.distribution.v1.GenesisState}
*/
proto.sgn.distribution.v1.GenesisState.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new sgn_distribution_v1_distribution_pb.Params;
reader.readMessage(value,sgn_distribution_v1_distribution_pb.Params.deserializeBinaryFromReader);
msg.setParams(value);
break;
case 2:
var value = new sgn_distribution_v1_distribution_pb.FeePool;
reader.readMessage(value,sgn_distribution_v1_distribution_pb.FeePool.deserializeBinaryFromReader);
msg.setFeePool(value);
break;
case 3:
var value = new proto.sgn.distribution.v1.DelegatorWithdrawInfo;
reader.readMessage(value,proto.sgn.distribution.v1.DelegatorWithdrawInfo.deserializeBinaryFromReader);
msg.addDelegatorWithdrawInfos(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setPreviousProposer(value);
break;
case 5:
var value = new proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord;
reader.readMessage(value,proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.deserializeBinaryFromReader);
msg.addOutstandingRewards(value);
break;
case 6:
var value = new proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord;
reader.readMessage(value,proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.deserializeBinaryFromReader);
msg.addValidatorAccumulatedCommissions(value);
break;
case 7:
var value = new proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord;
reader.readMessage(value,proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.deserializeBinaryFromReader);
msg.addValidatorHistoricalRewards(value);
break;
case 8:
var value = new proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord;
reader.readMessage(value,proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.deserializeBinaryFromReader);
msg.addValidatorCurrentRewards(value);
break;
case 9:
var value = new proto.sgn.distribution.v1.DelegatorStartingInfoRecord;
reader.readMessage(value,proto.sgn.distribution.v1.DelegatorStartingInfoRecord.deserializeBinaryFromReader);
msg.addDelegatorStartingInfos(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.distribution.v1.GenesisState.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.distribution.v1.GenesisState.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.distribution.v1.GenesisState} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.distribution.v1.GenesisState.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getParams();
if (f != null) {
writer.writeMessage(
1,
f,
sgn_distribution_v1_distribution_pb.Params.serializeBinaryToWriter
);
}
f = message.getFeePool();
if (f != null) {
writer.writeMessage(
2,
f,
sgn_distribution_v1_distribution_pb.FeePool.serializeBinaryToWriter
);
}
f = message.getDelegatorWithdrawInfosList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.sgn.distribution.v1.DelegatorWithdrawInfo.serializeBinaryToWriter
);
}
f = message.getPreviousProposer();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getOutstandingRewardsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord.serializeBinaryToWriter
);
}
f = message.getValidatorAccumulatedCommissionsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
6,
f,
proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord.serializeBinaryToWriter
);
}
f = message.getValidatorHistoricalRewardsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
7,
f,
proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord.serializeBinaryToWriter
);
}
f = message.getValidatorCurrentRewardsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
8,
f,
proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord.serializeBinaryToWriter
);
}
f = message.getDelegatorStartingInfosList();
if (f.length > 0) {
writer.writeRepeatedMessage(
9,
f,
proto.sgn.distribution.v1.DelegatorStartingInfoRecord.serializeBinaryToWriter
);
}
};
/**
* optional Params params = 1;
* @return {?proto.sgn.distribution.v1.Params}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getParams = function() {
return /** @type{?proto.sgn.distribution.v1.Params} */ (
jspb.Message.getWrapperField(this, sgn_distribution_v1_distribution_pb.Params, 1));
};
/**
* @param {?proto.sgn.distribution.v1.Params|undefined} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setParams = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.clearParams = function() {
return this.setParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.distribution.v1.GenesisState.prototype.hasParams = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional FeePool fee_pool = 2;
* @return {?proto.sgn.distribution.v1.FeePool}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getFeePool = function() {
return /** @type{?proto.sgn.distribution.v1.FeePool} */ (
jspb.Message.getWrapperField(this, sgn_distribution_v1_distribution_pb.FeePool, 2));
};
/**
* @param {?proto.sgn.distribution.v1.FeePool|undefined} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setFeePool = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.clearFeePool = function() {
return this.setFeePool(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.distribution.v1.GenesisState.prototype.hasFeePool = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3;
* @return {!Array<!proto.sgn.distribution.v1.DelegatorWithdrawInfo>}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getDelegatorWithdrawInfosList = function() {
return /** @type{!Array<!proto.sgn.distribution.v1.DelegatorWithdrawInfo>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.distribution.v1.DelegatorWithdrawInfo, 3));
};
/**
* @param {!Array<!proto.sgn.distribution.v1.DelegatorWithdrawInfo>} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setDelegatorWithdrawInfosList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.sgn.distribution.v1.DelegatorWithdrawInfo=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.distribution.v1.DelegatorWithdrawInfo}
*/
proto.sgn.distribution.v1.GenesisState.prototype.addDelegatorWithdrawInfos = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.sgn.distribution.v1.DelegatorWithdrawInfo, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.clearDelegatorWithdrawInfosList = function() {
return this.setDelegatorWithdrawInfosList([]);
};
/**
* optional string previous_proposer = 4;
* @return {string}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getPreviousProposer = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setPreviousProposer = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5;
* @return {!Array<!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord>}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getOutstandingRewardsList = function() {
return /** @type{!Array<!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord, 5));
};
/**
* @param {!Array<!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord>} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setOutstandingRewardsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord}
*/
proto.sgn.distribution.v1.GenesisState.prototype.addOutstandingRewards = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.sgn.distribution.v1.ValidatorOutstandingRewardsRecord, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.clearOutstandingRewardsList = function() {
return this.setOutstandingRewardsList([]);
};
/**
* repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6;
* @return {!Array<!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord>}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getValidatorAccumulatedCommissionsList = function() {
return /** @type{!Array<!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord, 6));
};
/**
* @param {!Array<!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord>} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setValidatorAccumulatedCommissionsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 6, value);
};
/**
* @param {!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord}
*/
proto.sgn.distribution.v1.GenesisState.prototype.addValidatorAccumulatedCommissions = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.sgn.distribution.v1.ValidatorAccumulatedCommissionRecord, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.clearValidatorAccumulatedCommissionsList = function() {
return this.setValidatorAccumulatedCommissionsList([]);
};
/**
* repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7;
* @return {!Array<!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord>}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getValidatorHistoricalRewardsList = function() {
return /** @type{!Array<!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord, 7));
};
/**
* @param {!Array<!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord>} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setValidatorHistoricalRewardsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 7, value);
};
/**
* @param {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord}
*/
proto.sgn.distribution.v1.GenesisState.prototype.addValidatorHistoricalRewards = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.sgn.distribution.v1.ValidatorHistoricalRewardsRecord, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.clearValidatorHistoricalRewardsList = function() {
return this.setValidatorHistoricalRewardsList([]);
};
/**
* repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8;
* @return {!Array<!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord>}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getValidatorCurrentRewardsList = function() {
return /** @type{!Array<!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord, 8));
};
/**
* @param {!Array<!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord>} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setValidatorCurrentRewardsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 8, value);
};
/**
* @param {!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord}
*/
proto.sgn.distribution.v1.GenesisState.prototype.addValidatorCurrentRewards = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.sgn.distribution.v1.ValidatorCurrentRewardsRecord, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.clearValidatorCurrentRewardsList = function() {
return this.setValidatorCurrentRewardsList([]);
};
/**
* repeated DelegatorStartingInfoRecord delegator_starting_infos = 9;
* @return {!Array<!proto.sgn.distribution.v1.DelegatorStartingInfoRecord>}
*/
proto.sgn.distribution.v1.GenesisState.prototype.getDelegatorStartingInfosList = function() {
return /** @type{!Array<!proto.sgn.distribution.v1.DelegatorStartingInfoRecord>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.distribution.v1.DelegatorStartingInfoRecord, 9));
};
/**
* @param {!Array<!proto.sgn.distribution.v1.DelegatorStartingInfoRecord>} value
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.setDelegatorStartingInfosList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 9, value);
};
/**
* @param {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.distribution.v1.DelegatorStartingInfoRecord}
*/
proto.sgn.distribution.v1.GenesisState.prototype.addDelegatorStartingInfos = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.sgn.distribution.v1.DelegatorStartingInfoRecord, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.distribution.v1.GenesisState} returns this
*/
proto.sgn.distribution.v1.GenesisState.prototype.clearDelegatorStartingInfosList = function() {
return this.setDelegatorStartingInfosList([]);
};
goog.object.extend(exports, proto.sgn.distribution.v1);