@bandprotocol/bandchain.js
Version:
Library for interacting with BandChain in browser and Node.js environments
916 lines (857 loc) • 28.2 kB
JavaScript
// source: ibc/lightclients/wasm/v1/wasm.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 ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js')
goog.object.extend(proto, ibc_core_client_v1_client_pb)
goog.exportSymbol('proto.ibc.lightclients.wasm.v1.Checksums', null, global)
goog.exportSymbol('proto.ibc.lightclients.wasm.v1.ClientMessage', null, global)
goog.exportSymbol('proto.ibc.lightclients.wasm.v1.ClientState', null, global)
goog.exportSymbol('proto.ibc.lightclients.wasm.v1.ConsensusState', 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.wasm.v1.ClientState = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.ibc.lightclients.wasm.v1.ClientState, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.wasm.v1.ClientState.displayName =
'proto.ibc.lightclients.wasm.v1.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.wasm.v1.ConsensusState = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.ibc.lightclients.wasm.v1.ConsensusState, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.displayName =
'proto.ibc.lightclients.wasm.v1.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.wasm.v1.ClientMessage = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.ibc.lightclients.wasm.v1.ClientMessage, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.displayName =
'proto.ibc.lightclients.wasm.v1.ClientMessage'
}
/**
* 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.wasm.v1.Checksums = function (opt_data) {
jspb.Message.initialize(
this,
opt_data,
0,
-1,
proto.ibc.lightclients.wasm.v1.Checksums.repeatedFields_,
null,
)
}
goog.inherits(proto.ibc.lightclients.wasm.v1.Checksums, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.wasm.v1.Checksums.displayName =
'proto.ibc.lightclients.wasm.v1.Checksums'
}
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.wasm.v1.ClientState.prototype.toObject = function (
opt_includeInstance,
) {
return proto.ibc.lightclients.wasm.v1.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.wasm.v1.ClientState} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.ClientState.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
data: msg.getData_asB64(),
checksum: msg.getChecksum_asB64(),
latestHeight:
(f = msg.getLatestHeight()) &&
ibc_core_client_v1_client_pb.Height.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.wasm.v1.ClientState}
*/
proto.ibc.lightclients.wasm.v1.ClientState.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.ibc.lightclients.wasm.v1.ClientState()
return proto.ibc.lightclients.wasm.v1.ClientState.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.wasm.v1.ClientState} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.wasm.v1.ClientState}
*/
proto.ibc.lightclients.wasm.v1.ClientState.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.setData(value)
break
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes())
msg.setChecksum(value)
break
case 3:
var value = new ibc_core_client_v1_client_pb.Height()
reader.readMessage(
value,
ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader,
)
msg.setLatestHeight(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.ibc.lightclients.wasm.v1.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.wasm.v1.ClientState} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.ClientState.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getData_asU8()
if (f.length > 0) {
writer.writeBytes(1, f)
}
f = message.getChecksum_asU8()
if (f.length > 0) {
writer.writeBytes(2, f)
}
f = message.getLatestHeight()
if (f != null) {
writer.writeMessage(
3,
f,
ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter,
)
}
}
/**
* optional bytes data = 1;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.getData = function () {
return /** @type {!(string|Uint8Array)} */ (
jspb.Message.getFieldWithDefault(this, 1, '')
)
}
/**
* optional bytes data = 1;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.getData_asB64 =
function () {
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData()))
}
/**
* optional bytes data = 1;
* 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.wasm.v1.ClientState.prototype.getData_asU8 =
function () {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData()))
}
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.wasm.v1.ClientState} returns this
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.setData = function (
value,
) {
return jspb.Message.setProto3BytesField(this, 1, value)
}
/**
* optional bytes checksum = 2;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.getChecksum = function () {
return /** @type {!(string|Uint8Array)} */ (
jspb.Message.getFieldWithDefault(this, 2, '')
)
}
/**
* optional bytes checksum = 2;
* This is a type-conversion wrapper around `getChecksum()`
* @return {string}
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.getChecksum_asB64 =
function () {
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getChecksum()))
}
/**
* optional bytes checksum = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getChecksum()`
* @return {!Uint8Array}
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.getChecksum_asU8 =
function () {
return /** @type {!Uint8Array} */ (
jspb.Message.bytesAsU8(this.getChecksum())
)
}
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.wasm.v1.ClientState} returns this
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.setChecksum = function (
value,
) {
return jspb.Message.setProto3BytesField(this, 2, value)
}
/**
* optional ibc.core.client.v1.Height latest_height = 3;
* @return {?proto.ibc.core.client.v1.Height}
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.getLatestHeight =
function () {
return /** @type{?proto.ibc.core.client.v1.Height} */ (
jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)
)
}
/**
* @param {?proto.ibc.core.client.v1.Height|undefined} value
* @return {!proto.ibc.lightclients.wasm.v1.ClientState} returns this
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.setLatestHeight =
function (value) {
return jspb.Message.setWrapperField(this, 3, value)
}
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.wasm.v1.ClientState} returns this
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.clearLatestHeight =
function () {
return this.setLatestHeight(undefined)
}
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.wasm.v1.ClientState.prototype.hasLatestHeight =
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.wasm.v1.ConsensusState.prototype.toObject = function (
opt_includeInstance,
) {
return proto.ibc.lightclients.wasm.v1.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.wasm.v1.ConsensusState} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
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.wasm.v1.ConsensusState}
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.ibc.lightclients.wasm.v1.ConsensusState()
return proto.ibc.lightclients.wasm.v1.ConsensusState.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.wasm.v1.ConsensusState} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.wasm.v1.ConsensusState}
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.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.setData(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.ibc.lightclients.wasm.v1.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.wasm.v1.ConsensusState} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getData_asU8()
if (f.length > 0) {
writer.writeBytes(1, f)
}
}
/**
* optional bytes data = 1;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.getData = function () {
return /** @type {!(string|Uint8Array)} */ (
jspb.Message.getFieldWithDefault(this, 1, '')
)
}
/**
* optional bytes data = 1;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.getData_asB64 =
function () {
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData()))
}
/**
* optional bytes data = 1;
* 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.wasm.v1.ConsensusState.prototype.getData_asU8 =
function () {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData()))
}
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.wasm.v1.ConsensusState} returns this
*/
proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.setData = function (
value,
) {
return jspb.Message.setProto3BytesField(this, 1, 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.wasm.v1.ClientMessage.prototype.toObject = function (
opt_includeInstance,
) {
return proto.ibc.lightclients.wasm.v1.ClientMessage.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.wasm.v1.ClientMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
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.wasm.v1.ClientMessage}
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.ibc.lightclients.wasm.v1.ClientMessage()
return proto.ibc.lightclients.wasm.v1.ClientMessage.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.wasm.v1.ClientMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.wasm.v1.ClientMessage}
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.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.setData(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.ibc.lightclients.wasm.v1.ClientMessage.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.wasm.v1.ClientMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getData_asU8()
if (f.length > 0) {
writer.writeBytes(1, f)
}
}
/**
* optional bytes data = 1;
* @return {!(string|Uint8Array)}
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.getData = function () {
return /** @type {!(string|Uint8Array)} */ (
jspb.Message.getFieldWithDefault(this, 1, '')
)
}
/**
* optional bytes data = 1;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.getData_asB64 =
function () {
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData()))
}
/**
* optional bytes data = 1;
* 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.wasm.v1.ClientMessage.prototype.getData_asU8 =
function () {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData()))
}
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.wasm.v1.ClientMessage} returns this
*/
proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.setData = function (
value,
) {
return jspb.Message.setProto3BytesField(this, 1, value)
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.ibc.lightclients.wasm.v1.Checksums.repeatedFields_ = [1]
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.ibc.lightclients.wasm.v1.Checksums.prototype.toObject = function (
opt_includeInstance,
) {
return proto.ibc.lightclients.wasm.v1.Checksums.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.wasm.v1.Checksums} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.Checksums.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
checksumsList: msg.getChecksumsList_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.wasm.v1.Checksums}
*/
proto.ibc.lightclients.wasm.v1.Checksums.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.ibc.lightclients.wasm.v1.Checksums()
return proto.ibc.lightclients.wasm.v1.Checksums.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.lightclients.wasm.v1.Checksums} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.wasm.v1.Checksums}
*/
proto.ibc.lightclients.wasm.v1.Checksums.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.addChecksums(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.lightclients.wasm.v1.Checksums.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.ibc.lightclients.wasm.v1.Checksums.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.wasm.v1.Checksums} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.Checksums.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getChecksumsList_asU8()
if (f.length > 0) {
writer.writeRepeatedBytes(1, f)
}
}
/**
* repeated bytes checksums = 1;
* @return {!(Array<!Uint8Array>|Array<string>)}
*/
proto.ibc.lightclients.wasm.v1.Checksums.prototype.getChecksumsList =
function () {
return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (
jspb.Message.getRepeatedField(this, 1)
)
}
/**
* repeated bytes checksums = 1;
* This is a type-conversion wrapper around `getChecksumsList()`
* @return {!Array<string>}
*/
proto.ibc.lightclients.wasm.v1.Checksums.prototype.getChecksumsList_asB64 =
function () {
return /** @type {!Array<string>} */ (
jspb.Message.bytesListAsB64(this.getChecksumsList())
)
}
/**
* repeated bytes checksums = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getChecksumsList()`
* @return {!Array<!Uint8Array>}
*/
proto.ibc.lightclients.wasm.v1.Checksums.prototype.getChecksumsList_asU8 =
function () {
return /** @type {!Array<!Uint8Array>} */ (
jspb.Message.bytesListAsU8(this.getChecksumsList())
)
}
/**
* @param {!(Array<!Uint8Array>|Array<string>)} value
* @return {!proto.ibc.lightclients.wasm.v1.Checksums} returns this
*/
proto.ibc.lightclients.wasm.v1.Checksums.prototype.setChecksumsList = function (
value,
) {
return jspb.Message.setField(this, 1, value || [])
}
/**
* @param {!(string|Uint8Array)} value
* @param {number=} opt_index
* @return {!proto.ibc.lightclients.wasm.v1.Checksums} returns this
*/
proto.ibc.lightclients.wasm.v1.Checksums.prototype.addChecksums = function (
value,
opt_index,
) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index)
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.ibc.lightclients.wasm.v1.Checksums} returns this
*/
proto.ibc.lightclients.wasm.v1.Checksums.prototype.clearChecksumsList =
function () {
return this.setChecksumsList([])
}
goog.object.extend(exports, proto.ibc.lightclients.wasm.v1)