UNPKG

@bandprotocol/bandchain.js

Version:

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

663 lines (618 loc) 20 kB
// source: cosmos/app/runtime/v1alpha1/module.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 cosmos_app_v1alpha1_module_pb = require('../../../../cosmos/app/v1alpha1/module_pb.js') goog.object.extend(proto, cosmos_app_v1alpha1_module_pb) goog.exportSymbol('proto.cosmos.app.runtime.v1alpha1.Module', null, global) goog.exportSymbol( 'proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig', 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.app.runtime.v1alpha1.Module = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.app.runtime.v1alpha1.Module.repeatedFields_, null, ) } goog.inherits(proto.cosmos.app.runtime.v1alpha1.Module, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.app.runtime.v1alpha1.Module.displayName = 'proto.cosmos.app.runtime.v1alpha1.Module' } /** * 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.app.runtime.v1alpha1.StoreKeyConfig = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.displayName = 'proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig' } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.app.runtime.v1alpha1.Module.repeatedFields_ = [2, 3, 4, 5, 6] 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.app.runtime.v1alpha1.Module.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.app.runtime.v1alpha1.Module.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.app.runtime.v1alpha1.Module} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.runtime.v1alpha1.Module.toObject = function ( includeInstance, msg, ) { var f, obj = { appName: jspb.Message.getFieldWithDefault(msg, 1, ''), beginBlockersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, endBlockersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, initGenesisList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, exportGenesisList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, overrideStoreKeysList: jspb.Message.toObjectList( msg.getOverrideStoreKeysList(), proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.toObject, includeInstance, ), } 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.app.runtime.v1alpha1.Module} */ proto.cosmos.app.runtime.v1alpha1.Module.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.app.runtime.v1alpha1.Module() return proto.cosmos.app.runtime.v1alpha1.Module.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.app.runtime.v1alpha1.Module} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.app.runtime.v1alpha1.Module} */ proto.cosmos.app.runtime.v1alpha1.Module.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.setAppName(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.addBeginBlockers(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.addEndBlockers(value) break case 4: var value = /** @type {string} */ (reader.readString()) msg.addInitGenesis(value) break case 5: var value = /** @type {string} */ (reader.readString()) msg.addExportGenesis(value) break case 6: var value = new proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig() reader.readMessage( value, proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig .deserializeBinaryFromReader, ) msg.addOverrideStoreKeys(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.app.runtime.v1alpha1.Module.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.app.runtime.v1alpha1.Module} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.runtime.v1alpha1.Module.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getAppName() if (f.length > 0) { writer.writeString(1, f) } f = message.getBeginBlockersList() if (f.length > 0) { writer.writeRepeatedString(2, f) } f = message.getEndBlockersList() if (f.length > 0) { writer.writeRepeatedString(3, f) } f = message.getInitGenesisList() if (f.length > 0) { writer.writeRepeatedString(4, f) } f = message.getExportGenesisList() if (f.length > 0) { writer.writeRepeatedString(5, f) } f = message.getOverrideStoreKeysList() if (f.length > 0) { writer.writeRepeatedMessage( 6, f, proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.serializeBinaryToWriter, ) } } /** * optional string app_name = 1; * @return {string} */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.getAppName = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.setAppName = function ( value, ) { return jspb.Message.setProto3StringField(this, 1, value) } /** * repeated string begin_blockers = 2; * @return {!Array<string>} */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.getBeginBlockersList = function () { return /** @type {!Array<string>} */ ( jspb.Message.getRepeatedField(this, 2) ) } /** * @param {!Array<string>} value * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.setBeginBlockersList = function (value) { return jspb.Message.setField(this, 2, value || []) } /** * @param {string} value * @param {number=} opt_index * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.addBeginBlockers = function ( value, opt_index, ) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearBeginBlockersList = function () { return this.setBeginBlockersList([]) } /** * repeated string end_blockers = 3; * @return {!Array<string>} */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.getEndBlockersList = function () { return /** @type {!Array<string>} */ ( jspb.Message.getRepeatedField(this, 3) ) } /** * @param {!Array<string>} value * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.setEndBlockersList = function (value) { return jspb.Message.setField(this, 3, value || []) } /** * @param {string} value * @param {number=} opt_index * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.addEndBlockers = function ( value, opt_index, ) { return jspb.Message.addToRepeatedField(this, 3, value, opt_index) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearEndBlockersList = function () { return this.setEndBlockersList([]) } /** * repeated string init_genesis = 4; * @return {!Array<string>} */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.getInitGenesisList = function () { return /** @type {!Array<string>} */ ( jspb.Message.getRepeatedField(this, 4) ) } /** * @param {!Array<string>} value * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.setInitGenesisList = function (value) { return jspb.Message.setField(this, 4, value || []) } /** * @param {string} value * @param {number=} opt_index * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.addInitGenesis = function ( value, opt_index, ) { return jspb.Message.addToRepeatedField(this, 4, value, opt_index) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearInitGenesisList = function () { return this.setInitGenesisList([]) } /** * repeated string export_genesis = 5; * @return {!Array<string>} */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.getExportGenesisList = function () { return /** @type {!Array<string>} */ ( jspb.Message.getRepeatedField(this, 5) ) } /** * @param {!Array<string>} value * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.setExportGenesisList = function (value) { return jspb.Message.setField(this, 5, value || []) } /** * @param {string} value * @param {number=} opt_index * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.addExportGenesis = function ( value, opt_index, ) { return jspb.Message.addToRepeatedField(this, 5, value, opt_index) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearExportGenesisList = function () { return this.setExportGenesisList([]) } /** * repeated StoreKeyConfig override_store_keys = 6; * @return {!Array<!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig>} */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.getOverrideStoreKeysList = function () { return /** @type{!Array<!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig>} */ ( jspb.Message.getRepeatedWrapperField( this, proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig, 6, ) ) } /** * @param {!Array<!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig>} value * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.setOverrideStoreKeysList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 6, value) } /** * @param {!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig} */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.addOverrideStoreKeys = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField( this, 6, opt_value, proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this */ proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearOverrideStoreKeysList = function () { return this.setOverrideStoreKeysList([]) } 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.app.runtime.v1alpha1.StoreKeyConfig.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.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.app.runtime.v1alpha1.StoreKeyConfig} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.toObject = function ( includeInstance, msg, ) { var f, obj = { moduleName: jspb.Message.getFieldWithDefault(msg, 1, ''), kvStoreKey: 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.app.runtime.v1alpha1.StoreKeyConfig} */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig() return proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig} */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.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.setModuleName(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.setKvStoreKey(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.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.app.runtime.v1alpha1.StoreKeyConfig} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getModuleName() if (f.length > 0) { writer.writeString(1, f) } f = message.getKvStoreKey() if (f.length > 0) { writer.writeString(2, f) } } /** * optional string module_name = 1; * @return {string} */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.prototype.getModuleName = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig} returns this */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.prototype.setModuleName = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string kv_store_key = 2; * @return {string} */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.prototype.getKvStoreKey = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig} returns this */ proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.prototype.setKvStoreKey = function (value) { return jspb.Message.setProto3StringField(this, 2, value) } goog.object.extend(exports, proto.cosmos.app.runtime.v1alpha1)