@routerprotocol/chain-api
Version:
Router Chain API Query client with generated gRPC bindings.
2,073 lines • 66.3 kB
JavaScript
// source: ibc/lightclients/solomachine/v3/solomachine.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var 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);
goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.ClientState', null, global);
goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.ConsensusState', null, global);
goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.Header', null, global);
goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.HeaderData', null, global);
goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.Misbehaviour', null, global);
goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.SignBytes', null, global);
goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.SignatureAndData', null, global);
goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData', 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.ibc.lightclients.solomachine.v3.ClientState = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.lightclients.solomachine.v3.ClientState, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.solomachine.v3.ClientState.displayName = 'proto.ibc.lightclients.solomachine.v3.ClientState';
}
/**
* 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.ibc.lightclients.solomachine.v3.ConsensusState = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.lightclients.solomachine.v3.ConsensusState, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.displayName = 'proto.ibc.lightclients.solomachine.v3.ConsensusState';
}
/**
* 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.ibc.lightclients.solomachine.v3.Header = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.lightclients.solomachine.v3.Header, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.solomachine.v3.Header.displayName = 'proto.ibc.lightclients.solomachine.v3.Header';
}
/**
* 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.ibc.lightclients.solomachine.v3.Misbehaviour = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.lightclients.solomachine.v3.Misbehaviour, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.displayName = 'proto.ibc.lightclients.solomachine.v3.Misbehaviour';
}
/**
* 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.ibc.lightclients.solomachine.v3.SignatureAndData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.lightclients.solomachine.v3.SignatureAndData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.displayName = 'proto.ibc.lightclients.solomachine.v3.SignatureAndData';
}
/**
* 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.ibc.lightclients.solomachine.v3.TimestampedSignatureData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.displayName = 'proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData';
}
/**
* 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.ibc.lightclients.solomachine.v3.SignBytes = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.lightclients.solomachine.v3.SignBytes, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.displayName = 'proto.ibc.lightclients.solomachine.v3.SignBytes';
}
/**
* 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.ibc.lightclients.solomachine.v3.HeaderData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.lightclients.solomachine.v3.HeaderData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.displayName = 'proto.ibc.lightclients.solomachine.v3.HeaderData';
}
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.ibc.lightclients.solomachine.v3.ClientState.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.lightclients.solomachine.v3.ClientState.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.ibc.lightclients.solomachine.v3.ClientState} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.ClientState.toObject = function(includeInstance, msg) {
var f, obj = {
sequence: jspb.Message.getFieldWithDefault(msg, 1, 0),
isFrozen: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
consensusState: (f = msg.getConsensusState()) && proto.ibc.lightclients.solomachine.v3.ConsensusState.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.ibc.lightclients.solomachine.v3.ClientState}
*/
proto.ibc.lightclients.solomachine.v3.ClientState.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.lightclients.solomachine.v3.ClientState;
return proto.ibc.lightclients.solomachine.v3.ClientState.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.solomachine.v3.ClientState} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.solomachine.v3.ClientState}
*/
proto.ibc.lightclients.solomachine.v3.ClientState.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.setSequence(value);
break;
case 2:
var value = /** @type {boolean} */ (reader.readBool());
msg.setIsFrozen(value);
break;
case 3:
var value = new proto.ibc.lightclients.solomachine.v3.ConsensusState;
reader.readMessage(value,proto.ibc.lightclients.solomachine.v3.ConsensusState.deserializeBinaryFromReader);
msg.setConsensusState(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.lightclients.solomachine.v3.ClientState.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.lightclients.solomachine.v3.ClientState} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.ClientState.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getIsFrozen();
if (f) {
writer.writeBool(
2,
f
);
}
f = message.getConsensusState();
if (f != null) {
writer.writeMessage(
3,
f,
proto.ibc.lightclients.solomachine.v3.ConsensusState.serializeBinaryToWriter
);
}
};
/**
* optional uint64 sequence = 1;
* @return {number}
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.lightclients.solomachine.v3.ClientState} returns this
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.setSequence = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional bool is_frozen = 2;
* @return {boolean}
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.getIsFrozen = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};
/**
* @param {boolean} value
* @return {!proto.ibc.lightclients.solomachine.v3.ClientState} returns this
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.setIsFrozen = function(value) {
return jspb.Message.setProto3BooleanField(this, 2, value);
};
/**
* optional ConsensusState consensus_state = 3;
* @return {?proto.ibc.lightclients.solomachine.v3.ConsensusState}
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.getConsensusState = function() {
return /** @type{?proto.ibc.lightclients.solomachine.v3.ConsensusState} */ (
jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v3.ConsensusState, 3));
};
/**
* @param {?proto.ibc.lightclients.solomachine.v3.ConsensusState|undefined} value
* @return {!proto.ibc.lightclients.solomachine.v3.ClientState} returns this
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.setConsensusState = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.solomachine.v3.ClientState} returns this
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.clearConsensusState = function() {
return this.setConsensusState(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.solomachine.v3.ClientState.prototype.hasConsensusState = function() {
return jspb.Message.getField(this, 3) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.lightclients.solomachine.v3.ConsensusState.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.ibc.lightclients.solomachine.v3.ConsensusState} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.toObject = function(includeInstance, msg) {
var f, obj = {
publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
diversifier: jspb.Message.getFieldWithDefault(msg, 2, ""),
timestamp: jspb.Message.getFieldWithDefault(msg, 3, 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.ibc.lightclients.solomachine.v3.ConsensusState}
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.lightclients.solomachine.v3.ConsensusState;
return proto.ibc.lightclients.solomachine.v3.ConsensusState.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.solomachine.v3.ConsensusState} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState}
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setPublicKey(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDiversifier(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setTimestamp(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.lightclients.solomachine.v3.ConsensusState.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.lightclients.solomachine.v3.ConsensusState} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPublicKey();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
f = message.getDiversifier();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getTimestamp();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
};
/**
* optional google.protobuf.Any public_key = 1;
* @return {?proto.google.protobuf.Any}
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.getPublicKey = function() {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1));
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} returns this
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.setPublicKey = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} returns this
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.clearPublicKey = function() {
return this.setPublicKey(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.hasPublicKey = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string diversifier = 2;
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.getDiversifier = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} returns this
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.setDiversifier = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint64 timestamp = 3;
* @return {number}
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.getTimestamp = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} returns this
*/
proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.setTimestamp = function(value) {
return jspb.Message.setProto3IntField(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.ibc.lightclients.solomachine.v3.Header.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.lightclients.solomachine.v3.Header.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.ibc.lightclients.solomachine.v3.Header} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.Header.toObject = function(includeInstance, msg) {
var f, obj = {
timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0),
signature: msg.getSignature_asB64(),
newPublicKey: (f = msg.getNewPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
newDiversifier: jspb.Message.getFieldWithDefault(msg, 4, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.ibc.lightclients.solomachine.v3.Header}
*/
proto.ibc.lightclients.solomachine.v3.Header.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.lightclients.solomachine.v3.Header;
return proto.ibc.lightclients.solomachine.v3.Header.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.solomachine.v3.Header} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.solomachine.v3.Header}
*/
proto.ibc.lightclients.solomachine.v3.Header.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.setTimestamp(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSignature(value);
break;
case 3:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setNewPublicKey(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setNewDiversifier(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.lightclients.solomachine.v3.Header.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.lightclients.solomachine.v3.Header} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.Header.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTimestamp();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getSignature_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getNewPublicKey();
if (f != null) {
writer.writeMessage(
3,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
f = message.getNewDiversifier();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
/**
* optional uint64 timestamp = 1;
* @return {number}
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.getTimestamp = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.setTimestamp = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional bytes signature = 2;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.solomachine.v3.Header.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.ibc.lightclients.solomachine.v3.Header.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.ibc.lightclients.solomachine.v3.Header.prototype.getSignature_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSignature()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.setSignature = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional google.protobuf.Any new_public_key = 3;
* @return {?proto.google.protobuf.Any}
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.getNewPublicKey = function() {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3));
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.setNewPublicKey = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.clearNewPublicKey = function() {
return this.setNewPublicKey(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.hasNewPublicKey = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional string new_diversifier = 4;
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.getNewDiversifier = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this
*/
proto.ibc.lightclients.solomachine.v3.Header.prototype.setNewDiversifier = function(value) {
return jspb.Message.setProto3StringField(this, 4, 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.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.lightclients.solomachine.v3.Misbehaviour.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.ibc.lightclients.solomachine.v3.Misbehaviour} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.toObject = function(includeInstance, msg) {
var f, obj = {
sequence: jspb.Message.getFieldWithDefault(msg, 1, 0),
signatureOne: (f = msg.getSignatureOne()) && proto.ibc.lightclients.solomachine.v3.SignatureAndData.toObject(includeInstance, f),
signatureTwo: (f = msg.getSignatureTwo()) && proto.ibc.lightclients.solomachine.v3.SignatureAndData.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.ibc.lightclients.solomachine.v3.Misbehaviour}
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.lightclients.solomachine.v3.Misbehaviour;
return proto.ibc.lightclients.solomachine.v3.Misbehaviour.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour}
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.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.setSequence(value);
break;
case 2:
var value = new proto.ibc.lightclients.solomachine.v3.SignatureAndData;
reader.readMessage(value,proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinaryFromReader);
msg.setSignatureOne(value);
break;
case 3:
var value = new proto.ibc.lightclients.solomachine.v3.SignatureAndData;
reader.readMessage(value,proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinaryFromReader);
msg.setSignatureTwo(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.lightclients.solomachine.v3.Misbehaviour.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getSignatureOne();
if (f != null) {
writer.writeMessage(
2,
f,
proto.ibc.lightclients.solomachine.v3.SignatureAndData.serializeBinaryToWriter
);
}
f = message.getSignatureTwo();
if (f != null) {
writer.writeMessage(
3,
f,
proto.ibc.lightclients.solomachine.v3.SignatureAndData.serializeBinaryToWriter
);
}
};
/**
* optional uint64 sequence = 1;
* @return {number}
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.setSequence = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional SignatureAndData signature_one = 2;
* @return {?proto.ibc.lightclients.solomachine.v3.SignatureAndData}
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.getSignatureOne = function() {
return /** @type{?proto.ibc.lightclients.solomachine.v3.SignatureAndData} */ (
jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v3.SignatureAndData, 2));
};
/**
* @param {?proto.ibc.lightclients.solomachine.v3.SignatureAndData|undefined} value
* @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.setSignatureOne = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.clearSignatureOne = function() {
return this.setSignatureOne(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.hasSignatureOne = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional SignatureAndData signature_two = 3;
* @return {?proto.ibc.lightclients.solomachine.v3.SignatureAndData}
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.getSignatureTwo = function() {
return /** @type{?proto.ibc.lightclients.solomachine.v3.SignatureAndData} */ (
jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v3.SignatureAndData, 3));
};
/**
* @param {?proto.ibc.lightclients.solomachine.v3.SignatureAndData|undefined} value
* @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.setSignatureTwo = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.clearSignatureTwo = function() {
return this.setSignatureTwo(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.hasSignatureTwo = function() {
return jspb.Message.getField(this, 3) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.lightclients.solomachine.v3.SignatureAndData.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.ibc.lightclients.solomachine.v3.SignatureAndData} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.toObject = function(includeInstance, msg) {
var f, obj = {
signature: msg.getSignature_asB64(),
path: msg.getPath_asB64(),
data: msg.getData_asB64(),
timestamp: jspb.Message.getFieldWithDefault(msg, 4, 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.ibc.lightclients.solomachine.v3.SignatureAndData}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.lightclients.solomachine.v3.SignatureAndData;
return proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSignature(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPath(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint64());
msg.setTimestamp(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.lightclients.solomachine.v3.SignatureAndData.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSignature_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getPath_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
f = message.getTimestamp();
if (f !== 0) {
writer.writeUint64(
4,
f
);
}
};
/**
* optional bytes signature = 1;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getSignature = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes signature = 1;
* This is a type-conversion wrapper around `getSignature()`
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getSignature_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSignature()));
};
/**
* optional bytes signature = 1;
* 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.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getSignature_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSignature()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.setSignature = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bytes path = 2;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getPath = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes path = 2;
* This is a type-conversion wrapper around `getPath()`
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getPath_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPath()));
};
/**
* optional bytes path = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPath()`
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getPath_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPath()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.setPath = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional bytes data = 3;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.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.ibc.lightclients.solomachine.v3.SignatureAndData.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.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.setData = function(value) {
return jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* optional uint64 timestamp = 4;
* @return {number}
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getTimestamp = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.setTimestamp = function(value) {
return jspb.Message.setProto3IntField(this, 4, 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.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.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.ibc.lightclients.solomachine.v3.TimestampedSignatureData} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.toObject = function(includeInstance, msg) {
var f, obj = {
signatureData: msg.getSignatureData_asB64(),
timestamp: 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.ibc.lightclients.solomachine.v3.TimestampedSignatureData}
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData;
return proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData}
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSignatureData(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setTimestamp(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSignatureData_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getTimestamp();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
};
/**
* optional bytes signature_data = 1;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.getSignatureData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes signature_data = 1;
* This is a type-conversion wrapper around `getSignatureData()`
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.getSignatureData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSignatureData()));
};
/**
* optional bytes signature_data = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSignatureData()`
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.getSignatureData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSignatureData()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} returns this
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.setSignatureData = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional uint64 timestamp = 2;
* @return {number}
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.getTimestamp = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} returns this
*/
proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.setTimestamp = function(value) {
return jspb.Message.setProto3IntField(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.ibc.lightclients.solomachine.v3.SignBytes.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.lightclients.solomachine.v3.SignBytes.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.ibc.lightclients.solomachine.v3.SignBytes} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.toObject = function(includeInstance, msg) {
var f, obj = {
sequence: jspb.Message.getFieldWithDefault(msg, 1, 0),
timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0),
diversifier: jspb.Message.getFieldWithDefault(msg, 3, ""),
path: msg.getPath_asB64(),
data: msg.getData_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.ibc.lightclients.solomachine.v3.SignBytes}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.lightclients.solomachine.v3.SignBytes;
return proto.ibc.lightclients.solomachine.v3.SignBytes.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.solomachine.v3.SignBytes} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.solomachine.v3.SignBytes}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.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.setSequence(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setTimestamp(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDiversifier(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPath(value);
break;
case 5:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.lightclients.solomachine.v3.SignBytes.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.lightclients.solomachine.v3.SignBytes} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getTimestamp();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = message.getDiversifier();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getPath_asU8();
if (f.length > 0) {
writer.writeBytes(
4,
f
);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
5,
f
);
}
};
/**
* optional uint64 sequence = 1;
* @return {number}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setSequence = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional uint64 timestamp = 2;
* @return {number}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getTimestamp = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setTimestamp = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional string diversifier = 3;
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getDiversifier = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setDiversifier = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional bytes path = 4;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getPath = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* optional bytes path = 4;
* This is a type-conversion wrapper around `getPath()`
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getPath_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPath()));
};
/**
* optional bytes path = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPath()`
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getPath_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPath()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setPath = function(value) {
return jspb.Message.setProto3BytesField(this, 4, value);
};
/**
* optional bytes data = 5;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* optional bytes data = 5;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getData()));
};
/**
* optional bytes data = 5;
* 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.ibc.lightclients.solomachine.v3.SignBytes.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this
*/
proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setData = function(value) {
return jspb.Message.setProto3BytesField(this, 5, 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.ibc.lightclients.solomachine.v3.HeaderData.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.lightclients.solomachine.v3.HeaderData.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.ibc.lightclients.solomachine.v3.HeaderData} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.toObject = function(includeInstance, msg) {
var f, obj = {
newPubKey: (f = msg.getNewPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
newDiversifier: 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.ibc.lightclients.solomachine.v3.HeaderData}
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.lightclients.solomachine.v3.HeaderData;
return proto.ibc.lightclients.solomachine.v3.HeaderData.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.solomachine.v3.HeaderData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.solomachine.v3.HeaderData}
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setNewPubKey(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setNewDiversifier(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.lightclients.solomachine.v3.HeaderData.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.lightclients.solomachine.v3.HeaderData} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getNewPubKey();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
f = message.getNewDiversifier();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional google.protobuf.Any new_pub_key = 1;
* @return {?proto.google.protobuf.Any}
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.getNewPubKey = function() {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1));
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.ibc.lightclients.solomachine.v3.HeaderData} returns this
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.setNewPubKey = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.solomachine.v3.HeaderData} returns this
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.clearNewPubKey = function() {
return this.setNewPubKey(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.hasNewPubKey = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string new_diversifier = 2;
* @return {string}
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.getNewDiversifier = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.lightclients.solomachine.v3.HeaderData} returns this
*/
proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.setNewDiversifier = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
goog.object.extend(exports, proto.ibc.lightclients.solomachine.v3);