@kaiachain/kss-bridges-celer
Version:
TypeScript client and use-cases for cBridge
1,685 lines (1,459 loc) • 50.2 kB
JavaScript
// source: sgn/staking/v1/staking.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js');
goog.object.extend(proto, cosmos_base_v1beta1_coin_pb);
goog.exportSymbol('proto.sgn.staking.v1.BondStatus', null, global);
goog.exportSymbol('proto.sgn.staking.v1.Delegation', null, global);
goog.exportSymbol('proto.sgn.staking.v1.DelegationResponse', null, global);
goog.exportSymbol('proto.sgn.staking.v1.Description', null, global);
goog.exportSymbol('proto.sgn.staking.v1.Params', null, global);
goog.exportSymbol('proto.sgn.staking.v1.Syncer', null, global);
goog.exportSymbol('proto.sgn.staking.v1.Validator', null, global);
goog.exportSymbol('proto.sgn.staking.v1.ValidatorTransactors', 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.staking.v1.Validator = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.Validator, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.Validator.displayName = 'proto.sgn.staking.v1.Validator';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.sgn.staking.v1.Description = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.Description, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.Description.displayName = 'proto.sgn.staking.v1.Description';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.sgn.staking.v1.ValidatorTransactors = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.staking.v1.ValidatorTransactors.repeatedFields_, null);
};
goog.inherits(proto.sgn.staking.v1.ValidatorTransactors, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.ValidatorTransactors.displayName = 'proto.sgn.staking.v1.ValidatorTransactors';
}
/**
* 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.staking.v1.Delegation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.Delegation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.Delegation.displayName = 'proto.sgn.staking.v1.Delegation';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.sgn.staking.v1.DelegationResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.DelegationResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.DelegationResponse.displayName = 'proto.sgn.staking.v1.DelegationResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.sgn.staking.v1.Syncer = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.Syncer, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.Syncer.displayName = 'proto.sgn.staking.v1.Syncer';
}
/**
* 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.staking.v1.Params = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.Params, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.Params.displayName = 'proto.sgn.staking.v1.Params';
}
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.staking.v1.Validator.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.Validator.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.sgn.staking.v1.Validator} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Validator.toObject = function(includeInstance, msg) {
var f, obj = {
ethAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
ethSigner: jspb.Message.getFieldWithDefault(msg, 2, ""),
sgnAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
consensusPubkey: (f = msg.getConsensusPubkey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
status: jspb.Message.getFieldWithDefault(msg, 5, 0),
tokens: jspb.Message.getFieldWithDefault(msg, 6, ""),
delegatorShares: jspb.Message.getFieldWithDefault(msg, 7, ""),
commissionRate: jspb.Message.getFieldWithDefault(msg, 8, ""),
description: (f = msg.getDescription()) && proto.sgn.staking.v1.Description.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.staking.v1.Validator}
*/
proto.sgn.staking.v1.Validator.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.Validator;
return proto.sgn.staking.v1.Validator.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.Validator} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.Validator}
*/
proto.sgn.staking.v1.Validator.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.setEthAddress(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setEthSigner(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSgnAddress(value);
break;
case 4:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setConsensusPubkey(value);
break;
case 5:
var value = /** @type {!proto.sgn.staking.v1.BondStatus} */ (reader.readEnum());
msg.setStatus(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setTokens(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setDelegatorShares(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setCommissionRate(value);
break;
case 9:
var value = new proto.sgn.staking.v1.Description;
reader.readMessage(value,proto.sgn.staking.v1.Description.deserializeBinaryFromReader);
msg.setDescription(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.Validator.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.Validator.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.staking.v1.Validator} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Validator.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getEthAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getEthSigner();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSgnAddress();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getConsensusPubkey();
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
5,
f
);
}
f = message.getTokens();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getDelegatorShares();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getCommissionRate();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = message.getDescription();
if (f != null) {
writer.writeMessage(
9,
f,
proto.sgn.staking.v1.Description.serializeBinaryToWriter
);
}
};
/**
* optional string eth_address = 1;
* @return {string}
*/
proto.sgn.staking.v1.Validator.prototype.getEthAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setEthAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string eth_signer = 2;
* @return {string}
*/
proto.sgn.staking.v1.Validator.prototype.getEthSigner = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setEthSigner = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string sgn_address = 3;
* @return {string}
*/
proto.sgn.staking.v1.Validator.prototype.getSgnAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setSgnAddress = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional google.protobuf.Any consensus_pubkey = 4;
* @return {?proto.google.protobuf.Any}
*/
proto.sgn.staking.v1.Validator.prototype.getConsensusPubkey = function() {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4));
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setConsensusPubkey = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.clearConsensusPubkey = function() {
return this.setConsensusPubkey(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.staking.v1.Validator.prototype.hasConsensusPubkey = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional BondStatus status = 5;
* @return {!proto.sgn.staking.v1.BondStatus}
*/
proto.sgn.staking.v1.Validator.prototype.getStatus = function() {
return /** @type {!proto.sgn.staking.v1.BondStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {!proto.sgn.staking.v1.BondStatus} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 5, value);
};
/**
* optional string tokens = 6;
* @return {string}
*/
proto.sgn.staking.v1.Validator.prototype.getTokens = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setTokens = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string delegator_shares = 7;
* @return {string}
*/
proto.sgn.staking.v1.Validator.prototype.getDelegatorShares = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setDelegatorShares = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string commission_rate = 8;
* @return {string}
*/
proto.sgn.staking.v1.Validator.prototype.getCommissionRate = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setCommissionRate = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
/**
* optional Description description = 9;
* @return {?proto.sgn.staking.v1.Description}
*/
proto.sgn.staking.v1.Validator.prototype.getDescription = function() {
return /** @type{?proto.sgn.staking.v1.Description} */ (
jspb.Message.getWrapperField(this, proto.sgn.staking.v1.Description, 9));
};
/**
* @param {?proto.sgn.staking.v1.Description|undefined} value
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.setDescription = function(value) {
return jspb.Message.setWrapperField(this, 9, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.staking.v1.Validator} returns this
*/
proto.sgn.staking.v1.Validator.prototype.clearDescription = function() {
return this.setDescription(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.staking.v1.Validator.prototype.hasDescription = function() {
return jspb.Message.getField(this, 9) != 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.staking.v1.Description.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.Description.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.sgn.staking.v1.Description} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Description.toObject = function(includeInstance, msg) {
var f, obj = {
moniker: jspb.Message.getFieldWithDefault(msg, 1, ""),
identity: jspb.Message.getFieldWithDefault(msg, 2, ""),
website: jspb.Message.getFieldWithDefault(msg, 3, ""),
contact: jspb.Message.getFieldWithDefault(msg, 4, ""),
details: jspb.Message.getFieldWithDefault(msg, 5, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.sgn.staking.v1.Description}
*/
proto.sgn.staking.v1.Description.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.Description;
return proto.sgn.staking.v1.Description.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.Description} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.Description}
*/
proto.sgn.staking.v1.Description.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setMoniker(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setIdentity(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setWebsite(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setContact(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDetails(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.Description.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.Description.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.staking.v1.Description} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Description.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMoniker();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getIdentity();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getWebsite();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getContact();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getDetails();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
};
/**
* optional string moniker = 1;
* @return {string}
*/
proto.sgn.staking.v1.Description.prototype.getMoniker = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Description} returns this
*/
proto.sgn.staking.v1.Description.prototype.setMoniker = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string identity = 2;
* @return {string}
*/
proto.sgn.staking.v1.Description.prototype.getIdentity = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Description} returns this
*/
proto.sgn.staking.v1.Description.prototype.setIdentity = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string website = 3;
* @return {string}
*/
proto.sgn.staking.v1.Description.prototype.getWebsite = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Description} returns this
*/
proto.sgn.staking.v1.Description.prototype.setWebsite = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string contact = 4;
* @return {string}
*/
proto.sgn.staking.v1.Description.prototype.getContact = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Description} returns this
*/
proto.sgn.staking.v1.Description.prototype.setContact = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string details = 5;
* @return {string}
*/
proto.sgn.staking.v1.Description.prototype.getDetails = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Description} returns this
*/
proto.sgn.staking.v1.Description.prototype.setDetails = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.sgn.staking.v1.ValidatorTransactors.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.sgn.staking.v1.ValidatorTransactors.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.ValidatorTransactors.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.staking.v1.ValidatorTransactors} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.ValidatorTransactors.toObject = function(includeInstance, msg) {
var f, obj = {
transactorsList: (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.sgn.staking.v1.ValidatorTransactors}
*/
proto.sgn.staking.v1.ValidatorTransactors.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.ValidatorTransactors;
return proto.sgn.staking.v1.ValidatorTransactors.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.ValidatorTransactors} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.ValidatorTransactors}
*/
proto.sgn.staking.v1.ValidatorTransactors.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.addTransactors(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.ValidatorTransactors.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.ValidatorTransactors.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.staking.v1.ValidatorTransactors} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.ValidatorTransactors.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTransactorsList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
};
/**
* repeated string transactors = 1;
* @return {!Array<string>}
*/
proto.sgn.staking.v1.ValidatorTransactors.prototype.getTransactorsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/**
* @param {!Array<string>} value
* @return {!proto.sgn.staking.v1.ValidatorTransactors} returns this
*/
proto.sgn.staking.v1.ValidatorTransactors.prototype.setTransactorsList = function(value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.sgn.staking.v1.ValidatorTransactors} returns this
*/
proto.sgn.staking.v1.ValidatorTransactors.prototype.addTransactors = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.staking.v1.ValidatorTransactors} returns this
*/
proto.sgn.staking.v1.ValidatorTransactors.prototype.clearTransactorsList = function() {
return this.setTransactorsList([]);
};
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.staking.v1.Delegation.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.Delegation.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.staking.v1.Delegation} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Delegation.toObject = function(includeInstance, msg) {
var f, obj = {
delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""),
shares: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.sgn.staking.v1.Delegation}
*/
proto.sgn.staking.v1.Delegation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.Delegation;
return proto.sgn.staking.v1.Delegation.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.Delegation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.Delegation}
*/
proto.sgn.staking.v1.Delegation.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 = /** @type {string} */ (reader.readString());
msg.setShares(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.Delegation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.Delegation.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.staking.v1.Delegation} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Delegation.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.getShares();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string delegator_address = 1;
* @return {string}
*/
proto.sgn.staking.v1.Delegation.prototype.getDelegatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Delegation} returns this
*/
proto.sgn.staking.v1.Delegation.prototype.setDelegatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string validator_address = 2;
* @return {string}
*/
proto.sgn.staking.v1.Delegation.prototype.getValidatorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Delegation} returns this
*/
proto.sgn.staking.v1.Delegation.prototype.setValidatorAddress = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string shares = 3;
* @return {string}
*/
proto.sgn.staking.v1.Delegation.prototype.getShares = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Delegation} returns this
*/
proto.sgn.staking.v1.Delegation.prototype.setShares = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.sgn.staking.v1.DelegationResponse.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.DelegationResponse.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.staking.v1.DelegationResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.DelegationResponse.toObject = function(includeInstance, msg) {
var f, obj = {
delegation: (f = msg.getDelegation()) && proto.sgn.staking.v1.Delegation.toObject(includeInstance, f),
balance: (f = msg.getBalance()) && cosmos_base_v1beta1_coin_pb.Coin.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.staking.v1.DelegationResponse}
*/
proto.sgn.staking.v1.DelegationResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.DelegationResponse;
return proto.sgn.staking.v1.DelegationResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.DelegationResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.DelegationResponse}
*/
proto.sgn.staking.v1.DelegationResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.sgn.staking.v1.Delegation;
reader.readMessage(value,proto.sgn.staking.v1.Delegation.deserializeBinaryFromReader);
msg.setDelegation(value);
break;
case 2:
var value = new cosmos_base_v1beta1_coin_pb.Coin;
reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader);
msg.setBalance(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.DelegationResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.DelegationResponse.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.staking.v1.DelegationResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.DelegationResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDelegation();
if (f != null) {
writer.writeMessage(
1,
f,
proto.sgn.staking.v1.Delegation.serializeBinaryToWriter
);
}
f = message.getBalance();
if (f != null) {
writer.writeMessage(
2,
f,
cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter
);
}
};
/**
* optional Delegation delegation = 1;
* @return {?proto.sgn.staking.v1.Delegation}
*/
proto.sgn.staking.v1.DelegationResponse.prototype.getDelegation = function() {
return /** @type{?proto.sgn.staking.v1.Delegation} */ (
jspb.Message.getWrapperField(this, proto.sgn.staking.v1.Delegation, 1));
};
/**
* @param {?proto.sgn.staking.v1.Delegation|undefined} value
* @return {!proto.sgn.staking.v1.DelegationResponse} returns this
*/
proto.sgn.staking.v1.DelegationResponse.prototype.setDelegation = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.staking.v1.DelegationResponse} returns this
*/
proto.sgn.staking.v1.DelegationResponse.prototype.clearDelegation = function() {
return this.setDelegation(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.staking.v1.DelegationResponse.prototype.hasDelegation = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional cosmos.base.v1beta1.Coin balance = 2;
* @return {?proto.cosmos.base.v1beta1.Coin}
*/
proto.sgn.staking.v1.DelegationResponse.prototype.getBalance = function() {
return /** @type{?proto.cosmos.base.v1beta1.Coin} */ (
jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2));
};
/**
* @param {?proto.cosmos.base.v1beta1.Coin|undefined} value
* @return {!proto.sgn.staking.v1.DelegationResponse} returns this
*/
proto.sgn.staking.v1.DelegationResponse.prototype.setBalance = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.staking.v1.DelegationResponse} returns this
*/
proto.sgn.staking.v1.DelegationResponse.prototype.clearBalance = function() {
return this.setBalance(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.staking.v1.DelegationResponse.prototype.hasBalance = 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.staking.v1.Syncer.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.Syncer.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.staking.v1.Syncer} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Syncer.toObject = function(includeInstance, msg) {
var f, obj = {
valIndex: jspb.Message.getFieldWithDefault(msg, 1, 0),
ethAddress: 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.staking.v1.Syncer}
*/
proto.sgn.staking.v1.Syncer.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.Syncer;
return proto.sgn.staking.v1.Syncer.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.Syncer} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.Syncer}
*/
proto.sgn.staking.v1.Syncer.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.setValIndex(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setEthAddress(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.Syncer.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.Syncer.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.staking.v1.Syncer} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Syncer.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValIndex();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getEthAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional uint64 val_index = 1;
* @return {number}
*/
proto.sgn.staking.v1.Syncer.prototype.getValIndex = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.staking.v1.Syncer} returns this
*/
proto.sgn.staking.v1.Syncer.prototype.setValIndex = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string eth_address = 2;
* @return {string}
*/
proto.sgn.staking.v1.Syncer.prototype.getEthAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.Syncer} returns this
*/
proto.sgn.staking.v1.Syncer.prototype.setEthAddress = function(value) {
return jspb.Message.setProto3StringField(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.sgn.staking.v1.Params.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.Params.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.sgn.staking.v1.Params} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Params.toObject = function(includeInstance, msg) {
var f, obj = {
syncerDuration: 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.sgn.staking.v1.Params}
*/
proto.sgn.staking.v1.Params.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.Params;
return proto.sgn.staking.v1.Params.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.Params} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.Params}
*/
proto.sgn.staking.v1.Params.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.setSyncerDuration(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.Params.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.Params.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.sgn.staking.v1.Params} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.Params.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSyncerDuration();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
};
/**
* optional uint64 syncer_duration = 1;
* @return {number}
*/
proto.sgn.staking.v1.Params.prototype.getSyncerDuration = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.staking.v1.Params} returns this
*/
proto.sgn.staking.v1.Params.prototype.setSyncerDuration = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};