UNPKG

@bandprotocol/bandchain.js

Version:

Library for interacting with BandChain in browser and Node.js environments

1,601 lines (1,526 loc) 133 kB
// source: ibc/lightclients/solomachine/v2/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 ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js') goog.object.extend(proto, ibc_core_connection_v1_connection_pb) var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js') goog.object.extend(proto, ibc_core_channel_v1_channel_pb) 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.v2.ChannelStateData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.ClientState', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.ClientStateData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.ConnectionStateData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.ConsensusState', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.ConsensusStateData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.DataType', null, global, ) goog.exportSymbol('proto.ibc.lightclients.solomachine.v2.Header', null, global) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.HeaderData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.Misbehaviour', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.PacketCommitmentData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.SignBytes', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.SignatureAndData', null, global, ) goog.exportSymbol( 'proto.ibc.lightclients.solomachine.v2.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.v2.ClientState = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.lightclients.solomachine.v2.ClientState, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.ClientState.displayName = 'proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.ConsensusState, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.ConsensusState.displayName = 'proto.ibc.lightclients.solomachine.v2.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.v2.Header = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.lightclients.solomachine.v2.Header, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.Header.displayName = 'proto.ibc.lightclients.solomachine.v2.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.v2.Misbehaviour = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.lightclients.solomachine.v2.Misbehaviour, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.displayName = 'proto.ibc.lightclients.solomachine.v2.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.v2.SignatureAndData = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.SignatureAndData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.SignatureAndData.displayName = 'proto.ibc.lightclients.solomachine.v2.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.v2.TimestampedSignatureData = function ( opt_data, ) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.TimestampedSignatureData.displayName = 'proto.ibc.lightclients.solomachine.v2.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.v2.SignBytes = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.lightclients.solomachine.v2.SignBytes, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.SignBytes.displayName = 'proto.ibc.lightclients.solomachine.v2.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.v2.HeaderData = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.ibc.lightclients.solomachine.v2.HeaderData, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.HeaderData.displayName = 'proto.ibc.lightclients.solomachine.v2.HeaderData' } /** * 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.v2.ClientStateData = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.ClientStateData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.ClientStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ClientStateData' } /** * 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.v2.ConsensusStateData = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.ConsensusStateData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.ConsensusStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ConsensusStateData' } /** * 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.v2.ConnectionStateData = function ( opt_data, ) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.ConnectionStateData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.ConnectionStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ConnectionStateData' } /** * 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.v2.ChannelStateData = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.ChannelStateData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.ChannelStateData.displayName = 'proto.ibc.lightclients.solomachine.v2.ChannelStateData' } /** * 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.v2.PacketCommitmentData = function ( opt_data, ) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.PacketCommitmentData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.PacketCommitmentData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketCommitmentData' } /** * 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.v2.PacketAcknowledgementData = function ( opt_data, ) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketAcknowledgementData' } /** * 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.v2.PacketReceiptAbsenceData = function ( opt_data, ) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.displayName = 'proto.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData' } /** * 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.v2.NextSequenceRecvData = function ( opt_data, ) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData.displayName = 'proto.ibc.lightclients.solomachine.v2.NextSequenceRecvData' } 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.v2.ClientState.prototype.toObject = function (opt_includeInstance) { return proto.ibc.lightclients.solomachine.v2.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.v2.ClientState} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState.toObject( includeInstance, f, ), allowUpdateAfterProposal: jspb.Message.getBooleanFieldWithDefault( msg, 4, false, ), } 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.v2.ClientState} */ proto.ibc.lightclients.solomachine.v2.ClientState.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.lightclients.solomachine.v2.ClientState() return proto.ibc.lightclients.solomachine.v2.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.v2.ClientState} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} */ proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState() reader.readMessage( value, proto.ibc.lightclients.solomachine.v2.ConsensusState .deserializeBinaryFromReader, ) msg.setConsensusState(value) break case 4: var value = /** @type {boolean} */ (reader.readBool()) msg.setAllowUpdateAfterProposal(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.lightclients.solomachine.v2.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.v2.ClientState} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState .serializeBinaryToWriter, ) } f = message.getAllowUpdateAfterProposal() if (f) { writer.writeBool(4, f) } } /** * optional uint64 sequence = 1; * @return {number} */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getSequence = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) } /** * @param {number} value * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setSequence = function (value) { return jspb.Message.setProto3IntField(this, 1, value) } /** * optional bool is_frozen = 2; * @return {boolean} */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getIsFrozen = function () { return /** @type {boolean} */ ( jspb.Message.getBooleanFieldWithDefault(this, 2, false) ) } /** * @param {boolean} value * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setIsFrozen = function (value) { return jspb.Message.setProto3BooleanField(this, 2, value) } /** * optional ConsensusState consensus_state = 3; * @return {?proto.ibc.lightclients.solomachine.v2.ConsensusState} */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getConsensusState = function () { return /** @type{?proto.ibc.lightclients.solomachine.v2.ConsensusState} */ ( jspb.Message.getWrapperField( this, proto.ibc.lightclients.solomachine.v2.ConsensusState, 3, ) ) } /** * @param {?proto.ibc.lightclients.solomachine.v2.ConsensusState|undefined} value * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setConsensusState = function (value) { return jspb.Message.setWrapperField(this, 3, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.clearConsensusState = function () { return this.setConsensusState(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.hasConsensusState = function () { return jspb.Message.getField(this, 3) != null } /** * optional bool allow_update_after_proposal = 4; * @return {boolean} */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.getAllowUpdateAfterProposal = function () { return /** @type {boolean} */ ( jspb.Message.getBooleanFieldWithDefault(this, 4, false) ) } /** * @param {boolean} value * @return {!proto.ibc.lightclients.solomachine.v2.ClientState} returns this */ proto.ibc.lightclients.solomachine.v2.ClientState.prototype.setAllowUpdateAfterProposal = function (value) { return jspb.Message.setProto3BooleanField(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.v2.ConsensusState.prototype.toObject = function (opt_includeInstance) { return proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState} */ proto.ibc.lightclients.solomachine.v2.ConsensusState.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.lightclients.solomachine.v2.ConsensusState() return proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} */ proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.lightclients.solomachine.v2.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.v2.ConsensusState} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.lightclients.solomachine.v2.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.v2.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.v2.ConsensusState} returns this */ proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.setPublicKey = function (value) { return jspb.Message.setWrapperField(this, 1, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this */ proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.clearPublicKey = function () { return this.setPublicKey(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.hasPublicKey = function () { return jspb.Message.getField(this, 1) != null } /** * optional string diversifier = 2; * @return {string} */ proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.getDiversifier = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this */ proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.setDiversifier = function (value) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional uint64 timestamp = 3; * @return {number} */ proto.ibc.lightclients.solomachine.v2.ConsensusState.prototype.getTimestamp = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) } /** * @param {number} value * @return {!proto.ibc.lightclients.solomachine.v2.ConsensusState} returns this */ proto.ibc.lightclients.solomachine.v2.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.v2.Header.prototype.toObject = function ( opt_includeInstance, ) { return proto.ibc.lightclients.solomachine.v2.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.v2.Header} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.lightclients.solomachine.v2.Header.toObject = function ( includeInstance, msg, ) { var f, obj = { sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), signature: msg.getSignature_asB64(), newPublicKey: (f = msg.getNewPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), newDiversifier: jspb.Message.getFieldWithDefault(msg, 5, ''), } if (includeInstance) { obj.$jspbMessageInstance = msg } return obj } } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ibc.lightclients.solomachine.v2.Header} */ proto.ibc.lightclients.solomachine.v2.Header.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.lightclients.solomachine.v2.Header() return proto.ibc.lightclients.solomachine.v2.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.v2.Header} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.lightclients.solomachine.v2.Header} */ proto.ibc.lightclients.solomachine.v2.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.setSequence(value) break case 2: var value = /** @type {number} */ (reader.readUint64()) msg.setTimestamp(value) break case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.setSignature(value) break case 4: var value = new google_protobuf_any_pb.Any() reader.readMessage( value, google_protobuf_any_pb.Any.deserializeBinaryFromReader, ) msg.setNewPublicKey(value) break case 5: 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.v2.Header.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.lightclients.solomachine.v2.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.v2.Header} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.lightclients.solomachine.v2.Header.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.getSignature_asU8() if (f.length > 0) { writer.writeBytes(3, f) } f = message.getNewPublicKey() if (f != null) { writer.writeMessage( 4, f, google_protobuf_any_pb.Any.serializeBinaryToWriter, ) } f = message.getNewDiversifier() if (f.length > 0) { writer.writeString(5, f) } } /** * optional uint64 sequence = 1; * @return {number} */ proto.ibc.lightclients.solomachine.v2.Header.prototype.getSequence = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) } /** * @param {number} value * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this */ proto.ibc.lightclients.solomachine.v2.Header.prototype.setSequence = function ( value, ) { return jspb.Message.setProto3IntField(this, 1, value) } /** * optional uint64 timestamp = 2; * @return {number} */ proto.ibc.lightclients.solomachine.v2.Header.prototype.getTimestamp = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) } /** * @param {number} value * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this */ proto.ibc.lightclients.solomachine.v2.Header.prototype.setTimestamp = function ( value, ) { return jspb.Message.setProto3IntField(this, 2, value) } /** * optional bytes signature = 3; * @return {!(string|Uint8Array)} */ proto.ibc.lightclients.solomachine.v2.Header.prototype.getSignature = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 3, '') ) } /** * optional bytes signature = 3; * This is a type-conversion wrapper around `getSignature()` * @return {string} */ proto.ibc.lightclients.solomachine.v2.Header.prototype.getSignature_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getSignature())) } /** * optional bytes signature = 3; * 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.v2.Header.prototype.getSignature_asU8 = function () { return /** @type {!Uint8Array} */ ( jspb.Message.bytesAsU8(this.getSignature()) ) } /** * @param {!(string|Uint8Array)} value * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this */ proto.ibc.lightclients.solomachine.v2.Header.prototype.setSignature = function ( value, ) { return jspb.Message.setProto3BytesField(this, 3, value) } /** * optional google.protobuf.Any new_public_key = 4; * @return {?proto.google.protobuf.Any} */ proto.ibc.lightclients.solomachine.v2.Header.prototype.getNewPublicKey = function () { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4) ) } /** * @param {?proto.google.protobuf.Any|undefined} value * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this */ proto.ibc.lightclients.solomachine.v2.Header.prototype.setNewPublicKey = function (value) { return jspb.Message.setWrapperField(this, 4, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this */ proto.ibc.lightclients.solomachine.v2.Header.prototype.clearNewPublicKey = function () { return this.setNewPublicKey(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.lightclients.solomachine.v2.Header.prototype.hasNewPublicKey = function () { return jspb.Message.getField(this, 4) != null } /** * optional string new_diversifier = 5; * @return {string} */ proto.ibc.lightclients.solomachine.v2.Header.prototype.getNewDiversifier = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) } /** * @param {string} value * @return {!proto.ibc.lightclients.solomachine.v2.Header} returns this */ proto.ibc.lightclients.solomachine.v2.Header.prototype.setNewDiversifier = function (value) { return jspb.Message.setProto3StringField(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.v2.Misbehaviour.prototype.toObject = function (opt_includeInstance) { return proto.ibc.lightclients.solomachine.v2.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.v2.Misbehaviour} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.toObject = function ( includeInstance, msg, ) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, ''), sequence: jspb.Message.getFieldWithDefault(msg, 2, 0), signatureOne: (f = msg.getSignatureOne()) && proto.ibc.lightclients.solomachine.v2.SignatureAndData.toObject( includeInstance, f, ), signatureTwo: (f = msg.getSignatureTwo()) && proto.ibc.lightclients.solomachine.v2.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.v2.Misbehaviour} */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.ibc.lightclients.solomachine.v2.Misbehaviour() return proto.ibc.lightclients.solomachine.v2.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.v2.Misbehaviour} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.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.setClientId(value) break case 2: var value = /** @type {number} */ (reader.readUint64()) msg.setSequence(value) break case 3: var value = new proto.ibc.lightclients.solomachine.v2.SignatureAndData() reader.readMessage( value, proto.ibc.lightclients.solomachine.v2.SignatureAndData .deserializeBinaryFromReader, ) msg.setSignatureOne(value) break case 4: var value = new proto.ibc.lightclients.solomachine.v2.SignatureAndData() reader.readMessage( value, proto.ibc.lightclients.solomachine.v2.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.v2.Misbehaviour.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.ibc.lightclients.solomachine.v2.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.v2.Misbehaviour} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getClientId() if (f.length > 0) { writer.writeString(1, f) } f = message.getSequence() if (f !== 0) { writer.writeUint64(2, f) } f = message.getSignatureOne() if (f != null) { writer.writeMessage( 3, f, proto.ibc.lightclients.solomachine.v2.SignatureAndData .serializeBinaryToWriter, ) } f = message.getSignatureTwo() if (f != null) { writer.writeMessage( 4, f, proto.ibc.lightclients.solomachine.v2.SignatureAndData .serializeBinaryToWriter, ) } } /** * optional string client_id = 1; * @return {string} */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getClientId = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setClientId = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional uint64 sequence = 2; * @return {number} */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSequence = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) } /** * @param {number} value * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSequence = function (value) { return jspb.Message.setProto3IntField(this, 2, value) } /** * optional SignatureAndData signature_one = 3; * @return {?proto.ibc.lightclients.solomachine.v2.SignatureAndData} */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSignatureOne = function () { return /** @type{?proto.ibc.lightclients.solomachine.v2.SignatureAndData} */ ( jspb.Message.getWrapperField( this, proto.ibc.lightclients.solomachine.v2.SignatureAndData, 3, ) ) } /** * @param {?proto.ibc.lightclients.solomachine.v2.SignatureAndData|undefined} value * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSignatureOne = function (value) { return jspb.Message.setWrapperField(this, 3, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.clearSignatureOne = function () { return this.setSignatureOne(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.hasSignatureOne = function () { return jspb.Message.getField(this, 3) != null } /** * optional SignatureAndData signature_two = 4; * @return {?proto.ibc.lightclients.solomachine.v2.SignatureAndData} */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.getSignatureTwo = function () { return /** @type{?proto.ibc.lightclients.solomachine.v2.SignatureAndData} */ ( jspb.Message.getWrapperField( this, proto.ibc.lightclients.solomachine.v2.SignatureAndData, 4, ) ) } /** * @param {?proto.ibc.lightclients.solomachine.v2.SignatureAndData|undefined} value * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.setSignatureTwo = function (value) { return jspb.Message.setWrapperField(this, 4, value) } /** * Clears the message field making it undefined. * @return {!proto.ibc.lightclients.solomachine.v2.Misbehaviour} returns this */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.clearSignatureTwo = function () { return this.setSignatureTwo(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.ibc.lightclients.solomachine.v2.Misbehaviour.prototype.hasSignatureTwo = function () { return jspb.Message.getField(this, 4) != 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 *