UNPKG

@bandprotocol/bandchain.js

Version:

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

1,606 lines (1,516 loc) 51.2 kB
// source: cosmos/authz/v1beta1/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) var cosmos_authz_v1beta1_authz_pb = require('../../../cosmos/authz/v1beta1/authz_pb.js') goog.object.extend(proto, cosmos_authz_v1beta1_authz_pb) var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') goog.object.extend(proto, cosmos_proto_cosmos_pb) goog.exportSymbol( 'proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest', null, global, ) goog.exportSymbol( 'proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse', null, global, ) goog.exportSymbol( 'proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest', null, global, ) goog.exportSymbol( 'proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse', null, global, ) goog.exportSymbol('proto.cosmos.authz.v1beta1.QueryGrantsRequest', null, global) goog.exportSymbol( 'proto.cosmos.authz.v1beta1.QueryGrantsResponse', 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.cosmos.authz.v1beta1.QueryGrantsRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.authz.v1beta1.QueryGrantsRequest, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.displayName = 'proto.cosmos.authz.v1beta1.QueryGrantsRequest' } /** * 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.cosmos.authz.v1beta1.QueryGrantsResponse = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.QueryGrantsResponse.repeatedFields_, null, ) } goog.inherits(proto.cosmos.authz.v1beta1.QueryGrantsResponse, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.displayName = 'proto.cosmos.authz.v1beta1.QueryGrantsResponse' } /** * 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.cosmos.authz.v1beta1.QueryGranterGrantsRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.displayName = 'proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest' } /** * 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.cosmos.authz.v1beta1.QueryGranterGrantsResponse = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.repeatedFields_, null, ) } goog.inherits( proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.displayName = 'proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse' } /** * 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.cosmos.authz.v1beta1.QueryGranteeGrantsRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.displayName = 'proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest' } /** * 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.cosmos.authz.v1beta1.QueryGranteeGrantsResponse = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.repeatedFields_, null, ) } goog.inherits( proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.displayName = 'proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse' } 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.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.authz.v1beta1.QueryGrantsRequest.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.cosmos.authz.v1beta1.QueryGrantsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.toObject = function ( includeInstance, msg, ) { var f, obj = { granter: jspb.Message.getFieldWithDefault(msg, 1, ''), grantee: jspb.Message.getFieldWithDefault(msg, 2, ''), msgTypeUrl: jspb.Message.getFieldWithDefault(msg, 3, ''), 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.cosmos.authz.v1beta1.QueryGrantsRequest} */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.authz.v1beta1.QueryGrantsRequest() return proto.cosmos.authz.v1beta1.QueryGrantsRequest.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.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.setGranter(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.setGrantee(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.setMsgTypeUrl(value) break case 4: 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.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.authz.v1beta1.QueryGrantsRequest.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getGranter() if (f.length > 0) { writer.writeString(1, f) } f = message.getGrantee() if (f.length > 0) { writer.writeString(2, f) } f = message.getMsgTypeUrl() if (f.length > 0) { writer.writeString(3, f) } f = message.getPagination() if (f != null) { writer.writeMessage( 4, f, cosmos_base_query_v1beta1_pagination_pb.PageRequest .serializeBinaryToWriter, ) } } /** * optional string granter = 1; * @return {string} */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.getGranter = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.setGranter = function ( value, ) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string grantee = 2; * @return {string} */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.getGrantee = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.setGrantee = function ( value, ) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional string msg_type_url = 3; * @return {string} */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.getMsgTypeUrl = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) } /** * @param {string} value * @return {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.setMsgTypeUrl = function (value) { return jspb.Message.setProto3StringField(this, 3, value) } /** * optional cosmos.base.query.v1beta1.PageRequest pagination = 4; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.getPagination = function () { return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( jspb.Message.getWrapperField( this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 4, ) ) } /** * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value * @return {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 4, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.authz.v1beta1.QueryGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.clearPagination = function () { return this.setPagination(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.authz.v1beta1.QueryGrantsRequest.prototype.hasPagination = function () { return jspb.Message.getField(this, 4) != null } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.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.cosmos.authz.v1beta1.QueryGrantsResponse.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.authz.v1beta1.QueryGrantsResponse.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.cosmos.authz.v1beta1.QueryGrantsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.toObject = function ( includeInstance, msg, ) { var f, obj = { grantsList: jspb.Message.toObjectList( msg.getGrantsList(), cosmos_authz_v1beta1_authz_pb.Grant.toObject, includeInstance, ), 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.cosmos.authz.v1beta1.QueryGrantsResponse} */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.authz.v1beta1.QueryGrantsResponse() return proto.cosmos.authz.v1beta1.QueryGrantsResponse.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.authz.v1beta1.QueryGrantsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.authz.v1beta1.QueryGrantsResponse} */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = new cosmos_authz_v1beta1_authz_pb.Grant() reader.readMessage( value, cosmos_authz_v1beta1_authz_pb.Grant.deserializeBinaryFromReader, ) msg.addGrants(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.cosmos.authz.v1beta1.QueryGrantsResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.authz.v1beta1.QueryGrantsResponse.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.authz.v1beta1.QueryGrantsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getGrantsList() if (f.length > 0) { writer.writeRepeatedMessage( 1, f, cosmos_authz_v1beta1_authz_pb.Grant.serializeBinaryToWriter, ) } f = message.getPagination() if (f != null) { writer.writeMessage( 2, f, cosmos_base_query_v1beta1_pagination_pb.PageResponse .serializeBinaryToWriter, ) } } /** * repeated Grant grants = 1; * @return {!Array<!proto.cosmos.authz.v1beta1.Grant>} */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.prototype.getGrantsList = function () { return /** @type{!Array<!proto.cosmos.authz.v1beta1.Grant>} */ ( jspb.Message.getRepeatedWrapperField( this, cosmos_authz_v1beta1_authz_pb.Grant, 1, ) ) } /** * @param {!Array<!proto.cosmos.authz.v1beta1.Grant>} value * @return {!proto.cosmos.authz.v1beta1.QueryGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.prototype.setGrantsList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 1, value) } /** * @param {!proto.cosmos.authz.v1beta1.Grant=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.authz.v1beta1.Grant} */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.prototype.addGrants = function ( opt_value, opt_index, ) { return jspb.Message.addToRepeatedWrapperField( this, 1, opt_value, proto.cosmos.authz.v1beta1.Grant, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.authz.v1beta1.QueryGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.prototype.clearGrantsList = function () { return this.setGrantsList([]) } /** * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.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.cosmos.authz.v1beta1.QueryGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.authz.v1beta1.QueryGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.prototype.clearPagination = function () { return this.setPagination(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.authz.v1beta1.QueryGrantsResponse.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.cosmos.authz.v1beta1.QueryGranterGrantsRequest.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.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.cosmos.authz.v1beta1.QueryGranterGrantsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.toObject = function ( includeInstance, msg, ) { var f, obj = { granter: jspb.Message.getFieldWithDefault(msg, 1, ''), 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.cosmos.authz.v1beta1.QueryGranterGrantsRequest} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest() return proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.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.setGranter(value) break case 2: 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.cosmos.authz.v1beta1.QueryGranterGrantsRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getGranter() if (f.length > 0) { writer.writeString(1, f) } f = message.getPagination() if (f != null) { writer.writeMessage( 2, f, cosmos_base_query_v1beta1_pagination_pb.PageRequest .serializeBinaryToWriter, ) } } /** * optional string granter = 1; * @return {string} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.prototype.getGranter = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.prototype.setGranter = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.prototype.getPagination = function () { return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( jspb.Message.getWrapperField( this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2, ) ) } /** * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value * @return {!proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.prototype.clearPagination = function () { return this.setPagination(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsRequest.prototype.hasPagination = function () { return jspb.Message.getField(this, 2) != null } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.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.cosmos.authz.v1beta1.QueryGranterGrantsResponse.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.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.cosmos.authz.v1beta1.QueryGranterGrantsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.toObject = function ( includeInstance, msg, ) { var f, obj = { grantsList: jspb.Message.toObjectList( msg.getGrantsList(), cosmos_authz_v1beta1_authz_pb.GrantAuthorization.toObject, includeInstance, ), 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.cosmos.authz.v1beta1.QueryGranterGrantsResponse} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse() return proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = new cosmos_authz_v1beta1_authz_pb.GrantAuthorization() reader.readMessage( value, cosmos_authz_v1beta1_authz_pb.GrantAuthorization .deserializeBinaryFromReader, ) msg.addGrants(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.cosmos.authz.v1beta1.QueryGranterGrantsResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getGrantsList() if (f.length > 0) { writer.writeRepeatedMessage( 1, f, cosmos_authz_v1beta1_authz_pb.GrantAuthorization .serializeBinaryToWriter, ) } f = message.getPagination() if (f != null) { writer.writeMessage( 2, f, cosmos_base_query_v1beta1_pagination_pb.PageResponse .serializeBinaryToWriter, ) } } /** * repeated GrantAuthorization grants = 1; * @return {!Array<!proto.cosmos.authz.v1beta1.GrantAuthorization>} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.prototype.getGrantsList = function () { return /** @type{!Array<!proto.cosmos.authz.v1beta1.GrantAuthorization>} */ ( jspb.Message.getRepeatedWrapperField( this, cosmos_authz_v1beta1_authz_pb.GrantAuthorization, 1, ) ) } /** * @param {!Array<!proto.cosmos.authz.v1beta1.GrantAuthorization>} value * @return {!proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.prototype.setGrantsList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 1, value) } /** * @param {!proto.cosmos.authz.v1beta1.GrantAuthorization=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.prototype.addGrants = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField( this, 1, opt_value, proto.cosmos.authz.v1beta1.GrantAuthorization, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.prototype.clearGrantsList = function () { return this.setGrantsList([]) } /** * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.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.cosmos.authz.v1beta1.QueryGranterGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.prototype.clearPagination = function () { return this.setPagination(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.authz.v1beta1.QueryGranterGrantsResponse.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.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.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.cosmos.authz.v1beta1.QueryGranteeGrantsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.toObject = function ( includeInstance, msg, ) { var f, obj = { grantee: jspb.Message.getFieldWithDefault(msg, 1, ''), 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.cosmos.authz.v1beta1.QueryGranteeGrantsRequest} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest() return proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.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.setGrantee(value) break case 2: 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.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getGrantee() if (f.length > 0) { writer.writeString(1, f) } f = message.getPagination() if (f != null) { writer.writeMessage( 2, f, cosmos_base_query_v1beta1_pagination_pb.PageRequest .serializeBinaryToWriter, ) } } /** * optional string grantee = 1; * @return {string} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.prototype.getGrantee = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.prototype.setGrantee = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.prototype.getPagination = function () { return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( jspb.Message.getWrapperField( this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2, ) ) } /** * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value * @return {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 2, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest} returns this */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.prototype.clearPagination = function () { return this.setPagination(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsRequest.prototype.hasPagination = function () { return jspb.Message.getField(this, 2) != null } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.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.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.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.cosmos.authz.v1beta1.QueryGranteeGrantsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.toObject = function ( includeInstance, msg, ) { var f, obj = { grantsList: jspb.Message.toObjectList( msg.getGrantsList(), cosmos_authz_v1beta1_authz_pb.GrantAuthorization.toObject, includeInstance, ), 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.cosmos.authz.v1beta1.QueryGranteeGrantsResponse} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse() return proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = new cosmos_authz_v1beta1_authz_pb.GrantAuthorization() reader.readMessage( value, cosmos_authz_v1beta1_authz_pb.GrantAuthorization .deserializeBinaryFromReader, ) msg.addGrants(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.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getGrantsList() if (f.length > 0) { writer.writeRepeatedMessage( 1, f, cosmos_authz_v1beta1_authz_pb.GrantAuthorization .serializeBinaryToWriter, ) } f = message.getPagination() if (f != null) { writer.writeMessage( 2, f, cosmos_base_query_v1beta1_pagination_pb.PageResponse .serializeBinaryToWriter, ) } } /** * repeated GrantAuthorization grants = 1; * @return {!Array<!proto.cosmos.authz.v1beta1.GrantAuthorization>} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.prototype.getGrantsList = function () { return /** @type{!Array<!proto.cosmos.authz.v1beta1.GrantAuthorization>} */ ( jspb.Message.getRepeatedWrapperField( this, cosmos_authz_v1beta1_authz_pb.GrantAuthorization, 1, ) ) } /** * @param {!Array<!proto.cosmos.authz.v1beta1.GrantAuthorization>} value * @return {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.prototype.setGrantsList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 1, value) } /** * @param {!proto.cosmos.authz.v1beta1.GrantAuthorization=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.prototype.addGrants = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField( this, 1, opt_value, proto.cosmos.authz.v1beta1.GrantAuthorization, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse} returns this */ proto.cosmos.authz.v1beta1.QueryGranteeGrantsResponse.prototype.clearGrantsList = function () { return this.setGrantsList([]) } /** * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1bet