UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

1,297 lines (1,066 loc) 43 kB
// source: provenance/msgfees/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 || window || global || self || Function('return this')(); }.call(null); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); var provenance_msgfees_v1_msgfees_pb = require('../../../provenance/msgfees/v1/msgfees_pb.js'); goog.object.extend(proto, provenance_msgfees_v1_msgfees_pb); var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); goog.object.extend(proto, cosmos_base_v1beta1_coin_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.provenance.msgfees.v1.CalculateTxFeesRequest', null, global); goog.exportSymbol('proto.provenance.msgfees.v1.CalculateTxFeesResponse', null, global); goog.exportSymbol('proto.provenance.msgfees.v1.QueryAllMsgFeesRequest', null, global); goog.exportSymbol('proto.provenance.msgfees.v1.QueryAllMsgFeesResponse', null, global); goog.exportSymbol('proto.provenance.msgfees.v1.QueryParamsRequest', null, global); goog.exportSymbol('proto.provenance.msgfees.v1.QueryParamsResponse', 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.provenance.msgfees.v1.QueryParamsRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.msgfees.v1.QueryParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.msgfees.v1.QueryParamsRequest.displayName = 'proto.provenance.msgfees.v1.QueryParamsRequest'; } /** * 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.provenance.msgfees.v1.QueryParamsResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.msgfees.v1.QueryParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.msgfees.v1.QueryParamsResponse.displayName = 'proto.provenance.msgfees.v1.QueryParamsResponse'; } /** * 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.provenance.msgfees.v1.QueryAllMsgFeesRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.msgfees.v1.QueryAllMsgFeesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.displayName = 'proto.provenance.msgfees.v1.QueryAllMsgFeesRequest'; } /** * 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.provenance.msgfees.v1.QueryAllMsgFeesResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.repeatedFields_, null); }; goog.inherits(proto.provenance.msgfees.v1.QueryAllMsgFeesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.displayName = 'proto.provenance.msgfees.v1.QueryAllMsgFeesResponse'; } /** * 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.provenance.msgfees.v1.CalculateTxFeesRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.msgfees.v1.CalculateTxFeesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.displayName = 'proto.provenance.msgfees.v1.CalculateTxFeesRequest'; } /** * 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.provenance.msgfees.v1.CalculateTxFeesResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.provenance.msgfees.v1.CalculateTxFeesResponse.repeatedFields_, null); }; goog.inherits(proto.provenance.msgfees.v1.CalculateTxFeesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.displayName = 'proto.provenance.msgfees.v1.CalculateTxFeesResponse'; } 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.provenance.msgfees.v1.QueryParamsRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.msgfees.v1.QueryParamsRequest.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.provenance.msgfees.v1.QueryParamsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.QueryParamsRequest.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.provenance.msgfees.v1.QueryParamsRequest} */ proto.provenance.msgfees.v1.QueryParamsRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.msgfees.v1.QueryParamsRequest(); return proto.provenance.msgfees.v1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.msgfees.v1.QueryParamsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.msgfees.v1.QueryParamsRequest} */ proto.provenance.msgfees.v1.QueryParamsRequest.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.provenance.msgfees.v1.QueryParamsRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.msgfees.v1.QueryParamsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.msgfees.v1.QueryParamsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.QueryParamsRequest.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.provenance.msgfees.v1.QueryParamsResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.msgfees.v1.QueryParamsResponse.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.provenance.msgfees.v1.QueryParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.QueryParamsResponse.toObject = function (includeInstance, msg) { var f, obj = { params: (f = msg.getParams()) && provenance_msgfees_v1_msgfees_pb.Params.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.provenance.msgfees.v1.QueryParamsResponse} */ proto.provenance.msgfees.v1.QueryParamsResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.msgfees.v1.QueryParamsResponse(); return proto.provenance.msgfees.v1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.msgfees.v1.QueryParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.msgfees.v1.QueryParamsResponse} */ proto.provenance.msgfees.v1.QueryParamsResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new provenance_msgfees_v1_msgfees_pb.Params(); reader.readMessage(value, provenance_msgfees_v1_msgfees_pb.Params.deserializeBinaryFromReader); msg.setParams(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.msgfees.v1.QueryParamsResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.msgfees.v1.QueryParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.msgfees.v1.QueryParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.QueryParamsResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getParams(); if (f != null) { writer.writeMessage(1, f, provenance_msgfees_v1_msgfees_pb.Params.serializeBinaryToWriter); } }; /** * optional Params params = 1; * @return {?proto.provenance.msgfees.v1.Params} */ proto.provenance.msgfees.v1.QueryParamsResponse.prototype.getParams = function () { return ( /** @type{?proto.provenance.msgfees.v1.Params} */ jspb.Message.getWrapperField(this, provenance_msgfees_v1_msgfees_pb.Params, 1) ); }; /** * @param {?proto.provenance.msgfees.v1.Params|undefined} value * @return {!proto.provenance.msgfees.v1.QueryParamsResponse} returns this */ proto.provenance.msgfees.v1.QueryParamsResponse.prototype.setParams = function (value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.msgfees.v1.QueryParamsResponse} returns this */ proto.provenance.msgfees.v1.QueryParamsResponse.prototype.clearParams = function () { return this.setParams(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.msgfees.v1.QueryParamsResponse.prototype.hasParams = function () { return jspb.Message.getField(this, 1) != 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.provenance.msgfees.v1.QueryAllMsgFeesRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.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.provenance.msgfees.v1.QueryAllMsgFeesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.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.provenance.msgfees.v1.QueryAllMsgFeesRequest} */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.msgfees.v1.QueryAllMsgFeesRequest(); return proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.msgfees.v1.QueryAllMsgFeesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.msgfees.v1.QueryAllMsgFeesRequest} */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { 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.provenance.msgfees.v1.QueryAllMsgFeesRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.msgfees.v1.QueryAllMsgFeesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getPagination(); if (f != null) { writer.writeMessage(2, f, cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter); } }; /** * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.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.provenance.msgfees.v1.QueryAllMsgFeesRequest} returns this */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.msgfees.v1.QueryAllMsgFeesRequest} returns this */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.prototype.clearPagination = function () { return this.setPagination(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.msgfees.v1.QueryAllMsgFeesRequest.prototype.hasPagination = function () { return jspb.Message.getField(this, 2) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.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.provenance.msgfees.v1.QueryAllMsgFeesResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.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.provenance.msgfees.v1.QueryAllMsgFeesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.toObject = function (includeInstance, msg) { var f, obj = { msgFeesList: jspb.Message.toObjectList(msg.getMsgFeesList(), provenance_msgfees_v1_msgfees_pb.MsgFee.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.provenance.msgfees.v1.QueryAllMsgFeesResponse} */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.msgfees.v1.QueryAllMsgFeesResponse(); return proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.msgfees.v1.QueryAllMsgFeesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.msgfees.v1.QueryAllMsgFeesResponse} */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new provenance_msgfees_v1_msgfees_pb.MsgFee(); reader.readMessage(value, provenance_msgfees_v1_msgfees_pb.MsgFee.deserializeBinaryFromReader); msg.addMsgFees(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.provenance.msgfees.v1.QueryAllMsgFeesResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.msgfees.v1.QueryAllMsgFeesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getMsgFeesList(); if (f.length > 0) { writer.writeRepeatedMessage(1, f, provenance_msgfees_v1_msgfees_pb.MsgFee.serializeBinaryToWriter); } f = message.getPagination(); if (f != null) { writer.writeMessage(2, f, cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter); } }; /** * repeated MsgFee msg_fees = 1; * @return {!Array<!proto.provenance.msgfees.v1.MsgFee>} */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.prototype.getMsgFeesList = function () { return ( /** @type{!Array<!proto.provenance.msgfees.v1.MsgFee>} */ jspb.Message.getRepeatedWrapperField(this, provenance_msgfees_v1_msgfees_pb.MsgFee, 1) ); }; /** * @param {!Array<!proto.provenance.msgfees.v1.MsgFee>} value * @return {!proto.provenance.msgfees.v1.QueryAllMsgFeesResponse} returns this */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.prototype.setMsgFeesList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.provenance.msgfees.v1.MsgFee=} opt_value * @param {number=} opt_index * @return {!proto.provenance.msgfees.v1.MsgFee} */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.prototype.addMsgFees = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.provenance.msgfees.v1.MsgFee, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.provenance.msgfees.v1.QueryAllMsgFeesResponse} returns this */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.prototype.clearMsgFeesList = function () { return this.setMsgFeesList([]); }; /** * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.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.provenance.msgfees.v1.QueryAllMsgFeesResponse} returns this */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.msgfees.v1.QueryAllMsgFeesResponse} returns this */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.prototype.clearPagination = function () { return this.setPagination(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.msgfees.v1.QueryAllMsgFeesResponse.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.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.msgfees.v1.CalculateTxFeesRequest.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.provenance.msgfees.v1.CalculateTxFeesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.toObject = function (includeInstance, msg) { var f, obj = { txBytes: msg.getTxBytes_asB64(), defaultBaseDenom: jspb.Message.getFieldWithDefault(msg, 2, ""), gasAdjustment: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.msgfees.v1.CalculateTxFeesRequest} */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.msgfees.v1.CalculateTxFeesRequest(); return proto.provenance.msgfees.v1.CalculateTxFeesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.msgfees.v1.CalculateTxFeesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.msgfees.v1.CalculateTxFeesRequest} */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.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.setTxBytes(value); break; case 2: var value = /** @type {string} */ reader.readString(); msg.setDefaultBaseDenom(value); break; case 3: var value = /** @type {number} */ reader.readFloat(); msg.setGasAdjustment(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.msgfees.v1.CalculateTxFeesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.msgfees.v1.CalculateTxFeesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getTxBytes_asU8(); if (f.length > 0) { writer.writeBytes(1, f); } f = message.getDefaultBaseDenom(); if (f.length > 0) { writer.writeString(2, f); } f = message.getGasAdjustment(); if (f !== 0.0) { writer.writeFloat(3, f); } }; /** * optional bytes tx_bytes = 1; * @return {!(string|Uint8Array)} */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.getTxBytes = function () { return ( /** @type {!(string|Uint8Array)} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * optional bytes tx_bytes = 1; * This is a type-conversion wrapper around `getTxBytes()` * @return {string} */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.getTxBytes_asB64 = function () { return ( /** @type {string} */ jspb.Message.bytesAsB64(this.getTxBytes()) ); }; /** * optional bytes tx_bytes = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getTxBytes()` * @return {!Uint8Array} */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.getTxBytes_asU8 = function () { return ( /** @type {!Uint8Array} */ jspb.Message.bytesAsU8(this.getTxBytes()) ); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.provenance.msgfees.v1.CalculateTxFeesRequest} returns this */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.setTxBytes = function (value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional string default_base_denom = 2; * @return {string} */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.getDefaultBaseDenom = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * @param {string} value * @return {!proto.provenance.msgfees.v1.CalculateTxFeesRequest} returns this */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.setDefaultBaseDenom = function (value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional float gas_adjustment = 3; * @return {number} */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.getGasAdjustment = function () { return ( /** @type {number} */ jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0) ); }; /** * @param {number} value * @return {!proto.provenance.msgfees.v1.CalculateTxFeesRequest} returns this */ proto.provenance.msgfees.v1.CalculateTxFeesRequest.prototype.setGasAdjustment = function (value) { return jspb.Message.setProto3FloatField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.repeatedFields_ = [1, 2]; 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.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.msgfees.v1.CalculateTxFeesResponse.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.provenance.msgfees.v1.CalculateTxFeesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.toObject = function (includeInstance, msg) { var f, obj = { additionalFeesList: jspb.Message.toObjectList(msg.getAdditionalFeesList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), totalFeesList: jspb.Message.toObjectList(msg.getTotalFeesList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), estimatedGas: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.msgfees.v1.CalculateTxFeesResponse(); return proto.provenance.msgfees.v1.CalculateTxFeesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new cosmos_base_v1beta1_coin_pb.Coin(); reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.addAdditionalFees(value); break; case 2: var value = new cosmos_base_v1beta1_coin_pb.Coin(); reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.addTotalFees(value); break; case 3: var value = /** @type {number} */ reader.readUint64(); msg.setEstimatedGas(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.msgfees.v1.CalculateTxFeesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getAdditionalFeesList(); if (f.length > 0) { writer.writeRepeatedMessage(1, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter); } f = message.getTotalFeesList(); if (f.length > 0) { writer.writeRepeatedMessage(2, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter); } f = message.getEstimatedGas(); if (f !== 0) { writer.writeUint64(3, f); } }; /** * repeated cosmos.base.v1beta1.Coin additional_fees = 1; * @return {!Array<!proto.cosmos.base.v1beta1.Coin>} */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.getAdditionalFeesList = function () { return ( /** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */ jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1) ); }; /** * @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value * @return {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} returns this */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.setAdditionalFeesList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.addAdditionalFees = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} returns this */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.clearAdditionalFeesList = function () { return this.setAdditionalFeesList([]); }; /** * repeated cosmos.base.v1beta1.Coin total_fees = 2; * @return {!Array<!proto.cosmos.base.v1beta1.Coin>} */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.getTotalFeesList = function () { return ( /** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */ jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2) ); }; /** * @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value * @return {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} returns this */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.setTotalFeesList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.addTotalFees = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} returns this */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.clearTotalFeesList = function () { return this.setTotalFeesList([]); }; /** * optional uint64 estimated_gas = 3; * @return {number} */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.getEstimatedGas = function () { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; /** * @param {number} value * @return {!proto.provenance.msgfees.v1.CalculateTxFeesResponse} returns this */ proto.provenance.msgfees.v1.CalculateTxFeesResponse.prototype.setEstimatedGas = function (value) { return jspb.Message.setProto3IntField(this, 3, value); }; goog.object.extend(exports, proto.provenance.msgfees.v1);