UNPKG

@bandprotocol/bandchain.js

Version:

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

743 lines (699 loc) 24 kB
// source: cosmos/feegrant/v1beta1/tx.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_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') goog.object.extend(proto, google_protobuf_any_pb) var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') goog.object.extend(proto, cosmos_proto_cosmos_pb) var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js') goog.object.extend(proto, cosmos_msg_v1_msg_pb) var amino_amino_pb = require('../../../amino/amino_pb.js') goog.object.extend(proto, amino_amino_pb) goog.exportSymbol( 'proto.cosmos.feegrant.v1beta1.MsgGrantAllowance', null, global, ) goog.exportSymbol( 'proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse', null, global, ) goog.exportSymbol( 'proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance', null, global, ) goog.exportSymbol( 'proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse', 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.feegrant.v1beta1.MsgGrantAllowance = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.feegrant.v1beta1.MsgGrantAllowance, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.displayName = 'proto.cosmos.feegrant.v1beta1.MsgGrantAllowance' } /** * 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.feegrant.v1beta1.MsgGrantAllowanceResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.displayName = 'proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse' } /** * 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.feegrant.v1beta1.MsgRevokeAllowance = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.displayName = 'proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance' } /** * 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.feegrant.v1beta1.MsgRevokeAllowanceResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits( proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse, jspb.Message, ) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.displayName = 'proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse' } 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.feegrant.v1beta1.MsgGrantAllowance.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.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.feegrant.v1beta1.MsgGrantAllowance} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.toObject = function ( includeInstance, msg, ) { var f, obj = { granter: jspb.Message.getFieldWithDefault(msg, 1, ''), grantee: jspb.Message.getFieldWithDefault(msg, 2, ''), allowance: (f = msg.getAllowance()) && google_protobuf_any_pb.Any.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.feegrant.v1beta1.MsgGrantAllowance} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.feegrant.v1beta1.MsgGrantAllowance() return proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.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 = new google_protobuf_any_pb.Any() reader.readMessage( value, google_protobuf_any_pb.Any.deserializeBinaryFromReader, ) msg.setAllowance(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.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.feegrant.v1beta1.MsgGrantAllowance} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.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.getAllowance() if (f != null) { writer.writeMessage( 3, f, google_protobuf_any_pb.Any.serializeBinaryToWriter, ) } } /** * optional string granter = 1; * @return {string} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.getGranter = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} returns this */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.setGranter = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string grantee = 2; * @return {string} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.getGrantee = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} returns this */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.setGrantee = function (value) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional google.protobuf.Any allowance = 3; * @return {?proto.google.protobuf.Any} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.getAllowance = function () { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3) ) } /** * @param {?proto.google.protobuf.Any|undefined} value * @return {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} returns this */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.setAllowance = function (value) { return jspb.Message.setWrapperField(this, 3, value) } /** * Clears the message field making it undefined. * @return {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowance} returns this */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.clearAllowance = function () { return this.setAllowance(undefined) } /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowance.prototype.hasAllowance = 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.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.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.feegrant.v1beta1.MsgGrantAllowanceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.toObject = function ( includeInstance, msg, ) { var f, obj = {} 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.feegrant.v1beta1.MsgGrantAllowanceResponse} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse() return proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.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.feegrant.v1beta1.MsgGrantAllowanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined } 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.feegrant.v1beta1.MsgRevokeAllowance.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.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.feegrant.v1beta1.MsgRevokeAllowance} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.toObject = function ( includeInstance, msg, ) { var f, obj = { granter: jspb.Message.getFieldWithDefault(msg, 1, ''), grantee: jspb.Message.getFieldWithDefault(msg, 2, ''), } if (includeInstance) { obj.$jspbMessageInstance = msg } return obj } } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance() return proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.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 default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.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.feegrant.v1beta1.MsgRevokeAllowance} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.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) } } /** * optional string granter = 1; * @return {string} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.prototype.getGranter = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} returns this */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.prototype.setGranter = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string grantee = 2; * @return {string} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.prototype.getGrantee = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance} returns this */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance.prototype.setGrantee = function (value) { return jspb.Message.setProto3StringField(this, 2, value) } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.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.feegrant.v1beta1.MsgRevokeAllowanceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.toObject = function ( includeInstance, msg, ) { var f, obj = {} 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.feegrant.v1beta1.MsgRevokeAllowanceResponse} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse() return proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.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.feegrant.v1beta1.MsgRevokeAllowanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined } goog.object.extend(exports, proto.cosmos.feegrant.v1beta1)