@kaiachain/kss-bridges-celer
Version:
TypeScript client and use-cases for cBridge
1,240 lines (1,073 loc) • 39.3 kB
JavaScript
// source: sgn/farming/v1/tx.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
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 sgn_farming_v1_farming_pb = require('../../../sgn/farming/v1/farming_pb.js');
goog.object.extend(proto, sgn_farming_v1_farming_pb);
goog.exportSymbol('proto.sgn.farming.v1.MsgClaimAllRewards', null, global);
goog.exportSymbol('proto.sgn.farming.v1.MsgClaimAllRewardsResponse', null, global);
goog.exportSymbol('proto.sgn.farming.v1.MsgClaimRewards', null, global);
goog.exportSymbol('proto.sgn.farming.v1.MsgClaimRewardsResponse', null, global);
goog.exportSymbol('proto.sgn.farming.v1.MsgSignRewards', null, global);
goog.exportSymbol('proto.sgn.farming.v1.MsgSignRewardsResponse', null, global);
goog.exportSymbol('proto.sgn.farming.v1.SignatureDetails', 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.farming.v1.MsgClaimRewards = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.farming.v1.MsgClaimRewards, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.farming.v1.MsgClaimRewards.displayName = 'proto.sgn.farming.v1.MsgClaimRewards';
}
/**
* 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.farming.v1.MsgClaimRewardsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.farming.v1.MsgClaimRewardsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.farming.v1.MsgClaimRewardsResponse.displayName = 'proto.sgn.farming.v1.MsgClaimRewardsResponse';
}
/**
* 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.farming.v1.MsgClaimAllRewards = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.farming.v1.MsgClaimAllRewards, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.farming.v1.MsgClaimAllRewards.displayName = 'proto.sgn.farming.v1.MsgClaimAllRewards';
}
/**
* 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.farming.v1.MsgClaimAllRewardsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.farming.v1.MsgClaimAllRewardsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.farming.v1.MsgClaimAllRewardsResponse.displayName = 'proto.sgn.farming.v1.MsgClaimAllRewardsResponse';
}
/**
* 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.farming.v1.SignatureDetails = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.farming.v1.SignatureDetails, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.farming.v1.SignatureDetails.displayName = 'proto.sgn.farming.v1.SignatureDetails';
}
/**
* 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.farming.v1.MsgSignRewards = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.farming.v1.MsgSignRewards.repeatedFields_, null);
};
goog.inherits(proto.sgn.farming.v1.MsgSignRewards, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.farming.v1.MsgSignRewards.displayName = 'proto.sgn.farming.v1.MsgSignRewards';
}
/**
* 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.farming.v1.MsgSignRewardsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.farming.v1.MsgSignRewardsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.farming.v1.MsgSignRewardsResponse.displayName = 'proto.sgn.farming.v1.MsgSignRewardsResponse';
}
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.farming.v1.MsgClaimRewards.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.farming.v1.MsgClaimRewards.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.farming.v1.MsgClaimRewards} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgClaimRewards.toObject = function(includeInstance, msg) {
var f, obj = {
poolName: jspb.Message.getFieldWithDefault(msg, 1, ""),
address: jspb.Message.getFieldWithDefault(msg, 2, ""),
sender: 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.farming.v1.MsgClaimRewards}
*/
proto.sgn.farming.v1.MsgClaimRewards.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.farming.v1.MsgClaimRewards;
return proto.sgn.farming.v1.MsgClaimRewards.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.farming.v1.MsgClaimRewards} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.farming.v1.MsgClaimRewards}
*/
proto.sgn.farming.v1.MsgClaimRewards.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.setPoolName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setAddress(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSender(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.farming.v1.MsgClaimRewards.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.farming.v1.MsgClaimRewards.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.farming.v1.MsgClaimRewards} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgClaimRewards.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPoolName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSender();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string pool_name = 1;
* @return {string}
*/
proto.sgn.farming.v1.MsgClaimRewards.prototype.getPoolName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.farming.v1.MsgClaimRewards} returns this
*/
proto.sgn.farming.v1.MsgClaimRewards.prototype.setPoolName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string address = 2;
* @return {string}
*/
proto.sgn.farming.v1.MsgClaimRewards.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.farming.v1.MsgClaimRewards} returns this
*/
proto.sgn.farming.v1.MsgClaimRewards.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string sender = 3;
* @return {string}
*/
proto.sgn.farming.v1.MsgClaimRewards.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.farming.v1.MsgClaimRewards} returns this
*/
proto.sgn.farming.v1.MsgClaimRewards.prototype.setSender = 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.farming.v1.MsgClaimRewardsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.farming.v1.MsgClaimRewardsResponse.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.farming.v1.MsgClaimRewardsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgClaimRewardsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.sgn.farming.v1.MsgClaimRewardsResponse}
*/
proto.sgn.farming.v1.MsgClaimRewardsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.farming.v1.MsgClaimRewardsResponse;
return proto.sgn.farming.v1.MsgClaimRewardsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.farming.v1.MsgClaimRewardsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.farming.v1.MsgClaimRewardsResponse}
*/
proto.sgn.farming.v1.MsgClaimRewardsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.farming.v1.MsgClaimRewardsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.farming.v1.MsgClaimRewardsResponse.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.farming.v1.MsgClaimRewardsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgClaimRewardsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
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.farming.v1.MsgClaimAllRewards.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.farming.v1.MsgClaimAllRewards.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.farming.v1.MsgClaimAllRewards} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgClaimAllRewards.toObject = function(includeInstance, msg) {
var f, obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
sender: 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.farming.v1.MsgClaimAllRewards}
*/
proto.sgn.farming.v1.MsgClaimAllRewards.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.farming.v1.MsgClaimAllRewards;
return proto.sgn.farming.v1.MsgClaimAllRewards.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.farming.v1.MsgClaimAllRewards} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.farming.v1.MsgClaimAllRewards}
*/
proto.sgn.farming.v1.MsgClaimAllRewards.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.setAddress(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setSender(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.farming.v1.MsgClaimAllRewards.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.farming.v1.MsgClaimAllRewards.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.farming.v1.MsgClaimAllRewards} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgClaimAllRewards.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSender();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.sgn.farming.v1.MsgClaimAllRewards.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.farming.v1.MsgClaimAllRewards} returns this
*/
proto.sgn.farming.v1.MsgClaimAllRewards.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string sender = 2;
* @return {string}
*/
proto.sgn.farming.v1.MsgClaimAllRewards.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.farming.v1.MsgClaimAllRewards} returns this
*/
proto.sgn.farming.v1.MsgClaimAllRewards.prototype.setSender = 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.farming.v1.MsgClaimAllRewardsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.farming.v1.MsgClaimAllRewardsResponse.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.farming.v1.MsgClaimAllRewardsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgClaimAllRewardsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.sgn.farming.v1.MsgClaimAllRewardsResponse}
*/
proto.sgn.farming.v1.MsgClaimAllRewardsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.farming.v1.MsgClaimAllRewardsResponse;
return proto.sgn.farming.v1.MsgClaimAllRewardsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.farming.v1.MsgClaimAllRewardsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.farming.v1.MsgClaimAllRewardsResponse}
*/
proto.sgn.farming.v1.MsgClaimAllRewardsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.farming.v1.MsgClaimAllRewardsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.farming.v1.MsgClaimAllRewardsResponse.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.farming.v1.MsgClaimAllRewardsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgClaimAllRewardsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
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.farming.v1.SignatureDetails.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.farming.v1.SignatureDetails.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.farming.v1.SignatureDetails} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.SignatureDetails.toObject = function(includeInstance, msg) {
var f, obj = {
chainId: jspb.Message.getFieldWithDefault(msg, 1, 0),
signature: msg.getSignature_asB64()
};
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.farming.v1.SignatureDetails}
*/
proto.sgn.farming.v1.SignatureDetails.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.farming.v1.SignatureDetails;
return proto.sgn.farming.v1.SignatureDetails.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.farming.v1.SignatureDetails} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.farming.v1.SignatureDetails}
*/
proto.sgn.farming.v1.SignatureDetails.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.setChainId(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSignature(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.farming.v1.SignatureDetails.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.farming.v1.SignatureDetails.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.farming.v1.SignatureDetails} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.SignatureDetails.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getChainId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getSignature_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
};
/**
* optional uint64 chain_id = 1;
* @return {number}
*/
proto.sgn.farming.v1.SignatureDetails.prototype.getChainId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.farming.v1.SignatureDetails} returns this
*/
proto.sgn.farming.v1.SignatureDetails.prototype.setChainId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional bytes signature = 2;
* @return {!(string|Uint8Array)}
*/
proto.sgn.farming.v1.SignatureDetails.prototype.getSignature = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes signature = 2;
* This is a type-conversion wrapper around `getSignature()`
* @return {string}
*/
proto.sgn.farming.v1.SignatureDetails.prototype.getSignature_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSignature()));
};
/**
* optional bytes signature = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSignature()`
* @return {!Uint8Array}
*/
proto.sgn.farming.v1.SignatureDetails.prototype.getSignature_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSignature()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.sgn.farming.v1.SignatureDetails} returns this
*/
proto.sgn.farming.v1.SignatureDetails.prototype.setSignature = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.sgn.farming.v1.MsgSignRewards.repeatedFields_ = [3];
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.farming.v1.MsgSignRewards.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.farming.v1.MsgSignRewards.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.farming.v1.MsgSignRewards} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgSignRewards.toObject = function(includeInstance, msg) {
var f, obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
sender: jspb.Message.getFieldWithDefault(msg, 2, ""),
signatureDetailsListList: jspb.Message.toObjectList(msg.getSignatureDetailsListList(),
proto.sgn.farming.v1.SignatureDetails.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.farming.v1.MsgSignRewards}
*/
proto.sgn.farming.v1.MsgSignRewards.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.farming.v1.MsgSignRewards;
return proto.sgn.farming.v1.MsgSignRewards.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.farming.v1.MsgSignRewards} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.farming.v1.MsgSignRewards}
*/
proto.sgn.farming.v1.MsgSignRewards.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.setAddress(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setSender(value);
break;
case 3:
var value = new proto.sgn.farming.v1.SignatureDetails;
reader.readMessage(value,proto.sgn.farming.v1.SignatureDetails.deserializeBinaryFromReader);
msg.addSignatureDetailsList(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.farming.v1.MsgSignRewards.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.farming.v1.MsgSignRewards} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgSignRewards.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSender();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSignatureDetailsListList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.sgn.farming.v1.SignatureDetails.serializeBinaryToWriter
);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.farming.v1.MsgSignRewards} returns this
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string sender = 2;
* @return {string}
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.farming.v1.MsgSignRewards} returns this
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.setSender = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated SignatureDetails signature_details_list = 3;
* @return {!Array<!proto.sgn.farming.v1.SignatureDetails>}
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.getSignatureDetailsListList = function() {
return /** @type{!Array<!proto.sgn.farming.v1.SignatureDetails>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.farming.v1.SignatureDetails, 3));
};
/**
* @param {!Array<!proto.sgn.farming.v1.SignatureDetails>} value
* @return {!proto.sgn.farming.v1.MsgSignRewards} returns this
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.setSignatureDetailsListList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.sgn.farming.v1.SignatureDetails=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.farming.v1.SignatureDetails}
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.addSignatureDetailsList = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.sgn.farming.v1.SignatureDetails, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.farming.v1.MsgSignRewards} returns this
*/
proto.sgn.farming.v1.MsgSignRewards.prototype.clearSignatureDetailsListList = function() {
return this.setSignatureDetailsListList([]);
};
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.farming.v1.MsgSignRewardsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.farming.v1.MsgSignRewardsResponse.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.farming.v1.MsgSignRewardsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgSignRewardsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.sgn.farming.v1.MsgSignRewardsResponse}
*/
proto.sgn.farming.v1.MsgSignRewardsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.farming.v1.MsgSignRewardsResponse;
return proto.sgn.farming.v1.MsgSignRewardsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.farming.v1.MsgSignRewardsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.farming.v1.MsgSignRewardsResponse}
*/
proto.sgn.farming.v1.MsgSignRewardsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.farming.v1.MsgSignRewardsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.farming.v1.MsgSignRewardsResponse.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.farming.v1.MsgSignRewardsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.farming.v1.MsgSignRewardsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
goog.object.extend(exports, proto.sgn.farming.v1);