@bandprotocol/bandchain.js
Version:
Library for interacting with BandChain in browser and Node.js environments
850 lines (799 loc) • 26.9 kB
JavaScript
// source: ibc/lightclients/wasm/v1/query.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 google_api_annotations_pb = require('../../../../google/api/annotations_pb.js')
goog.object.extend(proto, google_api_annotations_pb)
var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js')
goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb)
goog.exportSymbol(
'proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest',
null,
global,
)
goog.exportSymbol(
'proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse',
null,
global,
)
goog.exportSymbol(
'proto.ibc.lightclients.wasm.v1.QueryCodeRequest',
null,
global,
)
goog.exportSymbol(
'proto.ibc.lightclients.wasm.v1.QueryCodeResponse',
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.QueryChecksumsRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest,
jspb.Message,
)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.displayName =
'proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest'
}
/**
* 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.QueryChecksumsResponse = function (opt_data) {
jspb.Message.initialize(
this,
opt_data,
0,
-1,
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.repeatedFields_,
null,
)
}
goog.inherits(
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse,
jspb.Message,
)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.displayName =
'proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse'
}
/**
* 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.QueryCodeRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.ibc.lightclients.wasm.v1.QueryCodeRequest, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.wasm.v1.QueryCodeRequest.displayName =
'proto.ibc.lightclients.wasm.v1.QueryCodeRequest'
}
/**
* 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.QueryCodeResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.ibc.lightclients.wasm.v1.QueryCodeResponse, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.lightclients.wasm.v1.QueryCodeResponse.displayName =
'proto.ibc.lightclients.wasm.v1.QueryCodeResponse'
}
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.QueryChecksumsRequest.prototype.toObject =
function (opt_includeInstance) {
return proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.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.QueryChecksumsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
pagination:
(f = msg.getPagination()) &&
cosmos_base_query_v1beta1_pagination_pb.PageRequest.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.QueryChecksumsRequest}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.deserializeBinary =
function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest()
return proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.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.QueryChecksumsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.deserializeBinaryFromReader =
function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break
}
var field = reader.getFieldNumber()
switch (field) {
case 1:
var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest()
reader.readMessage(
value,
cosmos_base_query_v1beta1_pagination_pb.PageRequest
.deserializeBinaryFromReader,
)
msg.setPagination(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.QueryChecksumsRequest.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.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.QueryChecksumsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getPagination()
if (f != null) {
writer.writeMessage(
1,
f,
cosmos_base_query_v1beta1_pagination_pb.PageRequest
.serializeBinaryToWriter,
)
}
}
/**
* optional cosmos.base.query.v1beta1.PageRequest pagination = 1;
* @return {?proto.cosmos.base.query.v1beta1.PageRequest}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.getPagination =
function () {
return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ (
jspb.Message.getWrapperField(
this,
cosmos_base_query_v1beta1_pagination_pb.PageRequest,
1,
)
)
}
/**
* @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value
* @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.setPagination =
function (value) {
return jspb.Message.setWrapperField(this, 1, value)
}
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.clearPagination =
function () {
return this.setPagination(undefined)
}
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.hasPagination =
function () {
return jspb.Message.getField(this, 1) != null
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.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.QueryChecksumsResponse.prototype.toObject =
function (opt_includeInstance) {
return proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.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.QueryChecksumsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
checksumsList:
(f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
pagination:
(f = msg.getPagination()) &&
cosmos_base_query_v1beta1_pagination_pb.PageResponse.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.QueryChecksumsResponse}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.deserializeBinary =
function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse()
return proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.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.QueryChecksumsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.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.addChecksums(value)
break
case 2:
var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse()
reader.readMessage(
value,
cosmos_base_query_v1beta1_pagination_pb.PageResponse
.deserializeBinaryFromReader,
)
msg.setPagination(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.QueryChecksumsResponse.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.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.QueryChecksumsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getChecksumsList()
if (f.length > 0) {
writer.writeRepeatedString(1, f)
}
f = message.getPagination()
if (f != null) {
writer.writeMessage(
2,
f,
cosmos_base_query_v1beta1_pagination_pb.PageResponse
.serializeBinaryToWriter,
)
}
}
/**
* repeated string checksums = 1;
* @return {!Array<string>}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.getChecksumsList =
function () {
return /** @type {!Array<string>} */ (
jspb.Message.getRepeatedField(this, 1)
)
}
/**
* @param {!Array<string>} value
* @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.setChecksumsList =
function (value) {
return jspb.Message.setField(this, 1, value || [])
}
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.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.QueryChecksumsResponse} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.clearChecksumsList =
function () {
return this.setChecksumsList([])
}
/**
* optional cosmos.base.query.v1beta1.PageResponse pagination = 2;
* @return {?proto.cosmos.base.query.v1beta1.PageResponse}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.getPagination =
function () {
return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ (
jspb.Message.getWrapperField(
this,
cosmos_base_query_v1beta1_pagination_pb.PageResponse,
2,
)
)
}
/**
* @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value
* @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.setPagination =
function (value) {
return jspb.Message.setWrapperField(this, 2, value)
}
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.clearPagination =
function () {
return this.setPagination(undefined)
}
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.hasPagination =
function () {
return jspb.Message.getField(this, 2) != 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.QueryCodeRequest.prototype.toObject =
function (opt_includeInstance) {
return proto.ibc.lightclients.wasm.v1.QueryCodeRequest.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.QueryCodeRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.QueryCodeRequest.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
checksum: jspb.Message.getFieldWithDefault(msg, 1, ''),
}
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.QueryCodeRequest}
*/
proto.ibc.lightclients.wasm.v1.QueryCodeRequest.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.ibc.lightclients.wasm.v1.QueryCodeRequest()
return proto.ibc.lightclients.wasm.v1.QueryCodeRequest.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.QueryCodeRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.wasm.v1.QueryCodeRequest}
*/
proto.ibc.lightclients.wasm.v1.QueryCodeRequest.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.setChecksum(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.QueryCodeRequest.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.ibc.lightclients.wasm.v1.QueryCodeRequest.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.QueryCodeRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.QueryCodeRequest.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getChecksum()
if (f.length > 0) {
writer.writeString(1, f)
}
}
/**
* optional string checksum = 1;
* @return {string}
*/
proto.ibc.lightclients.wasm.v1.QueryCodeRequest.prototype.getChecksum =
function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ''))
}
/**
* @param {string} value
* @return {!proto.ibc.lightclients.wasm.v1.QueryCodeRequest} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryCodeRequest.prototype.setChecksum =
function (value) {
return jspb.Message.setProto3StringField(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.QueryCodeResponse.prototype.toObject =
function (opt_includeInstance) {
return proto.ibc.lightclients.wasm.v1.QueryCodeResponse.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.QueryCodeResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.QueryCodeResponse.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.QueryCodeResponse}
*/
proto.ibc.lightclients.wasm.v1.QueryCodeResponse.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.ibc.lightclients.wasm.v1.QueryCodeResponse()
return proto.ibc.lightclients.wasm.v1.QueryCodeResponse.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.QueryCodeResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.lightclients.wasm.v1.QueryCodeResponse}
*/
proto.ibc.lightclients.wasm.v1.QueryCodeResponse.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.QueryCodeResponse.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.ibc.lightclients.wasm.v1.QueryCodeResponse.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.QueryCodeResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.lightclients.wasm.v1.QueryCodeResponse.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.QueryCodeResponse.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.QueryCodeResponse.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.QueryCodeResponse.prototype.getData_asU8 =
function () {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData()))
}
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.lightclients.wasm.v1.QueryCodeResponse} returns this
*/
proto.ibc.lightclients.wasm.v1.QueryCodeResponse.prototype.setData = function (
value,
) {
return jspb.Message.setProto3BytesField(this, 1, value)
}
goog.object.extend(exports, proto.ibc.lightclients.wasm.v1)