@kaiachain/kss-bridges-celer
Version:
TypeScript client and use-cases for cBridge
888 lines (770 loc) • 24.7 kB
JavaScript
// source: sgn/sync/v1/sync.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);
goog.exportSymbol('proto.sgn.sync.v1.DataType', null, global);
goog.exportSymbol('proto.sgn.sync.v1.Params', null, global);
goog.exportSymbol('proto.sgn.sync.v1.PendingUpdate', null, global);
goog.exportSymbol('proto.sgn.sync.v1.Vote', null, global);
goog.exportSymbol('proto.sgn.sync.v1.VoteOption', 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.sync.v1.Vote = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.sync.v1.Vote, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.sync.v1.Vote.displayName = 'proto.sgn.sync.v1.Vote';
}
/**
* 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.sync.v1.PendingUpdate = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.sync.v1.PendingUpdate.repeatedFields_, null);
};
goog.inherits(proto.sgn.sync.v1.PendingUpdate, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.sync.v1.PendingUpdate.displayName = 'proto.sgn.sync.v1.PendingUpdate';
}
/**
* 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.sync.v1.Params = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.sync.v1.Params, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.sync.v1.Params.displayName = 'proto.sgn.sync.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.sync.v1.Vote.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.sync.v1.Vote.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.sync.v1.Vote} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.sync.v1.Vote.toObject = function(includeInstance, msg) {
var f, obj = {
voter: jspb.Message.getFieldWithDefault(msg, 1, ""),
option: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.sgn.sync.v1.Vote}
*/
proto.sgn.sync.v1.Vote.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.sync.v1.Vote;
return proto.sgn.sync.v1.Vote.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.sync.v1.Vote} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.sync.v1.Vote}
*/
proto.sgn.sync.v1.Vote.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.setVoter(value);
break;
case 2:
var value = /** @type {!proto.sgn.sync.v1.VoteOption} */ (reader.readEnum());
msg.setOption(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.sync.v1.Vote.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.sync.v1.Vote.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.sync.v1.Vote} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.sync.v1.Vote.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getVoter();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getOption();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
};
/**
* optional string voter = 1;
* @return {string}
*/
proto.sgn.sync.v1.Vote.prototype.getVoter = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.sync.v1.Vote} returns this
*/
proto.sgn.sync.v1.Vote.prototype.setVoter = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional VoteOption option = 2;
* @return {!proto.sgn.sync.v1.VoteOption}
*/
proto.sgn.sync.v1.Vote.prototype.getOption = function() {
return /** @type {!proto.sgn.sync.v1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.sgn.sync.v1.VoteOption} value
* @return {!proto.sgn.sync.v1.Vote} returns this
*/
proto.sgn.sync.v1.Vote.prototype.setOption = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.sgn.sync.v1.PendingUpdate.repeatedFields_ = [7];
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.sync.v1.PendingUpdate.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.sync.v1.PendingUpdate.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.sync.v1.PendingUpdate} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.sync.v1.PendingUpdate.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
type: jspb.Message.getFieldWithDefault(msg, 2, 0),
data: msg.getData_asB64(),
chainId: jspb.Message.getFieldWithDefault(msg, 4, 0),
chainBlock: jspb.Message.getFieldWithDefault(msg, 5, 0),
proposer: jspb.Message.getFieldWithDefault(msg, 6, ""),
votesList: jspb.Message.toObjectList(msg.getVotesList(),
proto.sgn.sync.v1.Vote.toObject, includeInstance),
proposeTs: jspb.Message.getFieldWithDefault(msg, 8, 0),
closingTs: jspb.Message.getFieldWithDefault(msg, 9, 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.sync.v1.PendingUpdate}
*/
proto.sgn.sync.v1.PendingUpdate.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.sync.v1.PendingUpdate;
return proto.sgn.sync.v1.PendingUpdate.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.sync.v1.PendingUpdate} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.sync.v1.PendingUpdate}
*/
proto.sgn.sync.v1.PendingUpdate.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.setId(value);
break;
case 2:
var value = /** @type {!proto.sgn.sync.v1.DataType} */ (reader.readEnum());
msg.setType(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint64());
msg.setChainId(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint64());
msg.setChainBlock(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setProposer(value);
break;
case 7:
var value = new proto.sgn.sync.v1.Vote;
reader.readMessage(value,proto.sgn.sync.v1.Vote.deserializeBinaryFromReader);
msg.addVotes(value);
break;
case 8:
var value = /** @type {number} */ (reader.readUint64());
msg.setProposeTs(value);
break;
case 9:
var value = /** @type {number} */ (reader.readUint64());
msg.setClosingTs(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.sync.v1.PendingUpdate.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.sync.v1.PendingUpdate} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.sync.v1.PendingUpdate.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
f = message.getChainId();
if (f !== 0) {
writer.writeUint64(
4,
f
);
}
f = message.getChainBlock();
if (f !== 0) {
writer.writeUint64(
5,
f
);
}
f = message.getProposer();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getVotesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
7,
f,
proto.sgn.sync.v1.Vote.serializeBinaryToWriter
);
}
f = message.getProposeTs();
if (f !== 0) {
writer.writeUint64(
8,
f
);
}
f = message.getClosingTs();
if (f !== 0) {
writer.writeUint64(
9,
f
);
}
};
/**
* optional uint64 id = 1;
* @return {number}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional DataType type = 2;
* @return {!proto.sgn.sync.v1.DataType}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getType = function() {
return /** @type {!proto.sgn.sync.v1.DataType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.sgn.sync.v1.DataType} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setType = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional bytes data = 3;
* @return {!(string|Uint8Array)}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes data = 3;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getData()));
};
/**
* optional bytes data = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setData = function(value) {
return jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* optional uint64 chain_id = 4;
* @return {number}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getChainId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setChainId = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional uint64 chain_block = 5;
* @return {number}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getChainBlock = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setChainBlock = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional string proposer = 6;
* @return {string}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getProposer = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setProposer = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* repeated Vote votes = 7;
* @return {!Array<!proto.sgn.sync.v1.Vote>}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getVotesList = function() {
return /** @type{!Array<!proto.sgn.sync.v1.Vote>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.sync.v1.Vote, 7));
};
/**
* @param {!Array<!proto.sgn.sync.v1.Vote>} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setVotesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 7, value);
};
/**
* @param {!proto.sgn.sync.v1.Vote=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.sync.v1.Vote}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.addVotes = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.sgn.sync.v1.Vote, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.clearVotesList = function() {
return this.setVotesList([]);
};
/**
* optional uint64 propose_ts = 8;
* @return {number}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getProposeTs = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setProposeTs = function(value) {
return jspb.Message.setProto3IntField(this, 8, value);
};
/**
* optional uint64 closing_ts = 9;
* @return {number}
*/
proto.sgn.sync.v1.PendingUpdate.prototype.getClosingTs = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.sync.v1.PendingUpdate} returns this
*/
proto.sgn.sync.v1.PendingUpdate.prototype.setClosingTs = function(value) {
return jspb.Message.setProto3IntField(this, 9, 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.sync.v1.Params.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.sync.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.sync.v1.Params} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.sync.v1.Params.toObject = function(includeInstance, msg) {
var f, obj = {
votingPeriod: jspb.Message.getFieldWithDefault(msg, 1, 0),
tallyThreshold: msg.getTallyThreshold_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.sync.v1.Params}
*/
proto.sgn.sync.v1.Params.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.sync.v1.Params;
return proto.sgn.sync.v1.Params.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.sync.v1.Params} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.sync.v1.Params}
*/
proto.sgn.sync.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.setVotingPeriod(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setTallyThreshold(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.sync.v1.Params.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.sync.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.sync.v1.Params} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.sync.v1.Params.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getVotingPeriod();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getTallyThreshold_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
};
/**
* optional uint64 voting_period = 1;
* @return {number}
*/
proto.sgn.sync.v1.Params.prototype.getVotingPeriod = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.sync.v1.Params} returns this
*/
proto.sgn.sync.v1.Params.prototype.setVotingPeriod = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional bytes tally_threshold = 2;
* @return {!(string|Uint8Array)}
*/
proto.sgn.sync.v1.Params.prototype.getTallyThreshold = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes tally_threshold = 2;
* This is a type-conversion wrapper around `getTallyThreshold()`
* @return {string}
*/
proto.sgn.sync.v1.Params.prototype.getTallyThreshold_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getTallyThreshold()));
};
/**
* optional bytes tally_threshold = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getTallyThreshold()`
* @return {!Uint8Array}
*/
proto.sgn.sync.v1.Params.prototype.getTallyThreshold_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getTallyThreshold()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.sgn.sync.v1.Params} returns this
*/
proto.sgn.sync.v1.Params.prototype.setTallyThreshold = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* @enum {number}
*/
proto.sgn.sync.v1.DataType = {
INVALID: 0,
VALIDATORSGNADDR: 1,
VALIDATORPARAMS: 2,
VALIDATORSTATES: 3,
DELEGATORSHARES: 4,
CBRONCHAINEVENT: 5,
CBRUPDATECBRPRICE: 6,
PEGBRONCHAINEVENT: 7,
MSGBRONCHAINEVENT: 8
};
/**
* @enum {number}
*/
proto.sgn.sync.v1.VoteOption = {
EMPTY: 0,
YES: 1,
ABSTAIN: 2,
NO: 3
};
goog.object.extend(exports, proto.sgn.sync.v1);